wangxy 1 месяц назад
Родитель
Сommit
06ce682686
1 измененных файлов с 6 добавлено и 6 удалено
  1. 6 6
      pages/chanpinMy/components/telDialog.vue

+ 6 - 6
pages/chanpinMy/components/telDialog.vue

@@ -212,16 +212,16 @@
 					toast('手机号不能为空')
 					return;
 				}
-				if (this.bindObj.yzmNumber === '') {
-					toast('验证码不能为空')
-					return;
-				}
-
-        if (this.bindObj.isDisabled) {
+        const phoneRegex = /^1[3-9]\d{9}$/;
+        if (!phoneRegex.test(this.bindObj.telNumber)) {
           toast('请输入正确的手机号!')
           return;
         }
 
+        if (this.bindObj.yzmNumber === '') {
+					toast('验证码不能为空')
+					return;
+				}
 				let req = {
 					tel: this.bindObj.telNumber,
 					code: this.bindObj.yzmNumber,