|
@@ -41,20 +41,20 @@ service.interceptors.response.use(
|
|
|
// 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
|
|
|
if (res.code === 401) {
|
|
|
// to re-login
|
|
|
- // if(ElMessageBoxFlag){
|
|
|
- // ElMessageBoxFlag =false
|
|
|
- // }else{
|
|
|
- // return
|
|
|
- // }
|
|
|
- ElMessageBox.confirm('登录失效,请重新登录!', '温馨提示!', {
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- setTimeout(()=>{
|
|
|
- window.history.back()
|
|
|
- },1000)
|
|
|
- })
|
|
|
+ if(!ElMessageBoxFlag){
|
|
|
+ ElMessageBox.confirm('登录失效,请重新登录!', '温馨提示!', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ setTimeout(()=>{
|
|
|
+ window.history.back()
|
|
|
+ },1000)
|
|
|
+ }).catch(()=>{
|
|
|
+ ElMessageBoxFlag =false
|
|
|
+ })
|
|
|
+ ElMessageBoxFlag =true
|
|
|
+ }
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: res.msg || 'Error',
|