yxuse 3.0.48 → 3.0.49

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
@@ -2758,9 +2758,9 @@ class YxHttp {
2758
2758
  if (config2.url && this.customResMap[config2.url]) {
2759
2759
  return this.customResMap[config2.url](data);
2760
2760
  }
2761
- if (code == ResultEnum.OVERDUE) {
2761
+ if (code == ResultEnum.OVERDUE || data.code === ResultEnum.OVERDUE) {
2762
2762
  this.handleOverdueResponse(data);
2763
- } else if (code !== ResultEnum.SUCCESS) {
2763
+ } else if (data.code !== ResultEnum.SUCCESS) {
2764
2764
  this.handleErrorResponse(data);
2765
2765
  }
2766
2766
  return data;
@@ -2804,7 +2804,11 @@ class YxHttp {
2804
2804
  return Promise.reject(data);
2805
2805
  }
2806
2806
  handleErrorResponse(data) {
2807
- ElMessage.error(data.resultMsg);
2807
+ if (data == null ? void 0 : data.resultMsg) {
2808
+ ElMessage.error(data.resultMsg);
2809
+ } else {
2810
+ checkStatus(data.status);
2811
+ }
2808
2812
  return Promise.reject(data);
2809
2813
  }
2810
2814
  /**
Binary file