Ver código fonte

feature_20251009_金牌店档案填写校验

zhujindu 1 mês atrás
pai
commit
de471954f4
1 arquivos alterados com 34 adições e 26 exclusões
  1. 34 26
      src/views/storeManagement/JPattributeEditor.vue

+ 34 - 26
src/views/storeManagement/JPattributeEditor.vue

@@ -7,7 +7,7 @@
           class="sendCode"
           v-model="detail.ownerMobile"
           label="主经营者电话"
-          placeholder="请输入主经营者电话"
+          placeholder="为了不打扰金牌店老板,不再发生短信验证码,请务必确认手机号正确无误!"
           @blur="sendCodeTelFn(detail.ownerMobile)"
           type="tel">
           <template #button v-if="!verifyMobile">
@@ -15,19 +15,19 @@
               size="small"
               style="color: white; background: rgb(0, 87, 186); border-radius: 6px"
               @click="sendCode(detail.ownerMobile)"
-              :disabled="time != null">
-              <span v-if="time">已发送({{ timeNum }})</span>
-              <span v-else>发送验证码</span>
+              :disabled="telConfirm">
+              <span v-if="telConfirm">已确认</span>
+              <span v-else>确认真实</span>
             </van-button>
           </template>
         </van-field>
-        <van-field
+        <!-- <van-field
           v-model="verificationVal"
           label="主经营者收到的验证码"
           placeholder="请输入验证码"
           type="number"
           @blur="verification(verificationVal)"
-          v-if="!verifyMobile" />
+          v-if="!verifyMobile" /> -->
         <van-field v-model="detail.ownerName" :error-message="ownerNameMsg" label="主经营者姓名" />
         <van-field
           v-model="detail.ownerBirthday"
@@ -160,9 +160,11 @@ export default {
       currentDate: new Date(1945, 0, 1),
       mobileStatus: '0',
       verifyMobile: false, //手机号是否验证透通过
+      telConfirm: false,
     };
   },
   activated() {
+    this.telConfirm = false;
     this.ownerNameMsg = '';
     this.totalSalesAmountMsg = '';
     this.performanceRatioMsg = '';
@@ -216,6 +218,9 @@ export default {
       }
       if (tel != this.verificationPassedPhoneNum) {
         this.verifyMobile = false;
+      } else {
+        this.telConfirm = false;
+        this.verifyMobile = true;
       }
     },
     // 发送验证码
@@ -224,26 +229,29 @@ export default {
         this.$toast('格式错误');
         return;
       }
-      if (this.time) return;
-      clearInterval(this.time);
-      this.timeNum = 60;
-      this.sendCodeFun(
-        {
-          type: '1', //String	调用类型:1:发送验证码 2:校验验证码
-          phone: val, //String	手机号
-          verification: '', //String	手机号验证码
-        },
-        () => {
-          this.time = setInterval(() => {
-            this.timeNum--;
-            if (this.timeNum <= 0) {
-              clearInterval(this.time);
-              this.time = null;
-            }
-          }, 1000);
-          this.$toast('发送成功');
-        }
-      );
+      this.telConfirm = true;
+      this.verificationPassedPhoneNum = val;
+      this.$toast('验证成功');
+      // if (this.time) return;
+      // clearInterval(this.time);
+      // this.timeNum = 60;
+      // this.sendCodeFun(
+      //   {
+      //     type: '1', //String	调用类型:1:发送验证码 2:校验验证码
+      //     phone: val, //String	手机号
+      //     verification: '', //String	手机号验证码
+      //   },
+      //   () => {
+      //     this.time = setInterval(() => {
+      //       this.timeNum--;
+      //       if (this.timeNum <= 0) {
+      //         clearInterval(this.time);
+      //         this.time = null;
+      //       }
+      //     }, 1000);
+      //     this.$toast('发送成功');
+      //   }
+      // );
     },
     sendCodeFun(params, callback) {
       sendAndCheckVerCode(params).then((res) => {