From 66d6ba723e67010f349cf4b4b92e9d142a65adb3 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Wed, 20 Sep 2023 20:09:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=8F=90=E4=BA=A4=E4=B8=89?= =?UTF-8?q?=E8=BD=AE=E8=BD=A6=E6=B8=B8=E8=B5=B0,=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 12 +- manifest.json | 16 +- pages/oaHome/oaHome.vue | 6 + subpkg/property/vehicle.vue | 737 ++++++++++++++++++++---------------- 4 files changed, 429 insertions(+), 342 deletions(-) diff --git a/App.vue b/App.vue index 9f05fc1..f67f4da 100644 --- a/App.vue +++ b/App.vue @@ -21,11 +21,15 @@ // uni.showModal({ // content: info.referrerInfo.extraData // }) - + if (info.referrerInfo?.extraData?.uniMP) { + //监听宿主App通讯数据 + uni.onHostEventReceive((event, data) => { + if(event=='getLocation') uni.$emit('uniMP_getLocation', data); + }); uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP); uni.setStorageSync('APP_token', info.referrerInfo?.extraData?.token); - try{ + try { let res = await loginShopAccount({ shop_token: info.referrerInfo?.extraData?.token }); @@ -40,8 +44,8 @@ this.$store.commit('setUserInfo', data); this.$isResolve() // uni.$emit('home_initUserInfo', data); - return ; - }catch(e){ + return; + } catch (e) { this.$isResolve() console.log(e); } diff --git a/manifest.json b/manifest.json index 1ecf234..a59d1ac 100644 --- a/manifest.json +++ b/manifest.json @@ -25,7 +25,8 @@ "Barcode" : {}, "Camera" : {}, "Maps" : {}, - "VideoPlayer" : {} + "VideoPlayer" : {}, + "Geolocation" : {} }, /* 应用发布信息 */ "distribute" : { @@ -70,8 +71,17 @@ "maps" : { "amap" : { // "appkey_ios" : "0799f37420c0784f1e6cba230a68bdb1", - // "appkey_android" : "0799f37420c0784f1e6cba230a68bdb1" - "appkey_ios" : "048d9f3f323eea894b49c3a7edbc8d87", + // "appkey_android" : "0799f37420c0784f1e6cba230a68bdb1", + "appkey_ios" : "82af93ec51139c712c4118d84ba684ee", + "appkey_android" : "048d9f3f323eea894b49c3a7edbc8d87" + // "appkey_ios" : "4f8f55618010007147aab96fc72bb408", + // "appkey_android" : "4f8f55618010007147aab96fc72bb408" + } + }, + "geolocation" : { + "amap" : { + "__platform__" : [ "ios", "android" ], + "appkey_ios" : "82af93ec51139c712c4118d84ba684ee", "appkey_android" : "048d9f3f323eea894b49c3a7edbc8d87" } } diff --git a/pages/oaHome/oaHome.vue b/pages/oaHome/oaHome.vue index a38a27a..1135a31 100644 --- a/pages/oaHome/oaHome.vue +++ b/pages/oaHome/oaHome.vue @@ -580,6 +580,12 @@ export default { }, }, async onPullDownRefresh () { + uni.sendHostEvent('test', '测试', (ret) => { + // uni.showModal({ + // title:'内容', + // content:JSON.stringify(ret) + // }) + }); await this.getOrderList(); await this.$store.dispatch('initConfig'); await this.getApproveList(); diff --git a/subpkg/property/vehicle.vue b/subpkg/property/vehicle.vue index 28a92a8..9bde262 100644 --- a/subpkg/property/vehicle.vue +++ b/subpkg/property/vehicle.vue @@ -1,63 +1,67 @@ \ No newline at end of file