fix: axios bug

This commit is contained in:
xingyu
2022-08-03 16:01:06 +08:00
parent a9c9007337
commit 3ca9eaf294
5 changed files with 13 additions and 34 deletions

View File

@ -1,10 +1,5 @@
const config: {
base_url: {
base: string
dev: string
pro: string
test: string
}
base_url: string
result_code: number | string
default_headers: AxiosHeaders
request_timeout: number
@ -12,20 +7,7 @@ const config: {
/**
* api请求基础路径
*/
base_url: {
// 开发环境接口前缀
base: '',
// 打包开发环境接口前缀
dev: '',
// 打包生产环境接口前缀
pro: '',
// 打包测试环境接口前缀
test: ''
},
base_url: import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL,
/**
* 接口成功返回状态码
*/