yunxi-request 0.3.5
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/README.md +94 -0
- package/package.json +15 -0
- package/src/index.ts +102 -0
- package/src/types.ts +23 -0
- package/types/index.d.ts +17 -0
- package/types/index.js +89 -0
- package/types/index.js.map +1 -0
- package/types/types.d.ts +18 -0
- package/types/types.js +2 -0
- package/types/types.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Crop / 裁剪
|
|
2
|
+
|
|
3
|
+
> Owner 徐绍平
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
yarn add @yunxi/request
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 创建 http 实例
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
const axiosOpts = {
|
|
15
|
+
baseURL:
|
|
16
|
+
import.meta.env.MODE === 'development' ? '/api' : <string>import.meta.env.VITE_APP_BASE_API,
|
|
17
|
+
timeout: 1000 * 10,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const handleRequest = (config: AxiosRequestConfig) => {
|
|
21
|
+
if (config.headers) {
|
|
22
|
+
config.headers.authorization = <string>storeHelper.get('y-token');
|
|
23
|
+
config.headers.source = '6';
|
|
24
|
+
}
|
|
25
|
+
return config;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// 创建 http实例
|
|
29
|
+
export const http = new HttpServer(axiosOpts, {
|
|
30
|
+
// debugger: true,
|
|
31
|
+
handleRequest,
|
|
32
|
+
errorHandle: async response => {
|
|
33
|
+
switch (response.code) {
|
|
34
|
+
case 401:
|
|
35
|
+
message.error('您未登录,或者登录已经超时,请先登录!');
|
|
36
|
+
await toLogin();
|
|
37
|
+
break;
|
|
38
|
+
case 500:
|
|
39
|
+
message.error('服务器内部错误!');
|
|
40
|
+
break;
|
|
41
|
+
default:
|
|
42
|
+
message.error(<string>response.msg || '请求出错,请检查');
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// 不走errorHandle 返回axios 原始数据
|
|
49
|
+
// 适用 特殊接口需要走自定义catch的逻辑
|
|
50
|
+
export const rawHttp = new HttpServer(axiosOpts, {
|
|
51
|
+
raw: true,
|
|
52
|
+
handleRequest,
|
|
53
|
+
});
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 接口调用
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { http, rawHttp } from '../http-server';
|
|
60
|
+
|
|
61
|
+
export function liveDecorationTempInfo(data: { templateId: string }) {
|
|
62
|
+
return http.get<ITempData>('/live/decorate/get-template', data);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function liveDecorationTempCreate(data: ITempData) {
|
|
66
|
+
return rawHttp.post('/live/decorate/create-template', data);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 配置
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
export type IErrorHandle = (args: IResponseData, response?: AxiosResponse) => void;
|
|
74
|
+
export type IHandleRequest = (config: AxiosRequestConfig) => void;
|
|
75
|
+
|
|
76
|
+
// 后端返回数据结构
|
|
77
|
+
export interface IResponseData<T = any> {
|
|
78
|
+
code: number;
|
|
79
|
+
data: T;
|
|
80
|
+
msg: string;
|
|
81
|
+
total: number;
|
|
82
|
+
trace: string;
|
|
83
|
+
statusCode?: number; // 老接口兼容
|
|
84
|
+
message?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// 自定义配置
|
|
88
|
+
export interface ICustomConfig {
|
|
89
|
+
raw?: boolean; // 是否返回axios 原始数据,不处理handleResponse
|
|
90
|
+
debugger?: boolean; // 是否开启 debugger 模式
|
|
91
|
+
errorHandle?: IErrorHandle; // 错误处理函数
|
|
92
|
+
handleRequest?: IHandleRequest;
|
|
93
|
+
}
|
|
94
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "yunxi-request",
|
|
3
|
+
"version": "0.3.5",
|
|
4
|
+
"description": "基于axios的请求库",
|
|
5
|
+
"author": "xushaoping <xusp@yunxi.tv>",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
"main": "lib/index.umd.js",
|
|
8
|
+
"module": "lib/index.es.js",
|
|
9
|
+
"typings": "types/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"lib",
|
|
12
|
+
"src",
|
|
13
|
+
"types"
|
|
14
|
+
]
|
|
15
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { IErrorHandle, IHandleRequest, IResponseData, ICustomConfig } from './types';
|
|
3
|
+
|
|
4
|
+
const defaultConfig: AxiosRequestConfig = {
|
|
5
|
+
baseURL: '',
|
|
6
|
+
method: 'get',
|
|
7
|
+
timeout: 1000 * 10,
|
|
8
|
+
withCredentials: false,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const defaultCustomConfig: ICustomConfig = {
|
|
12
|
+
raw: false,
|
|
13
|
+
errorHandle: undefined,
|
|
14
|
+
handleRequest: undefined,
|
|
15
|
+
debugger: false,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default class HttpServer {
|
|
19
|
+
private instance: AxiosInstance;
|
|
20
|
+
private readonly debugger: boolean | undefined;
|
|
21
|
+
|
|
22
|
+
constructor(options?: AxiosRequestConfig, customOptions?: ICustomConfig) {
|
|
23
|
+
const config = Object.assign(defaultConfig, options);
|
|
24
|
+
const customConfig = Object.assign(defaultCustomConfig, customOptions);
|
|
25
|
+
this.instance = axios.create(config);
|
|
26
|
+
this.debugger = customOptions?.debugger;
|
|
27
|
+
|
|
28
|
+
if (customConfig.handleRequest) {
|
|
29
|
+
this.handleRequest(customConfig.handleRequest);
|
|
30
|
+
}
|
|
31
|
+
if (!customConfig.raw && customConfig.errorHandle) {
|
|
32
|
+
this.handleResponse(customConfig.errorHandle);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
private handleRequest(handle: IHandleRequest) {
|
|
37
|
+
this.instance.interceptors.request.use(
|
|
38
|
+
config => {
|
|
39
|
+
if (this.debugger) {
|
|
40
|
+
console.log('请求 config 打印', config);
|
|
41
|
+
}
|
|
42
|
+
return handle(config);
|
|
43
|
+
},
|
|
44
|
+
error => {
|
|
45
|
+
return Promise.reject(error);
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
private handleResponse(errorHandle: IErrorHandle) {
|
|
51
|
+
// 响应请求的拦截器
|
|
52
|
+
this.instance.interceptors.response.use(
|
|
53
|
+
response => {
|
|
54
|
+
if (this.debugger) {
|
|
55
|
+
console.log('请求 response 打印', response);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// 请求 blob 时直接返回数据 ,不做拦截处理
|
|
59
|
+
if (response.request.responseType === 'blob') return response.data;
|
|
60
|
+
|
|
61
|
+
const data: IResponseData = response.data;
|
|
62
|
+
const code = data.code || data.statusCode;
|
|
63
|
+
if (code === 200) return data;
|
|
64
|
+
errorHandle(data, response);
|
|
65
|
+
return Promise.reject(data);
|
|
66
|
+
},
|
|
67
|
+
(error: Error) => {
|
|
68
|
+
const response: IResponseData = {
|
|
69
|
+
code: +error.message.slice(-3),
|
|
70
|
+
data: {},
|
|
71
|
+
msg: error.message,
|
|
72
|
+
total: 0,
|
|
73
|
+
trace: '',
|
|
74
|
+
};
|
|
75
|
+
errorHandle(response);
|
|
76
|
+
return Promise.reject(response);
|
|
77
|
+
},
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async get<T = any>(url: string, params?: any, config?: AxiosRequestConfig) {
|
|
82
|
+
return await this.instance.get<any, IResponseData<T>>(url, {
|
|
83
|
+
...config,
|
|
84
|
+
params: params,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async delete<T = any>(url: string, params?: any, config?: AxiosRequestConfig) {
|
|
89
|
+
return await this.instance.delete<any, IResponseData<T>>(url, {
|
|
90
|
+
...config,
|
|
91
|
+
params: params,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async post<T = any>(url: string, data?: any, config?: AxiosRequestConfig) {
|
|
96
|
+
return await this.instance.post<any, IResponseData<T>>(url, data, config);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async put<T = any>(url: string, data?: any, config?: AxiosRequestConfig) {
|
|
100
|
+
return await this.instance.put<any, IResponseData<T>>(url, data, config);
|
|
101
|
+
}
|
|
102
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
+
|
|
3
|
+
export type IErrorHandle = (args: IResponseData, response?: AxiosResponse) => void;
|
|
4
|
+
export type IHandleRequest = (config: AxiosRequestConfig) => void;
|
|
5
|
+
|
|
6
|
+
// 后端返回数据结构
|
|
7
|
+
export interface IResponseData<T = any> {
|
|
8
|
+
code: number;
|
|
9
|
+
data: T;
|
|
10
|
+
msg: string;
|
|
11
|
+
total: number;
|
|
12
|
+
trace: string;
|
|
13
|
+
statusCode?: number; // 老接口兼容
|
|
14
|
+
message?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// 自定义配置
|
|
18
|
+
export interface ICustomConfig {
|
|
19
|
+
raw?: boolean; // 是否返回axios 原始数据,不处理handleResponse
|
|
20
|
+
debugger?: boolean; // 是否开启 debugger 模式
|
|
21
|
+
errorHandle?: IErrorHandle; // 错误处理函数
|
|
22
|
+
handleRequest?: IHandleRequest;
|
|
23
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { IResponseData, ICustomConfig } from './types';
|
|
3
|
+
export default class HttpServer {
|
|
4
|
+
private instance;
|
|
5
|
+
private readonly debugger;
|
|
6
|
+
constructor(options?: AxiosRequestConfig, customOptions?: ICustomConfig);
|
|
7
|
+
private handleRequest;
|
|
8
|
+
private handleResponse;
|
|
9
|
+
get<T = any>(url: string, params?: any, config?: AxiosRequestConfig): Promise<IResponseData<T>>;
|
|
10
|
+
delete<T = any>(
|
|
11
|
+
url: string,
|
|
12
|
+
params?: any,
|
|
13
|
+
config?: AxiosRequestConfig,
|
|
14
|
+
): Promise<IResponseData<T>>;
|
|
15
|
+
post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<IResponseData<T>>;
|
|
16
|
+
put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<IResponseData<T>>;
|
|
17
|
+
}
|
package/types/index.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
const defaultConfig = {
|
|
3
|
+
baseURL: '',
|
|
4
|
+
method: 'get',
|
|
5
|
+
timeout: 1000 * 10,
|
|
6
|
+
withCredentials: false,
|
|
7
|
+
};
|
|
8
|
+
const defaultCustomConfig = {
|
|
9
|
+
raw: false,
|
|
10
|
+
errorHandle: undefined,
|
|
11
|
+
handleRequest: undefined,
|
|
12
|
+
debugger: false,
|
|
13
|
+
};
|
|
14
|
+
export default class HttpServer {
|
|
15
|
+
instance;
|
|
16
|
+
debugger;
|
|
17
|
+
constructor(options, customOptions) {
|
|
18
|
+
const config = Object.assign(defaultConfig, options);
|
|
19
|
+
const customConfig = Object.assign(defaultCustomConfig, customOptions);
|
|
20
|
+
this.instance = axios.create(config);
|
|
21
|
+
this.debugger = customOptions?.debugger;
|
|
22
|
+
if (customConfig.handleRequest) {
|
|
23
|
+
this.handleRequest(customConfig.handleRequest);
|
|
24
|
+
}
|
|
25
|
+
if (!customConfig.raw && customConfig.errorHandle) {
|
|
26
|
+
this.handleResponse(customConfig.errorHandle);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
handleRequest(handle) {
|
|
30
|
+
this.instance.interceptors.request.use(
|
|
31
|
+
config => {
|
|
32
|
+
if (this.debugger) {
|
|
33
|
+
console.log('请求 config 打印', config);
|
|
34
|
+
}
|
|
35
|
+
return handle(config);
|
|
36
|
+
},
|
|
37
|
+
error => {
|
|
38
|
+
return Promise.reject(error);
|
|
39
|
+
},
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
handleResponse(errorHandle) {
|
|
43
|
+
// 响应请求的拦截器
|
|
44
|
+
this.instance.interceptors.response.use(
|
|
45
|
+
response => {
|
|
46
|
+
if (this.debugger) {
|
|
47
|
+
console.log('请求 response 打印', response);
|
|
48
|
+
}
|
|
49
|
+
// 请求 blob 时直接返回数据 ,不做拦截处理
|
|
50
|
+
if (response.request.responseType === 'blob') return response.data;
|
|
51
|
+
const data = response.data;
|
|
52
|
+
const code = data.code || data.statusCode;
|
|
53
|
+
if (code === 200) return data;
|
|
54
|
+
errorHandle(data, response);
|
|
55
|
+
return Promise.reject(data);
|
|
56
|
+
},
|
|
57
|
+
error => {
|
|
58
|
+
const response = {
|
|
59
|
+
code: +error.message.slice(-3),
|
|
60
|
+
data: {},
|
|
61
|
+
msg: error.message,
|
|
62
|
+
total: 0,
|
|
63
|
+
trace: '',
|
|
64
|
+
};
|
|
65
|
+
errorHandle(response);
|
|
66
|
+
return Promise.reject(response);
|
|
67
|
+
},
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
async get(url, params, config) {
|
|
71
|
+
return await this.instance.get(url, {
|
|
72
|
+
...config,
|
|
73
|
+
params: params,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
async delete(url, params, config) {
|
|
77
|
+
return await this.instance.delete(url, {
|
|
78
|
+
...config,
|
|
79
|
+
params: params,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
async post(url, data, config) {
|
|
83
|
+
return await this.instance.post(url, data, config);
|
|
84
|
+
}
|
|
85
|
+
async put(url, data, config) {
|
|
86
|
+
return await this.instance.put(url, data, config);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/types/types.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
+
export declare type IErrorHandle = (args: IResponseData, response?: AxiosResponse) => void;
|
|
3
|
+
export declare type IHandleRequest = (config: AxiosRequestConfig) => void;
|
|
4
|
+
export interface IResponseData<T = any> {
|
|
5
|
+
code: number;
|
|
6
|
+
data: T;
|
|
7
|
+
msg: string;
|
|
8
|
+
total: number;
|
|
9
|
+
trace: string;
|
|
10
|
+
statusCode?: number;
|
|
11
|
+
message?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ICustomConfig {
|
|
14
|
+
raw?: boolean;
|
|
15
|
+
debugger?: boolean;
|
|
16
|
+
errorHandle?: IErrorHandle;
|
|
17
|
+
handleRequest?: IHandleRequest;
|
|
18
|
+
}
|
package/types/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|