|
@@ -18,7 +18,14 @@ axios.defaults.baseURL = protocolName + "//" + domainName;
|
18
|
18
|
// axios.defaults.baseURL = http.host;
|
19
|
19
|
// axios.defaults.timeout = 5000;
|
20
|
20
|
axios.defaults.headers["Content-Type"] = "application/json;charset=UTF-8";
|
21
|
|
-
|
|
21
|
+axios.interceptors.response.use(function (response) {
|
|
22
|
+ return response;
|
|
23
|
+}, function (error) {
|
|
24
|
+ if(error && error.response && error.response.status == 444){
|
|
25
|
+ window.location.href = location.origin + '/service.jsp';
|
|
26
|
+ }
|
|
27
|
+ return Promise.reject(error);
|
|
28
|
+});
|
22
|
29
|
Vue.prototype.$http = axios;
|
23
|
30
|
Vue.config.productionTip = false;
|
24
|
31
|
// http request拦截器 添加一个请求拦截器
|