Explorar el Código

🐛♻ fix: phone empty error

chuzhixin hace 4 años
padre
commit
2f1ad39677
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      src/views/register/index.vue

+ 5 - 0
src/views/register/index.vue

@@ -164,6 +164,11 @@
     },
     methods: {
       getPhoneCode() {
+        if (!isPhone(this.form.phone)) {
+          //this.$baseMessage('请输入手机号', 'error')
+          this.$refs['registerForm'].validateField('phone')
+          return
+        }
         this.isGetphone = true
         let n = 60
         this.getPhoneIntval = setInterval(() => {