feat: 新增找回密码功能

This commit is contained in:
橙子
2024-10-04 00:00:44 +08:00
parent d7629763ef
commit 10e1fad7f3
21 changed files with 602 additions and 297 deletions

View File

@@ -18,6 +18,24 @@ export function login(username, password, code, uuid) {
});
}
//找回密码
export function retrievePassword(password, phone, code, uuid) {
const data = {
password,
phone,
code,
uuid,
};
return request({
url: "/account/retrieve-password",
headers: {
isToken: false,
},
method: "post",
data: data,
});
}
// 注册方法
export function register(userName, password, phone, code, uuid) {
const data = {
@@ -76,3 +94,15 @@ export function getCodePhone(phone) {
data: { phone },
});
}
// 获取短信验证码-为了重置密码
export function getCodePhoneForRetrievePassword(phone) {
return request({
url: "/account/captcha-phone/repassword",
headers: {
isToken: false,
},
method: "post",
timeout: 20000,
data: { phone },
});
}