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