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