From 16b4af794214ffc7b52fdbaedcb7a82f0260724f Mon Sep 17 00:00:00 2001 From: aihe <961836564@qq.com> Date: Wed, 28 Feb 2024 17:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/untool.js | 2 +- pages/tabBar/mine/mine.vue | 2 +- store/modules/user.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/untool.js b/common/untool.js index 56389a2..9fee9ec 100644 --- a/common/untool.js +++ b/common/untool.js @@ -16,7 +16,7 @@ const goto = (url, type = 1)=> { uni.navigateTo({ url }); - } else { + } else if (type == 2){ uni.redirectTo({ url }); diff --git a/pages/tabBar/mine/mine.vue b/pages/tabBar/mine/mine.vue index dbe9356..e61dcad 100644 --- a/pages/tabBar/mine/mine.vue +++ b/pages/tabBar/mine/mine.vue @@ -154,7 +154,7 @@ goto, async handleUnlogin() { await this.$store.dispatch(USERKEY.LOGOUT) - goto(`login/login`) + goto(`login/login`, 2) } } } diff --git a/store/modules/user.js b/store/modules/user.js index 4fb353c..99309a8 100644 --- a/store/modules/user.js +++ b/store/modules/user.js @@ -66,7 +66,7 @@ export default { rootState }, options) { if(!state.token) { - goto("login/login", 1) + goto("login/login", 2) throw new Error('缺少token') }