refactor: 代码优化
Former-commit-id: e7fb4e921a04664265a5a51c7ff7b4f374507d4a
This commit is contained in:
@@ -49,11 +49,12 @@ service.interceptors.response.use(
|
||||
}
|
||||
},
|
||||
(error: any) => {
|
||||
console.log('errorinfo', error.response.data);
|
||||
if (error.response.data) {
|
||||
const { code, msg } = error.response.data;
|
||||
// token 过期,重新登录
|
||||
if (code === 'A0230') {
|
||||
ElMessageBox.confirm('当前页面已失效,请重新登录', 'Warning', {
|
||||
ElMessageBox.confirm('当前页面已失效,请重新登录', '提示', {
|
||||
confirmButtonText: 'OK',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
Reference in New Issue
Block a user