uniapp/pages/index/index.vue
@@ -123,9 +123,30 @@ }, onLoad() { this.getCategoryList(); this.getPopBannerInfo() this.getPopBannerInfo(); }, onShow() { if(!this.hasLogin){ setTimeout(function(){ uni.reLaunch({ url:"/pages/login/wxlogin" }) },1000); return; } var user= uni.getStorageSync('userInfo'); console.log(user); if(!user.invitation_code) { setTimeout(function(){ uni.reLaunch({ url:"/pages/login/wxlogin" }) },1000); return; } if(this.categoryList){ this.getCategoryList(); }