Prechádzať zdrojové kódy

feature_20250829_手机号验证优化

zhujindu 3 mesiacov pred
rodič
commit
a9c1d4eead

+ 4 - 4
src/views/deviceWithin/addStoreVisit.vue

@@ -3556,7 +3556,7 @@ export default {
       return Math.round((arrtime2 - arrtime1) / 1000);
     },
     telFn(val) {
-      if (!/^1[3456789]\d{9}$/.test(val.answerValue) && val.answerValue != '') {
+      if (!/^1[123456789]\d{9}$/.test(val.answerValue) && val.answerValue != '') {
         this.$toast(val.collectionName + '格式错误');
       }
     },
@@ -3568,7 +3568,7 @@ export default {
         answerValue = val.answerValue;
       }
 
-      if (!/^1[3456789]\d{9}$/.test(answerValue) || answerValue == '') {
+      if (!/^1[123456789]\d{9}$/.test(answerValue) || answerValue == '') {
         this.$toast(val.collectionName + '格式错误');
         return;
       }
@@ -5153,7 +5153,7 @@ export default {
         formData.collectionAnswers.forEach((item) => {
           if (
             item.answerType == 'tel' &&
-            !/^1[3456789]\d{9}$/.test(item.answerValue) &&
+            !/^1[123456789]\d{9}$/.test(item.answerValue) &&
             item.answerValue != ''
           ) {
             telVerify = false;
@@ -5218,7 +5218,7 @@ export default {
         answerValue = val.answerValue;
       }
 
-      if (!/^1[3456789]\d{9}$/.test(answerValue) || answerValue == '') {
+      if (!/^1[123456789]\d{9}$/.test(answerValue) || answerValue == '') {
         this.$toast(val.collectionName + '格式错误');
         return;
       }

+ 2 - 2
src/views/deviceWithin/addStoreVisit111.vue

@@ -3243,7 +3243,7 @@ export default {
       return Math.round((arrtime2 - arrtime1) / 1000);
     },
     telFn(val) {
-      if (!/^1[3456789]\d{9}$/.test(val.answerValue) && val.answerValue != '') {
+      if (!/^1[123456789]\d{9}$/.test(val.answerValue) && val.answerValue != '') {
         this.$toast(val.collectionName + '格式错误');
       }
     },
@@ -4769,7 +4769,7 @@ export default {
         formData.collectionAnswers.forEach((item) => {
           if (
             item.answerType == 'tel' &&
-            !/^1[3456789]\d{9}$/.test(item.answerValue) &&
+            !/^1[123456789]\d{9}$/.test(item.answerValue) &&
             item.answerValue != ''
           ) {
             telVerify = false;

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1910 - 1640
src/views/deviceWithin/addStoreVisitP.vue


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1635 - 1464
src/views/deviceWithin/addStoreVisitd.vue


+ 4 - 4
src/views/storeManagement/JPattributeEditor.vue

@@ -165,7 +165,7 @@ export default {
       });
     },
     sendCodeTelFn(tel) {
-      if (!/^1[3456789]\d{9}$/.test(tel) || tel == '') {
+      if (!/^1[123456789]\d{9}$/.test(tel) || tel == '') {
         this.$toast('格式错误');
         return;
       }
@@ -175,7 +175,7 @@ export default {
     },
     // 发送验证码
     sendCode(val) {
-      if (!/^1[3456789]\d{9}$/.test(val) || val == '') {
+      if (!/^1[123456789]\d{9}$/.test(val) || val == '') {
         this.$toast('格式错误');
         return;
       }
@@ -253,7 +253,7 @@ export default {
         return;
       }
       if (this.detail.emergencyContactMobile != '') {
-        if (!/^1[3456789]\d{9}$/.test(this.detail.emergencyContactMobile)) {
+        if (!/^1[123456789]\d{9}$/.test(this.detail.emergencyContactMobile)) {
           this.$toast('紧急联系人电话格式错误');
           return;
         }
@@ -273,7 +273,7 @@ export default {
       });
     },
     emergencyContactBlur(val) {
-      if (!/^1[3456789]\d{9}$/.test(val)) {
+      if (!/^1[123456789]\d{9}$/.test(val)) {
         this.$toast('紧急联系人电话格式错误');
       }
     },