From 184ed7feab3c20cd254a2113656cb36a73c40ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Mon, 25 Aug 2025 15:58:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81,=E4=B8=8D?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=96=B9=E6=B3=95=E4=B9=8B=E9=97=B4=E5=86=99?= =?UTF-8?q?=E6=AD=BB=20qqmap=5Fkey=E7=9A=84=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/search/search.vue | 35 +++++++++++++++++++---------------- pages/index/index.vue | 36 +++++++++++++++++++----------------- 2 files changed, 38 insertions(+), 33 deletions(-) diff --git a/components/search/search.vue b/components/search/search.vue index cd2ef24c..62250257 100644 --- a/components/search/search.vue +++ b/components/search/search.vue @@ -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; + this.qqmap_key = '55NBZ-MUQYW-EAJRL-YIWPA-ZXCR6-4NBPP'; + this.getUserLocation() - if (wxapp) { - this.qqmap_key = wxapp.qqmap_key; - 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() { diff --git a/pages/index/index.vue b/pages/index/index.vue index c6c11919..2b9df968 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -104,7 +104,7 @@ - + @@ -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(); + // } + // } + // }); },