feat: 新增找回密码功能
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
userLogin,
|
||||
getUserDetailInfo,
|
||||
userLogout,
|
||||
userRegister,
|
||||
userRegister, userRetrievePassword,
|
||||
} from "@/apis/auth";
|
||||
const TokenKey = "AccessToken";
|
||||
export const AUTH_MENUS = "AUTH_MENUS";
|
||||
@@ -182,6 +182,20 @@ const currentUserInfo=computed(()=>{
|
||||
// }
|
||||
};
|
||||
|
||||
// 找回密码
|
||||
const retrievePasswordFun = async (params) => {
|
||||
// try {
|
||||
const {data}=await userRetrievePassword(params);
|
||||
ElMessage({
|
||||
message: `恭喜!账号:${data},找回成功!密码已重置,请登录!`,
|
||||
type: "success",
|
||||
duration: 8000
|
||||
});
|
||||
// } catch (error) {
|
||||
// console.log(error);
|
||||
// }
|
||||
};
|
||||
|
||||
return {
|
||||
getToken,
|
||||
setToken,
|
||||
@@ -189,6 +203,7 @@ const currentUserInfo=computed(()=>{
|
||||
loginFun,
|
||||
getUserInfo,
|
||||
logoutFun,
|
||||
retrievePasswordFun,
|
||||
clearStorage,
|
||||
registerFun,
|
||||
loginSuccess,
|
||||
|
||||
Reference in New Issue
Block a user