yxuse 2.0.35 → 2.0.36

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/lib/index.es12.js CHANGED
@@ -5968,9 +5968,9 @@ class YxHttp {
5968
5968
  if (config2.url && this.customResMap[config2.url]) {
5969
5969
  return this.customResMap[config2.url](data);
5970
5970
  }
5971
- if (code == ResultEnum.OVERDUE) {
5971
+ if (code == ResultEnum.OVERDUE || data.code === ResultEnum.OVERDUE) {
5972
5972
  this.handleOverdueResponse(data);
5973
- } else if (code !== ResultEnum.SUCCESS) {
5973
+ } else if (data.code !== ResultEnum.SUCCESS) {
5974
5974
  this.handleErrorResponse(data);
5975
5975
  }
5976
5976
  return data;
@@ -6014,7 +6014,11 @@ class YxHttp {
6014
6014
  return Promise.reject(data);
6015
6015
  }
6016
6016
  handleErrorResponse(data) {
6017
- ElMessage.error(data.resultMsg);
6017
+ if (data == null ? void 0 : data.resultMsg) {
6018
+ ElMessage.error(data.resultMsg);
6019
+ } else {
6020
+ checkStatus(data.status);
6021
+ }
6018
6022
  return Promise.reject(data);
6019
6023
  }
6020
6024
  /**
Binary file