修改代码,不请求方法之间写死 qqmap_key的值
This commit is contained in:
parent
53d09262c2
commit
184ed7feab
@ -39,23 +39,26 @@
|
||||
this.address = uni.getStorageSync('city');
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: apiArr.get_host_info,
|
||||
method: 'post',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (result) => {
|
||||
console.log(result, 'result');
|
||||
let wxapp = result.data.all.wxapp;
|
||||
|
||||
if (wxapp) {
|
||||
this.qqmap_key = wxapp.qqmap_key;
|
||||
this.qqmap_key = '55NBZ-MUQYW-EAJRL-YIWPA-ZXCR6-4NBPP';
|
||||
this.getUserLocation()
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
// uni.request({
|
||||
// url: apiArr.get_host_info,
|
||||
// method: 'post',
|
||||
// header: {
|
||||
// 'Content-type': 'application/x-www-form-urlencoded'
|
||||
// },
|
||||
// dataType: 'json',
|
||||
// success: (result) => {
|
||||
// console.log(result, 'result');
|
||||
// let wxapp = result.data.all.wxapp;
|
||||
|
||||
// if (wxapp) {
|
||||
// this.qqmap_key = wxapp.qqmap_key;
|
||||
// this.getUserLocation()
|
||||
// }
|
||||
// },
|
||||
// })
|
||||
},
|
||||
|
||||
getUserLocation() {
|
||||
|
||||
@ -403,22 +403,24 @@ export default {
|
||||
title: '加载中',
|
||||
mask: true
|
||||
});
|
||||
uni.request({
|
||||
url: apiArr.get_host_info,
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (result) => {
|
||||
let wxapp = result.data.all.wxapp;
|
||||
if (wxapp) {
|
||||
this.qqmap_key = wxapp.qqmap_key;
|
||||
// 获取当前地址信息
|
||||
this.getUserLocation();
|
||||
}
|
||||
}
|
||||
});
|
||||
this.qqmap_key = '55NBZ-MUQYW-EAJRL-YIWPA-ZXCR6-4NBPP';
|
||||
this.getUserLocation()
|
||||
// uni.request({
|
||||
// url: apiArr.get_host_info,
|
||||
// method: 'POST',
|
||||
// header: {
|
||||
// 'Content-type': 'application/x-www-form-urlencoded'
|
||||
// },
|
||||
// dataType: 'json',
|
||||
// success: (result) => {
|
||||
// let wxapp = result.data.all.wxapp;
|
||||
// if (wxapp) {
|
||||
// this.qqmap_key = wxapp.qqmap_key;
|
||||
// // 获取当前地址信息
|
||||
// this.getUserLocation();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
},
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user