From bdb515d366e3784f3ada09d6fddde92c30f2d6bf Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Wed, 9 Sep 2026 16:16:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BE=AE=E4=BF=A1=E7=99=BB=E5=BD=95=20r?= =?UTF-8?q?bac=20=E6=8E=A5=E5=8F=A3=E6=94=B9=E8=B5=B0=20api=20=E7=BB=9D?= =?UTF-8?q?=E5=AF=B9=E5=9C=B0=E5=9D=80=EF=BC=8C=E4=BF=AE=E5=A4=8D=20H5=20O?= =?UTF-8?q?Auth=20405?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ideship.com 静态 nginx 不反代 POST /rbac/*,H5 授权回调会 405。 --- src/api/wechat/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/wechat/index.ts b/src/api/wechat/index.ts index f7150bf..e36049e 100644 --- a/src/api/wechat/index.ts +++ b/src/api/wechat/index.ts @@ -72,7 +72,7 @@ export async function getWeChatOAuthConfig(): Promise { /** 查询扫码 key 是否已关联账号(轮询用,无值时不抛错) */ export async function getWxLoginStatus(loginUuid: string): Promise { - const res = await axiosInstance.get('/rbac/auth/wx-login/status', { + const res = await axiosInstance.get(omsUrl('/rbac/auth/wx-login/status'), { params: { loginUuid }, }); return unwrapOrSelf(res.data); @@ -92,13 +92,13 @@ export function isWxLoginPendingError(error: unknown): boolean { /** 微信扫码登录轮询 */ export async function wxLogin(loginUuid: string): Promise { - const res = await axiosInstance.post('/rbac/auth/wx-login', { loginUuid }); + const res = await axiosInstance.post(omsUrl('/rbac/auth/wx-login'), { loginUuid }); return unwrapOrSelf(res.data); } /** 微信网页授权登录(H5 点按钮,无需扫码) */ export async function wxOAuthLogin(code: string): Promise { - const res = await axiosInstance.post('/rbac/auth/wx-oauth-login', { code }); + const res = await axiosInstance.post(omsUrl('/rbac/auth/wx-oauth-login'), { code }); return unwrapOrSelf(res.data); }