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.js CHANGED
@@ -6811,14 +6811,17 @@ var checkStatus = function (response, options, Taro) {
6811
6811
  if (statusCode >= 200 && statusCode < 300 || statusCode == 406) {
6812
6812
  if (data.code == 400 || statusCode == 406) {
6813
6813
  Taro.showToast({
6814
- title: data.msg,
6814
+ title: data.msg || '请求失败',
6815
6815
  icon: 'none',
6816
+ duration: 2000
6816
6817
  });
6817
6818
  data.status = 0;
6818
6819
  return data;
6819
6820
  }
6820
- // data.status = 1;
6821
- // data.errMsg = "";
6821
+ if (typeof data.status == 'undefined') {
6822
+ data.status = 1;
6823
+ data.errMsg = "";
6824
+ }
6822
6825
  return data;
6823
6826
  }
6824
6827
  if (statusCode === 401) {
@@ -6849,7 +6852,7 @@ var request = (function (url, data, method, header, Taro, debug) {
6849
6852
  }
6850
6853
  return Taro.request({
6851
6854
  url: url,
6852
- data: isEncode ? encryptByDES(data, debug) : data,
6855
+ data: isMethod ? {} : isEncode ? encryptByDES(data, debug) : data,
6853
6856
  method: method,
6854
6857
  timeout: 15000,
6855
6858
  header: {