diff --git a/pages/index/index.vue b/pages/index/index.vue index c306ecd..cf7300e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -285,7 +285,8 @@ nomore: '实在没有了' }, showCoupon: false, - newMemberCoupon: {}, + newMemberCoupon: {}, + exchangestate:false } }, components: { @@ -294,15 +295,19 @@ indexad, darenItem }, - onShow() { + onShow() { + // 页面返回,页面登陆的情况下检查是否显示领取优惠卷优惠券弹窗 + if(this.exchangestate==true){ + this.isNewmembervoucher() + } this.articleList = []; this.page = 0; this.getArticlelist(); this.getSwiper(); }, onLoad(){ - if(this.$store.state.hasLogin){ - this.isNewmembervoucher(); + if(this.$store.state.hasLogin){ + this.exchangestate = true const user = uni.getStorageSync('user_info'); console.log(user) this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)