浏览代码

:recycle: Refactoring code. 数字计算验证码

冷冷 5 年之前
父节点
当前提交
fb175201bd
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. 1 1
      src/page/login/codelogin.vue
  2. 1 2
      src/page/login/userlogin.vue

+ 1 - 1
src/page/login/codelogin.vue

@@ -110,7 +110,7 @@ export default {
       const time = setInterval(() => {
         this.msgTime--
         this.msgText = MSGSCUCCESS.replace('${time}', this.msgTime)
-        if (this.msgTime == 0) {
+        if (this.msgTime === 0) {
           this.msgTime = MSGTIME
           this.msgText = MSGINIT
           this.msgKey = false

+ 1 - 2
src/page/login/userlogin.vue

@@ -113,8 +113,7 @@ export default {
           { min: 6, message: '密码长度最少为6位', trigger: 'blur' }
         ],
         code: [
-          { required: true, message: '请输入验证码', trigger: 'blur' },
-          { min: 4, max: 4, message: '验证码长度为4位', trigger: 'blur' }
+          { required: true, message: '请输入验证码', trigger: 'blur' }
         ]
       },
       passwordType: 'password'