|
@@ -19,6 +19,14 @@ let protocolName = document.location.protocol; //http协议
|
19
|
19
|
axios.defaults.baseURL = protocolName + "//" + domainName;
|
20
|
20
|
|
21
|
21
|
// axios.defaults.timeout = 5000;
|
|
22
|
+axios.interceptors.response.use(function (response) {
|
|
23
|
+ return response;
|
|
24
|
+}, function (error) {
|
|
25
|
+ if(error && error.response && error.response.status == 444){
|
|
26
|
+ window.location.href = location.origin + ':8080/user.jsp';
|
|
27
|
+ }
|
|
28
|
+ return Promise.reject(error);
|
|
29
|
+});
|
22
|
30
|
Vue.prototype.$http = axios;
|
23
|
31
|
Vue.config.productionTip = false;
|
24
|
32
|
Vue.prototype.$host = protocolName + "//" + domainName;
|