sasp-admin 0.2.57 → 0.2.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -141,28 +141,33 @@ let initAxios = (Vue, props) => {
141
141
  }
142
142
  return res;
143
143
  }, function (error) {
144
- if (error.response) {
145
- if(!error.request.responseURL){
144
+ if(window.location.href.indexOf("localhost:") > -1){
146
145
  return;
147
146
  }
148
- if(error.request.responseURL.indexOf("logErrorController/vueLog") > -1){
147
+
148
+ if(!error.response || error.response.status == 401){
149
+ router.push({path: '/'});
149
150
  return;
150
151
  }
151
- if(error.response.status == 401){
152
- router.push({path: '/'});
152
+ if(!error.request.responseURL){
153
153
  return;
154
154
  }
155
- let url = JAVA_URL+"/admin/logErrorController/vueLog";
156
- let serviceName = (window.SERVICE_NAME || {});
157
- let adminServeName = serviceName.admin || "/admin/";
158
- url = platStringUtil.replaceAll(url,"/admin/",adminServeName);
159
- axios.post(url,{"errorInfo":JSON.stringify(error.response)})
160
- // 对响应错误做点什么
161
- if (error && error.response && error.response.status == 302) {
162
- router.push({path: '/'});
155
+ if(error.request.responseURL.indexOf("logErrorController/vueLog") > -1){
163
156
  return;
164
157
  }
165
- }
158
+
159
+ if (error.response) {
160
+ let url = JAVA_URL+"/admin/logErrorController/vueLog";
161
+ let serviceName = (window.SERVICE_NAME || {});
162
+ let adminServeName = serviceName.admin || "/admin/";
163
+ url = platStringUtil.replaceAll(url,"/admin/",adminServeName);
164
+ axios.post(url,{"errorInfo":JSON.stringify(error.response)})
165
+ // 对响应错误做点什么
166
+ if (error && error.response && error.response.status == 302) {
167
+ router.push({path: '/'});
168
+ return;
169
+ }
170
+ }
166
171
  });
167
172
  };
168
173
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sasp-admin",
3
- "version": "0.2.57",
3
+ "version": "0.2.62",
4
4
  "description": "业务中台-系统管理模块",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"