dfws-ve-taro-request 0.0.7 → 0.0.9

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
@@ -6812,8 +6812,8 @@
6812
6812
  };
6813
6813
  var checkStatus = function (response, options, Taro) {
6814
6814
  var statusCode = response.statusCode, data = response.data;
6815
- if (statusCode >= 200 && statusCode < 300) {
6816
- if (data.code == 400) {
6815
+ if (statusCode >= 200 && statusCode < 300 || statusCode == 406) {
6816
+ if (data.code == 400 || statusCode == 406) {
6817
6817
  Taro.showToast({
6818
6818
  title: data.msg,
6819
6819
  icon: 'none',
@@ -6826,10 +6826,10 @@
6826
6826
  return data;
6827
6827
  }
6828
6828
  if (statusCode === 401) {
6829
- Taro.clearStorage(); // 清除token
6830
6829
  Taro.removeStorage({ key: 'ticket' });
6831
6830
  Taro.removeStorage({ key: 'user_id' });
6832
6831
  Taro.removeStorage({ key: 'openid' });
6832
+ Taro.removeStorage({ key: 'mobile' });
6833
6833
  data.status = 0;
6834
6834
  data.errMsg = "";
6835
6835
  return data;