|
@@ -73,7 +73,11 @@ export default {
|
|
|
// } else {
|
|
|
// wx.redirectTo({ url: this.path }); // 关闭当前页面,跳转到应用内的某个页面
|
|
|
// }
|
|
|
- wx.reLaunch({ url: '/pages/index/main' }) // 关闭所有页面,打开到应用内的某个页面
|
|
|
+ if(this.path === '/pages/index/main' || this.path === '/pages/member/main'){ // tab页
|
|
|
+ wx.switchTab({ url: this.path })
|
|
|
+ }else{ // 普通页
|
|
|
+ wx.redirectTo({ url: this.path })
|
|
|
+ }
|
|
|
} else {
|
|
|
wx.showToast({
|
|
|
title: res.message,
|
|
@@ -100,7 +104,7 @@ export default {
|
|
|
},
|
|
|
onUnload() {
|
|
|
// 避免从登录页返回到个人中心页(能跳转登录页则是未登录的,不应看到个人中心信息)
|
|
|
- this.gotoHome()
|
|
|
+ // this.gotoHome()
|
|
|
}
|
|
|
};
|
|
|
</script>
|