From af35ad5e80e0c15905723352c2214736b16fdc5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com> Date: Sat, 1 Apr 2023 11:15:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/models/user.js | 2 +- src/core/request.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/models/user.js b/src/core/models/user.js index cdd1959..e6b0cd9 100644 --- a/src/core/models/user.js +++ b/src/core/models/user.js @@ -206,7 +206,7 @@ export default { prototype.$storage.set('user_access_token', null); prototype.$storage.set('userinfo', null); $store.commit('user/token', ""); - prototype.$utils.toast('注销成功').then(() => { + prototype.$utils.toast('请重新登录').then(() => { prototype.$utils.toPage('/pages/index/index', {}, 'switch'); }); } diff --git a/src/core/request.js b/src/core/request.js index d691c1c..f4fa436 100644 --- a/src/core/request.js +++ b/src/core/request.js @@ -59,7 +59,7 @@ const request = async (args) => { } if (response.data.code == 10001) { - $store.dispatch("user/logout"); + prototype.$models.user.logout(); $store.commit("user/showLoginModal", true); throw "登录态失效"; }