feat: 在H5代理请求环境下,拼接代理前缀
This commit is contained in:
parent
a5fc7b8160
commit
3737e6496b
@ -31,7 +31,8 @@ const httpInterceptor = {
|
|||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// console.log(__VITE_APP_PROXY__)
|
// console.log(__VITE_APP_PROXY__)
|
||||||
if (JSON.parse(__VITE_APP_PROXY__)) {
|
if (JSON.parse(__VITE_APP_PROXY__)) {
|
||||||
// 啥都不需要做
|
// 自动拼接代理前缀
|
||||||
|
options.url = import.meta.env.VITE_APP_PROXY_PREFIX + options.url
|
||||||
} else {
|
} else {
|
||||||
options.url = baseUrl + options.url
|
options.url = baseUrl + options.url
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user