Преглед на файлове

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

luolei преди 5 години
родител
ревизия
cc201a1a81
променени са 1 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. 12 0
      src/components/Login.vue

+ 12 - 0
src/components/Login.vue

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