更新方法:将此json文件内容复制至同名js里的var pcassCode=xxxx;
参考港澳台 可进行自整理
特殊字符(可自行添加):
~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“’。,、?-
1. 广东省珠海市香洲区盘山路28号幸福茶庄,陈景勇,13593464918
2. 马云,陕西省西安市雁塔区丈八沟街道高新四路高新大都荟 13593464918
3. 陕西省西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918
4. 西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918
5. 雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918
6. 收货人: 李节霁
手机号码: 15180231234
所在地区: 浙江省金华市婺城区西关街道
详细地址: 金磐路上坞街
7. 收货人: 马云
手机号码: 150-3569-6956
详细地址: 河北省石家庄市新华区中华北大街68号鹿城商务中心6号楼1413室
部署腾讯云,没有调用限制,需要自行部署请点击
request url:https://wangzc.wang/smAddress
request methods: POST
request payload:
{
"address": "新疆阿克苏温宿县博孜墩柯尔克孜族乡吾斯塘博村一组306号 150-3569-6956 马云",
"addressList": [
"新疆阿克苏温宿县博孜墩柯尔克孜族乡吾斯塘博村一组306号 150-3569-6956 马云",
"雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918 211381198512096810"
]
}
//address 字段为单条识别
//addressList 字段为集合识别 返回在response的list字段中
response:
{
"province": "新疆维吾尔自治区",
"provinceCode": "65",
"city": "阿克苏地区",
"cityCode": "6529",
"county": "温宿县",
"countyCode": "652922",
"street": "博孜墩柯尔克孜族乡",
"streetCode": "652922207",
"address": "吾斯塘博村一组306号",
"phone": "15035696956",
"name": "马云",
"requestNumber": 7,
"list": [
{
"province": "新疆维吾尔自治区",
"provinceCode": "65",
"city": "阿克苏地区",
"cityCode": "6529",
"county": "温宿县",
"countyCode": "652922",
"street": "博孜墩柯尔克孜族乡",
"streetCode": "652922207",
"address": "吾斯塘博村一组306号",
"phone": "15035696956",
"name": "马云"
},
{
"zipCode": "710061",
"county": "雁塔区",
"countyCode": "610113",
"province": "陕西省",
"provinceCode": "61",
"city": "西安市",
"cityCode": "6101",
"street": "丈八沟街道",
"streetCode": "610113007",
"address": "高新四路高新大都荟",
"name": "刘国良",
"phone": "13593464918",
"idCard": "211381198512096810"
}
]
}
api使用推荐axios
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
axios({
method: "post",
url: "https://wangzc.wang/smAddress",
data: {
address: '广东省珠海市香洲区盘山路28号幸福茶庄,陈景勇,13593464918',
},
}).then(function (res) {});
npm install address-smart-parse
import smart from 'address-smart-parse'
// console.log(smart('xxxxxxx))
<script src="js/pcasCode.js"></script>
<script src="js/zipCode.js"></script>
<script src="js/address_parse.js"></script>
//jsdelivr
<script src="https://cdn.jsdelivr.net/npm/[email protected]/pcasCode.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/zipCode.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/address_parse.js"></script>
//gitee
<script src="http://wzhichao.gitee.io/smartParsePro/js/pcasCode.js"></script>
<script src="http://wzhichao.gitee.io/smartParsePro/js/zipCode.js"></script>
<script src="http://wzhichao.gitee.io/smartParsePro/js/address_parse.js"></script>
smart("陕西省西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918 211381198512096810")
{
"zipCode":"710061",
"province":"陕西省",
"provinceCode":"61",
"city":"西安市",
"cityCode":"6101",
"county":"雁塔区",
"countyCode":"610113",
"street":"丈八沟街道",
"streetCode":"610113007",
"address":"高新四路高新大都荟",
"name":"刘国良",
"phone":"13593464918",
"idCard":"211381198512096810"
}