@zyzgroup/core-web 0.1.61 → 0.1.63
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/zyzgroup_core_web.iife.js +1 -1
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +8 -4
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +1 -1
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/axios.d.ts +4 -3
- package/types/axios.d.ts.map +1 -1
|
@@ -3186,8 +3186,8 @@ class hc {
|
|
|
3186
3186
|
(e) => (this.canceler.pendingRequest(e), t?.interceptor?.request?.(e), e),
|
|
3187
3187
|
(e) => (this.canceler.cancelRequest(e.config), t?.interceptor?.requestError?.(e), e)
|
|
3188
3188
|
), this.instance.interceptors.response.use(
|
|
3189
|
-
(e) => (this.canceler.confirmRequest(e.config), t?.interceptor?.response?.(e), e),
|
|
3190
|
-
(e) => (t?.interceptor?.responseError?.(e), e)
|
|
3189
|
+
(e) => (this.canceler.confirmRequest(e.config), t?.interceptor?.response?.(e), e.status == 200 ? Promise.resolve(e) : Promise.reject(e)),
|
|
3190
|
+
(e) => (this.canceler.cancelRequest(e.config), t?.interceptor?.responseError?.(e), Promise.reject(e.response))
|
|
3191
3191
|
);
|
|
3192
3192
|
}
|
|
3193
3193
|
// @Cache(60000)
|
|
@@ -3195,6 +3195,10 @@ class hc {
|
|
|
3195
3195
|
request(t) {
|
|
3196
3196
|
return this.instance.request(t);
|
|
3197
3197
|
}
|
|
3198
|
+
// this.request() 请求后未返回前,可取消请求
|
|
3199
|
+
cancel(t) {
|
|
3200
|
+
this.canceler.cancelRequest(t);
|
|
3201
|
+
}
|
|
3198
3202
|
get(t, e) {
|
|
3199
3203
|
return this.request({ ...e, method: "get", url: t });
|
|
3200
3204
|
}
|
|
@@ -3239,8 +3243,8 @@ class gd {
|
|
|
3239
3243
|
this.pendingRequestMap = /* @__PURE__ */ new Map();
|
|
3240
3244
|
}
|
|
3241
3245
|
getRequestId(t) {
|
|
3242
|
-
const {
|
|
3243
|
-
return va({
|
|
3246
|
+
const { method: e, url: s, params: r, data: i } = t;
|
|
3247
|
+
return va({ method: e, url: s, params: r, data: i });
|
|
3244
3248
|
}
|
|
3245
3249
|
pendingRequest(t) {
|
|
3246
3250
|
const e = this.getRequestId(t);
|