feat: 新增找回密码功能
This commit is contained in:
@@ -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 },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import request from "@/config/axios/service";
|
||||
|
||||
/**
|
||||
* 用户登录
|
||||
* @param {*} data 账号密码
|
||||
@@ -23,6 +22,17 @@ export function userRegister(data) {
|
||||
data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 用户找回密码
|
||||
* @param {*} data 账号密码
|
||||
*/
|
||||
export function userRetrievePassword(data) {
|
||||
return request({
|
||||
url: `/account/retrieve-password`,
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户详细信息
|
||||
@@ -44,15 +54,6 @@ export function userLogout() {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取验证码
|
||||
*/
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
url: `/account/captcha-image`,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取短信验证码
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user