修复codefirst

This commit is contained in:
陈淳
2022-10-19 19:10:48 +08:00
parent 9aaf363584
commit 0755a4026a
15 changed files with 34 additions and 32 deletions

View File

@@ -42,7 +42,15 @@ myaxios.interceptors.request.use(function(config:any) {
myaxios.interceptors.response.use(async function(response) {
//成功
const resp = response.data
if(resp.code==401)
{
Notify({ type: 'warning', message: '登录过期' });
//登出
useUserStore().logOut().then(() => {
location.href = '/';
})
isRelogin.show = false;
}
// store.dispatch("closeLoad");
return resp;
}, async function(error) {