搜索教师无数据处理,考试无学员导出数据添加提示

This commit is contained in:
zhangsir
2024-08-22 11:23:08 +08:00
parent af3013d3c4
commit 0408cb0c8a
2 changed files with 10 additions and 1 deletions

View File

@@ -370,7 +370,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();
@@ -494,6 +496,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')