mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 文件夹位置规范
This commit is contained in:
0
src/config/business/index.ts
Normal file
0
src/config/business/index.ts
Normal file
2
src/config/common/index.ts
Normal file
2
src/config/common/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './service';
|
||||
export * from './map-sdk';
|
9
src/config/common/map-sdk.ts
Normal file
9
src/config/common/map-sdk.ts
Normal file
@ -0,0 +1,9 @@
|
||||
/** 百度地图sdk地址 */
|
||||
export const BAIDU_MAP_SDK_URL =
|
||||
'https://api.map.baidu.com/getscript?v=3.0&ak=KSezYymXPth1DIGILRX3oYN9PxbOQQmU&services=&t=20210201100830&s=1';
|
||||
|
||||
/** 高德地图sdk地址 */
|
||||
export const GAODE_MAP_SDK_URL = 'https://webapi.amap.com/maps?v=2.0&key=e7bd02bd504062087e6563daf4d6721d';
|
||||
|
||||
/** 腾讯地图sdk地址 */
|
||||
export const TENCENT_MAP_SDK_URL = 'https://map.qq.com/api/gljs?v=1.exp&key=A6DBZ-KXPLW-JKSRY-ONZF4-CPHY3-K6BL7';
|
39
src/config/common/service.ts
Normal file
39
src/config/common/service.ts
Normal file
@ -0,0 +1,39 @@
|
||||
/** 请求超时时间 */
|
||||
export const REQUEST_TIMEOUT = 60 * 1000;
|
||||
|
||||
/** 错误信息的显示时间 */
|
||||
export const ERROR_MSG_DURATION = 3 * 1000;
|
||||
|
||||
/** 兜底的请求错误code */
|
||||
export const DEFAULT_REQUEST_ERROR_CODE = 'DEFAULT';
|
||||
/** 兜底的请求错误文本 */
|
||||
export const DEFAULT_REQUEST_ERROR_MSG = '请求错误~';
|
||||
|
||||
/** 请求超时的错误code(为固定值:ECONNABORTED) */
|
||||
export const REQUEST_TIMEOUT_CODE = 'ECONNABORTED';
|
||||
/** 请求超时的错误文本 */
|
||||
export const REQUEST_TIMEOUT_MSG = '请求超时~';
|
||||
|
||||
/** 网络不可用的code */
|
||||
export const NETWORK_ERROR_CODE = 'NETWORK_ERROR';
|
||||
/** 网络不可用的错误文本 */
|
||||
export const NETWORK_ERROR_MSG = '网络不可用~';
|
||||
|
||||
/** 请求不成功各种状态的错误 */
|
||||
export const ERROR_STATUS = {
|
||||
400: '400: 请求出现语法错误',
|
||||
401: '401: 用户未授权~',
|
||||
403: '403: 服务器拒绝访问~',
|
||||
404: '404: 请求的资源不存在~',
|
||||
405: '405: 请求方法未允许~',
|
||||
408: '408: 网络请求超时~',
|
||||
500: '500: 服务器内部错误~',
|
||||
501: '501: 服务器未实现请求功能~',
|
||||
502: '502: 错误网关~',
|
||||
503: '503: 服务不可用~',
|
||||
504: '504: 网关超时~',
|
||||
505: '505: http版本不支持该请求~'
|
||||
};
|
||||
|
||||
/** 不弹出错误信息的code */
|
||||
export const NO_ERROR_MSG_CODE: (string | number)[] = [];
|
1
src/config/index.ts
Normal file
1
src/config/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './common';
|
Reference in New Issue
Block a user