|
@@ -14,7 +14,7 @@ service.defaults.retryDelay = Config.requestRetryDelay;
|
|
|
|
|
|
service.interceptors.request.use(
|
|
|
config => {
|
|
|
- if(config.url !== '/login' && !localStorage.getItem("token") ) location.href = location.href.split("#")[0]
|
|
|
+ if(config.url !== '/login-v2' && !localStorage.getItem("token") ) location.href = location.href.split("#")[0]
|
|
|
config.headers["Authorization"] = localStorage.getItem("token");
|
|
|
return config;
|
|
|
},
|
|
@@ -45,8 +45,8 @@ service.interceptors.response.use(
|
|
|
//Toast("网络错误");
|
|
|
if (/403/.test(error.toString()))
|
|
|
window.parent
|
|
|
- ? (window.parent.location.href = "/login.html")
|
|
|
- : (location.href = "/login.html");
|
|
|
+ ? (window.parent.location.href = "/")
|
|
|
+ : (location.href = "/");
|
|
|
|
|
|
return Promise.reject(error);
|
|
|
}
|