From 9bdb627cf2f68b159955a28a77cf0f073ee20322 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Thu, 21 Sep 2023 11:59:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 26 +++++++++++++------------- manifest.json | 10 ++++++---- utils/uniMPfunction.js | 29 ++++++++++++++--------------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/App.vue b/App.vue index 842c470..09c5f38 100644 --- a/App.vue +++ b/App.vue @@ -91,19 +91,19 @@ initEvent(); // #endif - uni.getLocation({ - // type: 'gcj02', - // geocode: true, - // isHighAccuracy: true, - // altitude: true, - accuracy: 'best', - success: (res)=> { - console.log(res); - }, - fail(e) { - console.log(e); - } - }); + // uni.getLocation({ + // type: 'gcj02', + // geocode: true, + // isHighAccuracy: true, + // // altitude: true, + // // accuracy: 'best', + // success: (res)=> { + // console.log(res); + // }, + // fail(e) { + // console.log(e); + // } + // }); let that = this; // #ifdef MP diff --git a/manifest.json b/manifest.json index 0712ed8..b571c8e 100644 --- a/manifest.json +++ b/manifest.json @@ -95,8 +95,8 @@ "sdkConfigs" : { "maps" : { "amap" : { - "appkey_ios" : "048d9f3f323eea894b49c3a7edbc8d87", - "appkey_android" : "048d9f3f323eea894b49c3a7edbc8d87" + "appkey_ios" : "82af93ec51139c712c4118d84ba684ee", + "appkey_android" : "0799f37420c0784f1e6cba230a68bdb1" } }, "payment" : { @@ -113,8 +113,10 @@ } }, "geolocation" : { - "system" : { - "__platform__" : [ "ios", "android" ] + "amap" : { + "__platform__" : [ "ios", "android" ], + "appkey_ios" : "82af93ec51139c712c4118d84ba684ee", + "appkey_android" : "0799f37420c0784f1e6cba230a68bdb1" } }, "oauth" : {}, diff --git a/utils/uniMPfunction.js b/utils/uniMPfunction.js index 32184bc..3d207f1 100644 --- a/utils/uniMPfunction.js +++ b/utils/uniMPfunction.js @@ -1,22 +1,21 @@ - -export const test = ()=>{ +export const test = () => { return '测试' } -export const uniMPgetLocation = ()=>{ - return new Promise((resolve, reject)=>{ +export const uniMPgetLocation = () => { + return new Promise((resolve, reject) => { uni.getLocation({ - // type: 'gcj02', - // geocode: true, - // isHighAccuracy: true, - // altitude: true, - accuracy: 'best', - success: (res)=> { - resolve(res) - }, - fail(e) { - reject(e) - } + type: 'gcj02', + geocode: true, + isHighAccuracy: true, + // altitude: true, + // accuracy: 'best', + success: (res) => { + resolve(res) + }, + fail(e) { + resolve(e) + } }); }) } \ No newline at end of file