Commit fd49cae6 authored by 余成's avatar 余成

地区限制

parent c8cef419
File added
......@@ -852,10 +852,11 @@
var geoc = new BMap.Geocoder();
geoc.getLocation(point, function (rs) {
var addComp = rs.addressComponents;
console.log(addComp.city);
console.log("addComp.city",addComp.province);
//条件满足
// ["太原市","大同市","阳泉市","长治市","晋城市","朔州市","晋中市","运城市","忻州市","临汾市","吕梁市"].includes(addComp.city)
if (["太原市","大同市","阳泉市","长治市","晋城市","朔州市","晋中市","运城市","忻州市","临汾市","吕梁市"].include(addComp.city)) {
if (addComp.province == '山西省') {
// 端内
toLink(targetUrl);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment