This commit is contained in:
2025-06-13 11:25:24 +08:00
parent 85d4d412ba
commit 3929c639e5
9 changed files with 121 additions and 20 deletions

View File

@@ -4,7 +4,7 @@ import XNav from "../../components/XNav.vue";
import XLink from "../../components/XLink.vue";
import XInput from "../../components/XInput.vue";
import Api from "../../api/index.js";
import {backPage, showToast} from "../../utils/uils.js";
import {backPage, showToast, verifyForm} from "../../utils/uils.js";
import SendMsg from "../../components/SendMsg.vue";
const form = reactive({
@@ -12,8 +12,28 @@ const form = reactive({
captcha: null,
password: null,
});
const rules = {
mobile: {
reg: /^1[3-9]\d{9}$/,
title: '手机号',
msg: '手机号错误',
required: true,
},
captcha: {
reg: /^\d{6}$/,
title: '验证码',
msg: '验证码错误',
required: true,
},
password: {
title: '密码',
msg: '密码错误',
required: true,
}
}
const success = async () => {
verifyForm(form, rules);
const {msg} = await Api.system.editPassword(form);
showToast(msg);
backPage();