update
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user