From 4cedd8415d722c619f8702ca3acbb0e04b32683f Mon Sep 17 00:00:00 2001 From: jia <1451658316@qq.com> Date: Sat, 2 Sep 2023 21:05:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 15 +- components/WaterfallsFlow/WaterfallsFlows.vue | 23 +- components/zbpSwiper.vue | 85 ++--- main.js | 2 +- pages/gather/gather.vue | 322 +++++++++--------- pages/index/index.vue | 33 +- pages/short_video/appSwiper/index.nvue | 209 +++++++----- pages/short_video/nvueSwiper/index.nvue | 11 +- pages/supply_chains/supply_chains.vue | 38 ++- 9 files changed, 383 insertions(+), 355 deletions(-) diff --git a/App.vue b/App.vue index 98f50c4..088d48f 100644 --- a/App.vue +++ b/App.vue @@ -10,6 +10,7 @@ // +---------------------------------------------------------------------- // #ifdef APP-PLUS let jpushModule = uni.requireNativePlugin("JG-JPush"); + const mp = uni.requireNativePlugin('uniMP'); // #endif import { checkLogin @@ -74,7 +75,18 @@ }, onLaunch: function(option) { this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'; - this.globalData.uid = this.$store.state.app.uid + this.globalData.uid = this.$store.state.app.uid; + + //监听uni小程序发送的事件 + mp.onUniMPEventReceive(ret=>{ + console.log('小程序事件: ', ret); + if(ret.event=='closeApp'){ + mp.closeUniMP(ret.fromAppid, (ret)=>{ + console.log('closeUniMP: '+JSON.stringify(ret)); + }); + } + }); + let that = this; // #ifdef MP if (HTTP_REQUEST_URL == '') { @@ -188,7 +200,6 @@ - }, onShow() { let that = this diff --git a/components/WaterfallsFlow/WaterfallsFlows.vue b/components/WaterfallsFlow/WaterfallsFlows.vue index 91429d2..17461f6 100644 --- a/components/WaterfallsFlow/WaterfallsFlows.vue +++ b/components/WaterfallsFlow/WaterfallsFlows.vue @@ -26,9 +26,7 @@