2022-08-16 23:30:23 +08:00
|
|
|
|
export enum ResultEnum {
|
|
|
|
|
SUCCESS = 200,
|
|
|
|
|
ERROR = 500,
|
|
|
|
|
OVERDUE = 401,
|
2022-08-17 11:47:56 +08:00
|
|
|
|
FORBIDDEN = 403,
|
2022-09-05 16:25:26 +08:00
|
|
|
|
TIMEOUT = 100000,
|
2022-08-16 23:30:23 +08:00
|
|
|
|
TYPE = 'success',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @description:请求方法
|
|
|
|
|
*/
|
|
|
|
|
export enum RequestEnum {
|
|
|
|
|
GET = 'GET',
|
|
|
|
|
POST = 'POST',
|
|
|
|
|
PATCH = 'PATCH',
|
|
|
|
|
PUT = 'PUT',
|
|
|
|
|
DELETE = 'DELETE',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @description:常用的contentTyp类型
|
|
|
|
|
*/
|
|
|
|
|
export enum ContentTypeEnum {
|
|
|
|
|
// json
|
|
|
|
|
JSON = 'application/json;charset=UTF-8',
|
|
|
|
|
// text
|
|
|
|
|
TEXT = 'text/plain;charset=UTF-8',
|
|
|
|
|
// form-data 一般配合qs
|
|
|
|
|
FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8',
|
|
|
|
|
// form-data 上传
|
|
|
|
|
FORM_DATA = 'multipart/form-data;charset=UTF-8',
|
|
|
|
|
}
|