dfws-ve-taro-request 0.1.1 → 0.1.3

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/dist/index.umd.js CHANGED
@@ -6815,14 +6815,17 @@
6815
6815
  if (statusCode >= 200 && statusCode < 300 || statusCode == 406) {
6816
6816
  if (data.code == 400 || statusCode == 406) {
6817
6817
  Taro.showToast({
6818
- title: data.msg,
6818
+ title: data.msg || '请求失败',
6819
6819
  icon: 'none',
6820
+ duration: 2000
6820
6821
  });
6821
6822
  data.status = 0;
6822
6823
  return data;
6823
6824
  }
6824
- // data.status = 1;
6825
- // data.errMsg = "";
6825
+ if (typeof data.status == 'undefined') {
6826
+ data.status = 1;
6827
+ data.errMsg = "";
6828
+ }
6826
6829
  return data;
6827
6830
  }
6828
6831
  if (statusCode === 401) {
@@ -6853,7 +6856,7 @@
6853
6856
  }
6854
6857
  return Taro.request({
6855
6858
  url: url,
6856
- data: isEncode ? encryptByDES(data, debug) : data,
6859
+ data: isMethod ? {} : isEncode ? encryptByDES(data, debug) : data,
6857
6860
  method: method,
6858
6861
  timeout: 15000,
6859
6862
  header: {