2.修改地图Key
yj-dev
杨杰 4 years ago
parent 34f2031799
commit 4aa2fecce7
  1. 9
      manifest.json
  2. 2
      pages/tabBar/category/category.vue
  3. 2
      pages/tabBar/home/home.vue

@ -74,14 +74,19 @@
}, },
"h5" : { "h5" : {
"sdkConfigs" : { "sdkConfigs" : {
"maps" : {} "maps" : {
"qqmap" : {
"key" : "7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB"
}
}
}, },
"title" : "嗨森逛", "title" : "嗨森逛",
"router" : { "router" : {
"mode" : "history" "mode" : "history"
}, },
"devServer" : { "devServer" : {
"port" : 80 "port" : 80,
"https" : false
} }
} }
} }

@ -108,7 +108,7 @@
app.globalData.longitude = res.longitude; app.globalData.longitude = res.longitude;
uni.request({ uni.request({
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude + url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude +
',' + res.longitude + '&key=YQDBZ-T54K4-5J6U7-DO3BA-CNZJO-PTFMU', ',' + res.longitude + '&key=7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB',
data: {}, data: {},
success: function(res) { success: function(res) {
that.city = res.data.result.address_component.city.replace(/市/g, that.city = res.data.result.address_component.city.replace(/市/g,

@ -238,7 +238,7 @@
app.globalData.longitude = res.longitude; app.globalData.longitude = res.longitude;
uni.request({ uni.request({
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude + url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude +
',' + res.longitude + '&key=YQDBZ-T54K4-5J6U7-DO3BA-CNZJO-PTFMU', ',' + res.longitude + '&key=7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB',
data: {}, data: {},
success: function(res) { success: function(res) {
that.city = res.data.result.address_component.city.replace(/市/g, that.city = res.data.result.address_component.city.replace(/市/g,

Loading…
Cancel
Save