修复登录问题

This commit is contained in:
TOP糯米 2023-04-01 11:15:33 +08:00
parent 4aca6defd4
commit af35ad5e80
2 changed files with 2 additions and 2 deletions

View File

@ -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');
});
}

View File

@ -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 "登录态失效";
}