This commit is contained in:
nisen
2024-09-05 15:31:50 +08:00
parent 1200a1ab27
commit fac0a060e4
11 changed files with 33 additions and 148 deletions

View File

@@ -374,9 +374,7 @@ 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();
@@ -500,9 +498,6 @@ 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')