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

@@ -5,28 +5,47 @@ import BulletChat from "../login/BulletChat.vue";
import XInput from "../../components/XInput.vue";
import SendMsg from "../../components/SendMsg.vue";
import Api from "../../api/index.js";
import {showToast, verifyForm} from "../../utils/uils.js";
import {showToast, toPage, verifyForm} from "../../utils/uils.js";
const form = reactive({
mobile: null,
wechat: null,
mobile: null,
captcha: null,
password: null,
invite: null,
});
const rules = {
wechat: {
reg: /^[a-zA-Z0-9_-]{1,19}$/,
msg: '微信号错误',
title: '微信号',
required: true,
},
mobile: {
reg: /^1[3-9]\d{9}$/,
msg: '手机号错误'
title: '手机号',
msg: '手机号错误',
required: true,
},
wechat: {}
captcha: {
reg: /^\d{6}$/,
title: '验证码',
msg: '验证码错误',
required: true,
},
password: {
title: '密码',
msg: '密码错误',
required: true,
}
};
const success = async () => {
verifyForm(form, rules);
const {msg} = await Api.system.register(form);
showToast(msg);
await toPage(`/pages/login/index?showWX=1`);
}
</script>