yxuse 3.0.33 → 3.0.36
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/lib/index.cjs2.js +11 -11
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs5.js +1 -1
- package/lib/index.cjs7.js +3 -3
- package/lib/index.cjs7.js.gz +0 -0
- package/lib/index.es2.js +597 -589
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es5.js +16 -16
- package/lib/index.es7.js +251 -245
- package/lib/index.es7.js.gz +0 -0
- package/lib/index.es8.js +7 -1
- package/package.json +1 -1
- package/types/utils/http/index.d.ts +13 -5
package/lib/index.es7.js.gz
CHANGED
|
Binary file
|
package/lib/index.es8.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { h as o, U as s } from "./index.es7.js";
|
|
2
|
-
const r = (e, t) => o.post(`${s.ttc.INTEGRATED_BASE_URL}/file/upload`, e, t), i = () => o.get(
|
|
2
|
+
const r = (e, t) => o.post(`${s.ttc.INTEGRATED_BASE_URL}/file/upload`, e, t), i = () => o.get(
|
|
3
|
+
`${s.ttc.INTEGRATED_BASE_URL}/resource/group/list`,
|
|
4
|
+
{},
|
|
5
|
+
{
|
|
6
|
+
headers: { noLoading: !0 }
|
|
7
|
+
}
|
|
8
|
+
), a = (e, t) => o.get(`${s.ttc.INTEGRATED_BASE_URL}/resource/file/list/${t}/${e}`, {}, { headers: { noLoading: !0 } }), c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
9
|
__proto__: null,
|
|
4
10
|
getGroupListApi: i,
|
|
5
11
|
getResourceListApi: a,
|
package/package.json
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { AxiosInstance, AxiosRequestConfig } from "axios";
|
|
2
|
+
interface CustomAxiosRequestConfig extends AxiosRequestConfig {
|
|
3
|
+
/** 自定义响应处理 */
|
|
4
|
+
customResHandler?: (res: any) => void;
|
|
5
|
+
}
|
|
2
6
|
declare class YxHttp {
|
|
3
7
|
service: AxiosInstance;
|
|
4
|
-
|
|
8
|
+
/** 自定义响应处理map */
|
|
9
|
+
customResMap: {
|
|
10
|
+
[key: string]: Function;
|
|
11
|
+
};
|
|
12
|
+
constructor(config: CustomAxiosRequestConfig);
|
|
5
13
|
private setupInterceptors;
|
|
6
14
|
private handleOverdueResponse;
|
|
7
15
|
private handleErrorResponse;
|
|
@@ -12,7 +20,7 @@ declare class YxHttp {
|
|
|
12
20
|
* @param options : AxiosRequestConfig
|
|
13
21
|
* @description get 请求
|
|
14
22
|
*/
|
|
15
|
-
get<T = any>(url: string, params?: object, options?:
|
|
23
|
+
get<T = any>(url: string, params?: object, options?: CustomAxiosRequestConfig): Promise<T>;
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @param url
|
|
@@ -20,21 +28,21 @@ declare class YxHttp {
|
|
|
20
28
|
* @param options : AxiosRequestConfig
|
|
21
29
|
* @description post 请求
|
|
22
30
|
*/
|
|
23
|
-
post<T = any>(url: string, params?: object, options?:
|
|
31
|
+
post<T = any>(url: string, params?: object, options?: CustomAxiosRequestConfig): Promise<T>;
|
|
24
32
|
/**
|
|
25
33
|
*
|
|
26
34
|
* @param url
|
|
27
35
|
* @param params
|
|
28
36
|
* @param options : AxiosRequestConfig
|
|
29
37
|
*/
|
|
30
|
-
put<T = any>(url: string, params?: object, options?:
|
|
38
|
+
put<T = any>(url: string, params?: object, options?: CustomAxiosRequestConfig): Promise<T>;
|
|
31
39
|
/**
|
|
32
40
|
*
|
|
33
41
|
* @param url
|
|
34
42
|
* @param params
|
|
35
43
|
* @param options : AxiosRequestConfig
|
|
36
44
|
*/
|
|
37
|
-
delete<T = any>(url: string, params?: any, options?:
|
|
45
|
+
delete<T = any>(url: string, params?: any, options?: CustomAxiosRequestConfig): Promise<T>;
|
|
38
46
|
}
|
|
39
47
|
declare const _default: YxHttp;
|
|
40
48
|
export default _default;
|