Merge branch 'zcwy_0712_bug' into master-0705

This commit is contained in:
nisen
2024-09-06 13:30:46 +08:00
6 changed files with 46 additions and 28 deletions

View File

@@ -374,7 +374,9 @@ export function usePage(_url, params, init = true,listing = false) {
state.totalPage = r.data.total/10 || 1;
state.total = r.data.total;
state.loading = false;
});
}).catch(err => {
state.loading = false;
})
}
init && fetch();
@@ -498,6 +500,9 @@ export async function request(_url, params) {
if (res.code === 0 || res.code === 200) {
return res;
}
if (res.code === 4 ){
return Promise.reject(res);
}
if (res.code === 1000 || res.code === 1002) {
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
localStorage.removeItem('refreshPage')