vue2-client 1.9.102 → 1.9.103

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.9.102",
3
+ "version": "1.9.103",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -179,6 +179,8 @@ function loadInterceptors () {
179
179
  if (compatible === 'V4' || (res.data.code && Object.prototype.hasOwnProperty.call(res.data, 'msg'))) {
180
180
  // 请求rul
181
181
  const requestUrl = res.config.url
182
+ // 未设置状态码则默认成功状态
183
+ const code = res.data.code || 200
182
184
  // 兼容V3, V3使用XFormTable需要这个
183
185
  if (res.data.data) {
184
186
  if (compatible === 'V4') {
@@ -198,8 +200,6 @@ function loadInterceptors () {
198
200
  }
199
201
  }
200
202
  }
201
- // 未设置状态码则默认成功状态
202
- const code = res.data.code || 200
203
203
  // 获取错误信息
204
204
  const msg = errorCode[code] || res.data.msg || errorCode.default
205
205
  // 二进制数据则直接返回