Browse Source

登录验证错误后,设置allow为true

luolei 5 years ago
parent
commit
cc201a1a81
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/components/Login.vue

+ 12 - 0
src/components/Login.vue

@@ -88,6 +88,14 @@ export default {
   created(){
     this.code = this.$route.query.hospitalCode||''
   },
+  watch:{
+    value(){
+
+    },
+    patName(){
+
+    }
+  },
   methods: {
     close() {
       this.showTip = false;
@@ -149,21 +157,25 @@ export default {
           if (type == 102) {
             if (!jgpattern.test(value)) {//验证不通过
               this.defaultWaring("请输入正确的病历号");
+              this.allow = true
               return;
             }
           } else if (type == 101) {//身份证
             if (!identify.test(value)) {//验证不通过
               this.defaultWaring("请输入正确的身份证号");
+              this.allow = true
               return;
             }
           } else if (type == 104) {//市民卡号只能输入数字字母
             if (!jgpattern.test(value)||value.length!=9) {//验证不通过
               this.defaultWaring("请输入正确的9位市民卡号");
+              this.allow = true
               return;
             }
           }
           if(!this.code){
             this.defaultWaring("医院编码必填");
+            this.allow = true
             return;
           }
           const param = {