bug修复
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled

This commit is contained in:
FengHui
2026-05-26 17:06:53 +08:00
parent b7d7437c21
commit 7b38f5b96a
14 changed files with 20726 additions and 121 deletions

View File

@@ -0,0 +1,28 @@
import { request } from '@umijs/max';
export type SsoCodeLoginData = { token: string; lcToken: string };
export type SsoCodeLoginResult = {
code: number;
msg: string;
data: SsoCodeLoginData;
};
const ssoCodeLoginRequest = (url: string, code: string) =>
request<SsoCodeLoginResult>(url, {
method: 'POST',
headers: {
isToken: false,
'Content-Type': 'application/json',
},
data: { code },
});
/** 经办端POST /sso/pcms/code/login */
export async function getTjmhToken(code: string) {
return ssoCodeLoginRequest('/api/sso/pcms/code/login', code);
}
/** 互联网端POST /sso/pc/code/login */
export async function getWwTjmHlwToken(code: string) {
return ssoCodeLoginRequest('/api/sso/pc/code/login', code);
}