fix: 严格按后端account字段修复记住账号

This commit is contained in:
2026-02-06 15:53:35 +08:00
parent c8b63cf0f5
commit a5080912b5
2 changed files with 9 additions and 11 deletions

View File

@@ -14,9 +14,8 @@ export namespace AuthApi {
/** 登录接口参数 */
export interface LoginParams {
account?: string;
password?: string;
username?: string;
account: string;
password: string;
}
/** 登录接口返回值 */
@@ -45,9 +44,8 @@ export namespace AuthApi {
* 登录
*/
export async function loginApi(data: AuthApi.LoginParams) {
const account = data.account ?? data.username;
return requestClient.post<AuthApi.LoginResult>('/auth/login', {
account,
account: data.account,
password: data.password,
});
}