提交 d3805466 编写于 作者: KK's avatar KK

解决登录 或者 拦截跳转 lodding 不消失

上级 d1c8d9d1
......@@ -3,8 +3,7 @@ import axios from 'axios';
import Router from 'vue-router';
import i18n from '@/locale';
import ignoreProxyMap from './ignore-proxy';
import { Loading } from '@/ibiz-core/utils';
/**
* 拦截器
*
......@@ -31,6 +30,8 @@ export class Interceptors {
*/
private store: Store<any> | any;
/**
* 单列对象
*
......@@ -108,11 +109,14 @@ export class Interceptors {
let { data: _data } = res;
if (res.status === 401) {
Loading.hidden();
this.doNoLogin(_data.data);
}
if (res.status === 404) {
Loading.hidden();
this.router.push({ path: '/404' });
} else if (res.status === 500) {
Loading.hidden();
this.router.push({ path: '/500' });
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册