dfws-ve-taro-request 0.0.4 → 0.0.6

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
@@ -6809,6 +6809,12 @@ var onErrorMsgRrport = function (response, options, Taro) {
6809
6809
  var checkStatus = function (response, options, Taro) {
6810
6810
  var statusCode = response.statusCode, data = response.data;
6811
6811
  if (statusCode >= 200 && statusCode < 300) {
6812
+ if (data.code == 400) {
6813
+ return Taro.showToast({
6814
+ title: data.msg,
6815
+ icon: 'none',
6816
+ });
6817
+ }
6812
6818
  data.status = 1;
6813
6819
  data.errMsg = "";
6814
6820
  return data;
@@ -6817,6 +6823,7 @@ var checkStatus = function (response, options, Taro) {
6817
6823
  Taro.clearStorage(); // 清除token
6818
6824
  Taro.removeStorage({ key: 'ticket' });
6819
6825
  Taro.removeStorage({ key: 'user_id' });
6826
+ Taro.removeStorage({ key: 'openid' });
6820
6827
  data.status = 0;
6821
6828
  data.errMsg = "";
6822
6829
  return data;