Commit dacd8b1f by 匡雅琴

西藏省市判断

1 parent 6f7f2537
...@@ -1058,7 +1058,7 @@ ...@@ -1058,7 +1058,7 @@
// 获取省市 // 获取省市
var provincecode = res.geocoderAddress.adcode var provincecode = res.geocoderAddress.adcode
var provinceIdx = fullAddress.province var provinceIdx = fullAddress.province
var cityIdx = fullAddress.city var cityIdx = fullAddress.city ? fullAddress.city : fullAddress.district
const municipalities = ['北京市', '天津市', '上海市', '重庆市'] const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == provinceIdx) var municipality = municipalities.find(item => item == provinceIdx)
if (municipality) { if (municipality) {
......
...@@ -1068,7 +1068,7 @@ ...@@ -1068,7 +1068,7 @@
// 获取省市 // 获取省市
var provincecode = res.geocoderAddress.adcode var provincecode = res.geocoderAddress.adcode
var provinceIdx = fullAddress.province var provinceIdx = fullAddress.province
var cityIdx = fullAddress.city var cityIdx = fullAddress.city ? fullAddress.city : fullAddress.district
const municipalities = ['北京市', '天津市', '上海市', '重庆市'] const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == provinceIdx) var municipality = municipalities.find(item => item == provinceIdx)
if (municipality) { if (municipality) {
......
...@@ -1029,7 +1029,7 @@ ...@@ -1029,7 +1029,7 @@
// 获取省市 // 获取省市
var provincecode = res.geocoderAddress.adcode var provincecode = res.geocoderAddress.adcode
var provinceIdx = fullAddress.province var provinceIdx = fullAddress.province
var cityIdx = fullAddress.city var cityIdx = fullAddress.city ? fullAddress.city : fullAddress.district
const municipalities = ['北京市', '天津市', '上海市', '重庆市'] const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == provinceIdx) var municipality = municipalities.find(item => item == provinceIdx)
if (municipality) { if (municipality) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!