From e79642a8b809de93ac85f021545f5889c48b5d90 Mon Sep 17 00:00:00 2001 From: ideal Date: Thu, 24 Apr 2025 19:13:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8H5=E4=BB=A3=E7=90=86=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E7=8E=AF=E5=A2=83=E4=B8=8B=EF=BC=8C=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interceptors/request.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interceptors/request.ts b/src/interceptors/request.ts index 1f84b31..63ea3e0 100644 --- a/src/interceptors/request.ts +++ b/src/interceptors/request.ts @@ -31,7 +31,8 @@ const httpInterceptor = { // #ifdef H5 // console.log(__VITE_APP_PROXY__) if (JSON.parse(__VITE_APP_PROXY__)) { - // 啥都不需要做 + // 自动拼接代理前缀 + options.url = import.meta.env.VITE_APP_PROXY_PREFIX + options.url } else { options.url = baseUrl + options.url }