uniapp-request-sdk 1.4.1 → 1.4.4

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 CHANGED
@@ -154,7 +154,7 @@ var UniRequest = /*#__PURE__*/function () {
154
154
  _this3.rejectHandler(rej, resData);
155
155
  }
156
156
  /** 针对小网关进行的处理,历史遗留问题,需要兼容 */
157
- } else if ('403' === statusCode && !requestedToken) {
157
+ } else if (403 === statusCode && !requestedToken) {
158
158
  // #ifndef H5
159
159
  (_this3.getTokenFun ? _this3.getTokenFun() : getToken(_this3.tokenEventName)).then(function (token) {
160
160
  _this3.token = token;
@@ -173,7 +173,7 @@ var UniRequest = /*#__PURE__*/function () {
173
173
  _this3.rejectHandler(rej, resData);
174
174
  // #endif
175
175
  /** 最新无权限处理方案,直接调用客户端logout事件,退出到登录页 */
176
- } else if ('401' === statusCode) {
176
+ } else if (401 === statusCode) {
177
177
  _this3.rejectHandler(rej, resData);
178
178
  uni.sendNativeEvent(EVENT_NAME.LOGOUT, {}, function () {
179
179
  console.log('用户无权限,调用logout事件,退出到登录页');
package/dist/index.umd.js CHANGED
@@ -160,7 +160,7 @@
160
160
  _this3.rejectHandler(rej, resData);
161
161
  }
162
162
  /** 针对小网关进行的处理,历史遗留问题,需要兼容 */
163
- } else if ('403' === statusCode && !requestedToken) {
163
+ } else if (403 === statusCode && !requestedToken) {
164
164
  // #ifndef H5
165
165
  (_this3.getTokenFun ? _this3.getTokenFun() : getToken(_this3.tokenEventName)).then(function (token) {
166
166
  _this3.token = token;
@@ -179,7 +179,7 @@
179
179
  _this3.rejectHandler(rej, resData);
180
180
  // #endif
181
181
  /** 最新无权限处理方案,直接调用客户端logout事件,退出到登录页 */
182
- } else if ('401' === statusCode) {
182
+ } else if (401 === statusCode) {
183
183
  _this3.rejectHandler(rej, resData);
184
184
  uni.sendNativeEvent(EVENT_NAME.LOGOUT, {}, function () {
185
185
  console.log('用户无权限,调用logout事件,退出到登录页');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniapp-request-sdk",
3
- "version": "1.4.1",
3
+ "version": "1.4.4",
4
4
  "description": "用于uniapp小程序的请求库的sdk",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": " dist/index.esm.js",