登入页忘记密码
This commit is contained in:
@@ -413,6 +413,14 @@ export function deletePortal(siteId: string, portalId: string) {
|
||||
|
||||
|
||||
|
||||
/** 首页邮箱重置密码 */
|
||||
export function fetcodeReset(data:any) {
|
||||
return request({
|
||||
url: '/system/user/profile/forgotPwd',
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
1
src/typings/auto-imports.d.ts
vendored
1
src/typings/auto-imports.d.ts
vendored
@@ -153,6 +153,7 @@ declare global {
|
||||
const fetchTerminalList: typeof import('../service/api/auth')['fetchTerminalList']
|
||||
const fetchWlanGroups: typeof import('../service/api/auth')['fetchWlanGroups']
|
||||
const fetchWlanSsidList: typeof import('../service/api/auth')['fetchWlanSsidList']
|
||||
const fetcodeReset: typeof import('../service/api/auth')['fetcodeReset']
|
||||
const filterAuthRoutesByRoles: typeof import('../store/modules/route/shared')['filterAuthRoutesByRoles']
|
||||
const filterTabsById: typeof import('../store/modules/tab/shared')['filterTabsById']
|
||||
const filterTabsByIds: typeof import('../store/modules/tab/shared')['filterTabsByIds']
|
||||
|
||||
@@ -36,15 +36,26 @@ const rules = computed<RuleRecord>(() => {
|
||||
//phone: formRules.phone,
|
||||
email:formRules.email,
|
||||
code:formRules.code,
|
||||
password: formRules.pwd,
|
||||
password: formRules.userPwd,
|
||||
confirmPassword: createConfirmPwdRule(model.password)
|
||||
};
|
||||
});
|
||||
|
||||
async function handleSubmit() {
|
||||
await validate();
|
||||
// request to reset password
|
||||
// await validate();
|
||||
// // request to reset password
|
||||
// $message?.success(t('page.login.common.validateSuccess'));
|
||||
await validate();//验证表单内容
|
||||
const { error } = await fetcodeReset({
|
||||
email: model.email,
|
||||
code: model.code,
|
||||
password: model.password
|
||||
});
|
||||
if(!error){
|
||||
$message?.success(t('page.login.common.validateSuccess'));
|
||||
toggleLoginModule('pwd-login');
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user