|
|
|
@ -2,23 +2,23 @@ |
|
|
|
|
/* istanbul ignore file */ |
|
|
|
|
/* tslint:disable */ |
|
|
|
|
/* eslint-disable */ |
|
|
|
|
import type { ApiRequestOptions } from './ApiRequestOptions' |
|
|
|
|
// 引入设置token的方法
|
|
|
|
|
import { GET_TKOEN } from '@/utils/token' |
|
|
|
|
type Resolver<T> = (options: ApiRequestOptions) => Promise<T> |
|
|
|
|
type Headers = Record<string, string> |
|
|
|
|
import { GET_TKOEN } from '@/utils/token'; |
|
|
|
|
import type { ApiRequestOptions } from './ApiRequestOptions'; |
|
|
|
|
|
|
|
|
|
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>; |
|
|
|
|
type Headers = Record<string, string>; |
|
|
|
|
|
|
|
|
|
export type OpenAPIConfig = { |
|
|
|
|
BASE: string |
|
|
|
|
VERSION: string |
|
|
|
|
WITH_CREDENTIALS: boolean |
|
|
|
|
CREDENTIALS: 'include' | 'omit' | 'same-origin' |
|
|
|
|
TOKEN?: string | Resolver<string> | undefined |
|
|
|
|
USERNAME?: string | Resolver<string> | undefined |
|
|
|
|
PASSWORD?: string | Resolver<string> | undefined |
|
|
|
|
HEADERS?: Headers | Resolver<Headers> | undefined |
|
|
|
|
ENCODE_PATH?: ((path: string) => string) | undefined |
|
|
|
|
} |
|
|
|
|
BASE: string; |
|
|
|
|
VERSION: string; |
|
|
|
|
WITH_CREDENTIALS: boolean; |
|
|
|
|
CREDENTIALS: 'include' | 'omit' | 'same-origin'; |
|
|
|
|
TOKEN?: string | Resolver<string> | undefined; |
|
|
|
|
USERNAME?: string | Resolver<string> | undefined; |
|
|
|
|
PASSWORD?: string | Resolver<string> | undefined; |
|
|
|
|
HEADERS?: Headers | Resolver<Headers> | undefined; |
|
|
|
|
ENCODE_PATH?: ((path: string) => string) | undefined; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export const OpenAPI: OpenAPIConfig = { |
|
|
|
|
BASE: 'http://39.106.16.162:8080', |
|
|
|
@ -32,4 +32,4 @@ export const OpenAPI: OpenAPIConfig = { |
|
|
|
|
Authorization: 'Bearer ' + GET_TKOEN('TOKEN'), |
|
|
|
|
}, |
|
|
|
|
ENCODE_PATH: undefined, |
|
|
|
|
} |
|
|
|
|
} |