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 @@