修改代码,不请求方法之间写死 qqmap_key的值

This commit is contained in:
赵毅 2025-08-25 15:58:23 +08:00
parent 53d09262c2
commit 184ed7feab
2 changed files with 38 additions and 33 deletions

View File

@ -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() {

View File

@ -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();
// }
// }
// });
},