Update address_parse.js
This commit is contained in:
@@ -270,6 +270,9 @@ function smatrAddress(event) {
|
||||
// if (item.name == smartObj.city) {
|
||||
item.children.forEach(res => {
|
||||
if (res['county'].indexOf(matchAddress) != -1) {
|
||||
//省/市 || 省
|
||||
if (smartObj.province) {
|
||||
if (res.code.slice(0, 2) == smartObj.provinceCode) {
|
||||
matchCounty.push({
|
||||
county: res.county,
|
||||
countyCode: res.code,
|
||||
@@ -280,6 +283,18 @@ function smatrAddress(event) {
|
||||
provinceCode: el.code
|
||||
});
|
||||
}
|
||||
} else if(!smartObj.province && !smartObj.city){
|
||||
matchCounty.push({
|
||||
county: res.county,
|
||||
countyCode: res.code,
|
||||
city: item.city,
|
||||
cityCode: item.code,
|
||||
matchValue: matchAddress,
|
||||
province: el.province,
|
||||
provinceCode: el.code
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
// }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user