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.esm.js +7 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +7 -0
- package/dist/index.umd.js.map +1 -1
- package/package.json +6 -1
- package/.babelrc +0 -9
- package/rollup.config.js +0 -71
- package/src/config/index.ts +0 -8
- package/src/global.d.ts +0 -56
- package/src/index.ts +0 -31
- package/src/utils/instance.ts +0 -48
- package/src/utils/request.ts +0 -124
- package/tsconfig.build.json +0 -28
- package/tsconfig.json +0 -32
- package/tsconfig.rollup.json +0 -30
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;
|