修复登录问题

This commit is contained in:
TOP糯米 2023-04-01 11:16:40 +08:00
parent 2758dbd01c
commit c96dab6919
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ export default {
prototype.$storage.set('user_access_token', null); prototype.$storage.set('user_access_token', null);
prototype.$storage.set('userinfo', null); prototype.$storage.set('userinfo', null);
$store.commit('user/token', ""); $store.commit('user/token', "");
prototype.$utils.toast('注销成功').then(() => { prototype.$utils.toast('请重新登录').then(() => {
prototype.$utils.toPage('/pages/index/index', {}, 'switch'); prototype.$utils.toPage('/pages/index/index', {}, 'switch');
}); });
}, },

View File

@ -59,7 +59,7 @@ const request = async (args) => {
} }
if (response.data.code == 10001) { if (response.data.code == 10001) {
$store.dispatch("user/logout"); prototype.$models.user.logout();
$store.commit("user/showLoginModal", true); $store.commit("user/showLoginModal", true);
throw "登录态失效"; throw "登录态失效";
} }