From e0a71526e0138a89f2dae838c36eaf9e99994a51 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期一, 01 七月 2024 16:27:46 +0800
Subject: [PATCH] 修改密码验证

---
 src/view/index.vue |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/view/index.vue b/src/view/index.vue
index b9ff928..04edcb4 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -600,13 +600,21 @@
         this.editVisible = true;
       },
       handleEdit(){
+        const reg2 =
+          /^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?\d)(?=.*?[~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?])[a-zA-Z\d~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?]*$/;
         if (!this.query.oldPassword) {
           this.$message.error('璇峰~鍐欐棫瀵嗙爜')
           return
+        }else if (!reg2.test(this.query.oldPassword)) {
+          this.$message.error('瀵嗙爜蹇呴』鍖呮嫭鏁板瓧銆佸ぇ灏忓啓瀛楁瘝浠ュ強鐗规畩瀛楃')
+            return
         }
         if (!this.query.newPassWord) {
           this.$message.error('璇峰~鍐欐棫瀵嗙爜')
           return
+        }else if (!reg2.test(this.query.newPassWord)) {
+          this.$message.error('瀵嗙爜蹇呴』鍖呮嫭鏁板瓧銆佸ぇ灏忓啓瀛楁瘝浠ュ強鐗规畩瀛楃')
+            return
         }
         this.$axios.post(this.$api.user.upUserPassword, {...this.query}).then(res => {
             if (res.code == 201) {

--
Gitblit v1.9.3