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