Procházet zdrojové kódy

密码规则校验修改

yuhan před 2 měsíci
rodič
revize
433c7a2000

+ 16 - 14
src/views/module_interLock/systemUser/modules/SystemUserForm.vue

@@ -148,8 +148,10 @@ import { postAction } from '../../../../api/manage'
           ],
           password: [
             { required: true,
-              pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,20}$/,
-              message: '密码由8位数字、大小写字母和特殊符号组成!' },
+              pattern:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,20}$/,
+              // pattern:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,20}$/,
+              // pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,20}$/,
+              message: '密码由8-20位数字、大小写字母和特殊符号组成!' },
             { validator: this.validateToNextPassword,trigger: 'change' }
           ],
           confirmpassword: [
@@ -237,19 +239,19 @@ import { postAction } from '../../../../api/manage'
       },
       handleBlur(){
         // 本地测试
-        // if(this.model.usernameNormal === 'asd'){
-        //   this.model.isExistSSO = false
-        // } else {
-        //   this.model.isExistSSO = true
-        // }
+        if(this.model.usernameNormal === 'asd'){
+          this.model.isExistSSO = true
+        } else {
+          this.model.isExistSSO = false
+        }
         // 判断sso中是否有当前账户
-        postAction('/iotedgeCollectData/iotedgeCollectData/ifUserInSoo', {userName: this.model.usernameNormal}).then(res => {
-          if(res.success){
-            this.model.isExistSSO = res.result
-          } else {
-            this.$message.warning(res.message)
-          }
-        })
+        // postAction('/iotedgeCollectData/iotedgeCollectData/ifUserInSoo', {userName: this.model.usernameNormal}).then(res => {
+        //   if(res.success){
+        //     this.model.isExistSSO = res.result
+        //   } else {
+        //     this.$message.warning(res.message)
+        //   }
+        // })
       },
       // 新增
       async add () {