From b40c10e3dad22cdb88d02db8abffeb8663618ae0 Mon Sep 17 00:00:00 2001 From: xy <2115269706@qq.com> Date: Fri, 14 Mar 2025 16:26:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=A0=A1=E9=AA=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/loginPage.vue | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/layout/loginPage.vue b/src/layout/loginPage.vue index f19287d..e11e5c8 100644 --- a/src/layout/loginPage.vue +++ b/src/layout/loginPage.vue @@ -35,7 +35,7 @@
+ placeholder="请输入密码" show-password>
@@ -51,7 +51,7 @@
+ placeholder="请再次输入密码" show-password>
@@ -83,11 +83,11 @@
+ v-model="formModel.clssid" />
- +
@@ -104,7 +104,7 @@
- +
@@ -268,7 +268,7 @@ const formModel = ref({ password: "", repassword: "", name: "", - department: '', + clssid: '', studentNumb: "", mobile: '', captcha: "", @@ -280,14 +280,15 @@ const getFacultiesList = async (data: any) => { console.log(res, 'res11') FacultiesList.value = res.result } +const deepValues = ref([]) // 配置部门级联选择器 const props = { lazy: true, checkStrictly: true, emitPath: false, async lazyLoad(node: any, resolve: any) { - // console.log(node); - + console.log(node); + deepValues.value = node.pathValues await getFacultiesList({ primaryType: node.level + 1, pid: node.value, @@ -319,7 +320,7 @@ const rules = { { min: 5, max: 11, - message: "学号长度最小五位最大三十位", + message: "学号长度最小五位最大十一位", trigger: ["change", "blur"], }, ], @@ -352,12 +353,20 @@ const rules = { trigger: "blur", }, ], + mobile:[ + { required: true, message: "请输入手机号", trigger: "blur" }, + { + pattern: /^1[3-9]\d{9}$/, + message: "手机号长度最小六位最大十五位", + trigger: ["change", "blur"], + }, + ] }; const register = async () => { await formRef.value.validate(); console.log("开始注册请求"); let data = { - department: formModel.value.department, + clssid: formModel.value.clssid, mobile: formModel.value.mobile, captcha: formModel.value.captcha, checkKey: 1629428467008, @@ -365,6 +374,7 @@ const register = async () => { username: formModel.value.username, realname: formModel.value.name, workno: formModel.value.studentNumb, + depid: deepValues.value.splice(0, 2).join(',') }; const res: any = await sturegister(data) if (res.code === 200) {