From 09ee2efd8bc38d82aa01e2c0d77b84d398f606b2 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期四, 04 七月 2024 16:26:03 +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