1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| import { $t } from '@/utils'
|
| /** 默认实例的Aixos配置 */
| export const DEFAULT_ALOVA_OPTIONS = {
| // 请求超时时间,默认15秒
| timeout: 15 * 1000,
| }
|
| /** 默认实例的后端字段配置 */
| export const DEFAULT_BACKEND_OPTIONS = {
| codeKey: 'code',
| dataKey: 'data',
| msgKey: 'message',
| successCode: 200,
| }
|
| /** 请求不成功各种状态的错误 */
| export const ERROR_STATUS = {
| default: $t('http.defaultTip'),
| 400: $t('http.400'),
| 401: $t('http.401'),
| 403: $t('http.403'),
| 404: $t('http.404'),
| 405: $t('http.405'),
| 408: $t('http.408'),
| 500: $t('http.500'),
| 501: $t('http.501'),
| 502: $t('http.502'),
| 503: $t('http.503'),
| 504: $t('http.504'),
| 505: $t('http.505'),
| }
|
| /** 没有错误提示的code */
| export const ERROR_NO_TIP_STATUS = [10000]
|
|