From b0635bf166b3d5093aa75a69e4338d731f17aab3 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Sun, 10 Nov 2024 11:09:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=2011.1?= =?UTF-8?q?0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts | 2 ++ .../views/system/loginmini/MiniRegister4faren.vue | 13 +++++++++---- .../system/loginmini/MiniRegister4shenbaoren.vue | 15 ++++++++++----- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts b/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts index c289061..127cd9f 100644 --- a/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts +++ b/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts @@ -92,10 +92,12 @@ export default { inputCodePlaceholder: '请输入验证码', smsPlaceholder: '请输入验证码', mobilePlaceholder: '请输入手机号码', + mobilePlaceholderNotReg: '手机号格式不对', mobileCorrectPlaceholder: '请输入正确的手机号码', policyPlaceholder: '勾选后才能注册', diffPwd: '两次输入密码不一致', selectorgPlaceholder: '请选择所属单位', + selectorgPlaceholder4Kejiju: '请选择科技主管部门', realNamePlaceholder: '请输入姓名', workNoPlaceholder: '请输入工号', diff --git a/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue b/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue index a6484e2..c233f3e 100644 --- a/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue +++ b/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue @@ -3,9 +3,9 @@
-
+
@@ -41,7 +41,7 @@
- +
@@ -224,7 +224,7 @@ return; } if (!formData.department) { - createMessage.warn(t('sys.login.selectorgPlaceholder')); + createMessage.warn(t('sys.login.selectorgPlaceholder4Kejiju')); return; } if (!formData.username) { @@ -239,6 +239,11 @@ createMessage.warn(t('sys.login.passwordPlaceholder')); return; } + const phoneRegex = /^1[3-9]\d{9}$/; + if (!phoneRegex.test(formData.mobile)) { + createMessage.warn(t('sys.login.mobilePlaceholderNotReg')); + return; + } // if (!formData.workno) { // createMessage.warn(t('sys.login.passwordPlaceholder')); // return; diff --git a/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4shenbaoren.vue b/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4shenbaoren.vue index 5215e31..b3a2d24 100644 --- a/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4shenbaoren.vue +++ b/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4shenbaoren.vue @@ -3,13 +3,13 @@
-
+
- +
{{t('sys.login.registerButton4shenbaoren')}}
@@ -42,7 +42,7 @@
- +
@@ -229,13 +229,18 @@ return; } if (!formData.department) { - createMessage.warn(t('sys.login.selectorgPlaceholder')); + createMessage.warn(t('sys.login.selectorgPlaceholder4Kejiju')); return; } if (!formData.mobile) { createMessage.warn(t('sys.login.mobilePlaceholder')); return; } + const phoneRegex = /^1[3-9]\d{9}$/; + if (!phoneRegex.test(formData.mobile)) { + createMessage.warn(t('sys.login.mobilePlaceholderNotReg')); + return; + } if (!formData.password) { createMessage.warn(t('sys.login.passwordPlaceholder')); return; From fbeb5807a1efb08c6bf55d7907f67a5f2ac2428f Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Sun, 10 Nov 2024 11:17:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=2011.1?= =?UTF-8?q?0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts | 1 + .../views/system/loginmini/MiniRegister4faren.vue | 12 +++++++++--- .../system/loginmini/MiniRegister4shenbaoren.vue | 10 ++++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts b/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts index 127cd9f..4685ac2 100644 --- a/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts +++ b/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts @@ -89,6 +89,7 @@ export default { // placeholder accountPlaceholder: '请输入账号', passwordPlaceholder: '请输入密码', + passwordPlaceholderNotReg: '密码格式不对(包含字母(大小写)数字以及特殊字符,至少8位)', inputCodePlaceholder: '请输入验证码', smsPlaceholder: '请输入验证码', mobilePlaceholder: '请输入手机号码', diff --git a/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue b/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue index c233f3e..506adcf 100644 --- a/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue +++ b/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue @@ -235,13 +235,19 @@ createMessage.warn(t('sys.login.mobilePlaceholder')); return; } + const phoneRegex = /^1[3-9]\d{9}$/; + if (!phoneRegex.test(formData.mobile)) { + createMessage.warn(t('sys.login.mobilePlaceholderNotReg')); + return; + } if (!formData.password) { createMessage.warn(t('sys.login.passwordPlaceholder')); return; } - const phoneRegex = /^1[3-9]\d{9}$/; - if (!phoneRegex.test(formData.mobile)) { - createMessage.warn(t('sys.login.mobilePlaceholderNotReg')); + //包含字母(大小写)、数字以及特殊字符,并且有一定的长度要求,至少 8 位 + const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@#$%^&+=!])(?=.{8,})$/; + if (!passwordRegex.test(formData.password)) { + createMessage.warn(t('sys.login.passwordPlaceholderNotReg')); return; } // if (!formData.workno) { diff --git a/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4shenbaoren.vue b/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4shenbaoren.vue index b3a2d24..e3247dc 100644 --- a/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4shenbaoren.vue +++ b/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4shenbaoren.vue @@ -245,10 +245,12 @@ createMessage.warn(t('sys.login.passwordPlaceholder')); return; } - // if (!formData.workno) { - // createMessage.warn(t('sys.login.passwordPlaceholder')); - // return; - // } + //包含字母(大小写)、数字以及特殊字符,并且有一定的长度要求,至少 8 位 + const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@#$%^&+=!])(?=.{8,})$/; + if (!passwordRegex.test(formData.password)) { + createMessage.warn(t('sys.login.passwordPlaceholderNotReg')); + return; + } if (!formData.confirmPassword) { createMessage.warn(t('sys.login.confirmPassword')); return; From 3885b0326a22f3d09c557adecbada44860481e77 Mon Sep 17 00:00:00 2001 From: JayChou Date: Sun, 10 Nov 2024 11:17:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=2011.10=E9=97=A8=E6=88=B7=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jeecgboot-vue3/src/App.vue | 1 + jeecgboot-vue3/src/assets/images/bg.jpg | Bin 0 -> 48008 bytes .../src/router/guard/permissionGuard.ts | 11 +- .../main-home/components/NewsList/index.vue | 32 ++-- .../components/expertManagement/index.vue | 32 ++-- .../main-home/components/homePage/index.vue | 42 ++++- .../components/instrumentInfo/index.vue | 163 ++++++++++++------ .../main-home/components/newsInfo/index.vue | 2 +- .../components/projectDeclaration/index.vue | 2 +- .../src/views/demo/main-home/index.vue | 23 +-- 10 files changed, 209 insertions(+), 99 deletions(-) create mode 100644 jeecgboot-vue3/src/assets/images/bg.jpg diff --git a/jeecgboot-vue3/src/App.vue b/jeecgboot-vue3/src/App.vue index f0d8666..db52461 100644 --- a/jeecgboot-vue3/src/App.vue +++ b/jeecgboot-vue3/src/App.vue @@ -7,6 +7,7 @@ diff --git a/jeecgboot-vue3/src/views/demo/main-home/components/newsInfo/index.vue b/jeecgboot-vue3/src/views/demo/main-home/components/newsInfo/index.vue index d98209f..79f2100 100644 --- a/jeecgboot-vue3/src/views/demo/main-home/components/newsInfo/index.vue +++ b/jeecgboot-vue3/src/views/demo/main-home/components/newsInfo/index.vue @@ -1,7 +1,7 @@