✨ scan the QR code to log in on the WeChat public account
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {service} from "@/utils/alova/service.ts";
|
||||
import {PhoneLogin} from "@/types/user";
|
||||
import {AccountLogin, PhoneLogin, ResetPassword} from "@/types/user";
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
@@ -64,3 +64,38 @@ export const phoneLoginApi = (param: PhoneLogin) => {
|
||||
}
|
||||
);
|
||||
};
|
||||
/**
|
||||
* 账号登录
|
||||
* @param param
|
||||
*/
|
||||
export const accountLoginApi = (param: AccountLogin) => {
|
||||
return service.Post('/api/user/login', {
|
||||
account: param.account,
|
||||
password: param.password,
|
||||
},
|
||||
{
|
||||
meta: {
|
||||
ignoreToken: true,
|
||||
authRole: 'login'
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
/**
|
||||
* 重置密码
|
||||
* @param param
|
||||
*/
|
||||
export const resetPasswordApi = (param: ResetPassword) => {
|
||||
return service.Post('/api/user/reset_password', {
|
||||
phone: param.phone,
|
||||
captcha: param.captcha,
|
||||
password: param.password,
|
||||
repassword: param.repassword
|
||||
},
|
||||
{
|
||||
meta: {
|
||||
ignoreToken: true,
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user