fix: 微信登录 rbac 接口改走 api 绝对地址,修复 H5 OAuth 405
All checks were successful
Build and Deploy Front / deploy (push) Successful in 5m39s
All checks were successful
Build and Deploy Front / deploy (push) Successful in 5m39s
ideship.com 静态 nginx 不反代 POST /rbac/*,H5 授权回调会 405。
This commit is contained in:
parent
2a51677908
commit
bdb515d366
@ -72,7 +72,7 @@ export async function getWeChatOAuthConfig(): Promise<WxOAuthConfigResult> {
|
||||
|
||||
/** 查询扫码 key 是否已关联账号(轮询用,无值时不抛错) */
|
||||
export async function getWxLoginStatus(loginUuid: string): Promise<WxLoginStatusResult> {
|
||||
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<WxLoginStatusResult>(res.data);
|
||||
@ -92,13 +92,13 @@ export function isWxLoginPendingError(error: unknown): boolean {
|
||||
|
||||
/** 微信扫码登录轮询 */
|
||||
export async function wxLogin(loginUuid: string): Promise<WxLoginResult> {
|
||||
const res = await axiosInstance.post('/rbac/auth/wx-login', { loginUuid });
|
||||
const res = await axiosInstance.post(omsUrl('/rbac/auth/wx-login'), { loginUuid });
|
||||
return unwrapOrSelf<WxLoginResult>(res.data);
|
||||
}
|
||||
|
||||
/** 微信网页授权登录(H5 点按钮,无需扫码) */
|
||||
export async function wxOAuthLogin(code: string): Promise<WxLoginResult> {
|
||||
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<WxLoginResult>(res.data);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user