mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-12-05 21:47:55 +08:00
修复 axios baseURL 配置,解决构建后 baseURL 不生效的问题
This commit is contained in:
parent
07932329a0
commit
1b0389c1b5
@ -16,7 +16,7 @@ const toLogin = () => {
|
||||
}
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: import.meta.env.DEV && (import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL),
|
||||
baseURL: (import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true') ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
|
||||
timeout: 1000 * 60,
|
||||
responseType: 'json',
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user