src\enums
下的文件
appEnum.ts
// menu theme enum
export enum ThemeEnum {
DARK = 'dark',
LIGHT = 'light',
}
cacheEnum.ts
// token key
export const TOKEN_KEY = 'TOKEN__';
// 存在LocalStorage中的国际化对象Key
export const LOCALE_KEY = 'LOCALE__';
// user info key
export const USER_INFO_KEY = 'USER__INFO__';
httpEnum.ts
/**
* @description: Request result set
*/
// http请求结果举类
export enum ResultEnum {
SUCCESS = 0,
ERROR = 1,
TIMEOUT = 401,
TYPE = 'success',
}
/**
* @description: request method
*/
// http请求类型
export enum RequestEnum {
GET = 'GET',
POST = 'POST',
PUT = 'PUT',
DELETE = 'DELETE',
}
/**
* @description: contentTyp
*/
// http请求的内容类型
export enum ContentTypeEnum {
// json
JSON = 'application/json;charset=UTF-8',
// form-data qs
FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8',
// form-data upload
FORM_DATA = 'multipart/form-data;charset=UTF-8',
}