fix: 严格按后端account字段修复记住账号
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user