|
|
@@ -187,14 +187,15 @@
|
|
|
v-model="item.answerValue"
|
|
|
:placeholder="item.text"
|
|
|
type="tel"
|
|
|
- @blur="telFn(item, index, 'A')">
|
|
|
- <template #button>
|
|
|
+ @blur="sendCodeTelFn(item, index, 'A')">
|
|
|
+ <template #button v-if="!verifyMobile">
|
|
|
<van-button
|
|
|
size="small"
|
|
|
style="color: white; background: rgb(0, 87, 186); border-radius: 6px"
|
|
|
@click="sendCode(item, index)"
|
|
|
- :disabled="time != null"
|
|
|
- >发送验证码<span v-if="time">({{ timeNum }})</span>
|
|
|
+ :disabled="time != null">
|
|
|
+ <span v-if="time">已发送({{ timeNum }})</span>
|
|
|
+ <span v-else>发送验证码</span>
|
|
|
</van-button>
|
|
|
</template>
|
|
|
</van-field>
|
|
|
@@ -204,7 +205,7 @@
|
|
|
{{ item.collectionOptionList[0].collectionOption }}
|
|
|
</p>
|
|
|
</div>
|
|
|
- <div v-if="item.answerType == 'check_code'" class="formLabel z-cell">
|
|
|
+ <div v-if="item.answerType == 'check_code' && !verifyMobile" class="formLabel z-cell">
|
|
|
<van-cell>
|
|
|
<template #title>
|
|
|
<span v-if="item.isMust == 0" class="van-f-red">*</span>
|
|
|
@@ -584,14 +585,15 @@
|
|
|
v-model="childitem.collectionOptionList[0].answerValue"
|
|
|
:placeholder="item.text"
|
|
|
type="tel"
|
|
|
- @blur="telFn(childitem, index)">
|
|
|
- <template #button>
|
|
|
+ @blur="sendCodeTelFn(childitem, index)">
|
|
|
+ <template #button v-if="!verifyMobile">
|
|
|
<van-button
|
|
|
size="small"
|
|
|
style="color: white; background: rgb(0, 87, 186); border-radius: 6px"
|
|
|
@click="sendCode(childitem, index)"
|
|
|
- :disabled="time != null"
|
|
|
- >发送验证码<span v-if="time">({{ timeNum }})</span>
|
|
|
+ :disabled="time != null">
|
|
|
+ <span v-if="time">已发送({{ timeNum }})</span>
|
|
|
+ <span v-else>发送验证码</span>
|
|
|
</van-button>
|
|
|
</template>
|
|
|
</van-field>
|
|
|
@@ -607,7 +609,9 @@
|
|
|
{{ childitem.collectionOptionList[0].collectionOption }}
|
|
|
</p>
|
|
|
</div>
|
|
|
- <div v-if="childitem.answerType == 'check_code'" class="formLabel z-cell">
|
|
|
+ <div
|
|
|
+ v-if="childitem.answerType == 'check_code' && !verifyMobile"
|
|
|
+ class="formLabel z-cell">
|
|
|
<van-cell>
|
|
|
<template #title>
|
|
|
<span v-if="childitem.isMust == 0" class="van-f-red">*</span>
|
|
|
@@ -3033,9 +3037,12 @@ export default {
|
|
|
competitortableData: [],
|
|
|
isEditSDHCL: true, //是否可以编辑生动化陈列
|
|
|
time: null, //计时
|
|
|
- timeNum: 30,
|
|
|
+ timeNum: 60,
|
|
|
datetimeShowPicker: false,
|
|
|
activatNyrItem: '',
|
|
|
+ verificationPassedPhoneNum: '', //验证通过的手机号
|
|
|
+ verifyMobile: false, //手机号是否验证透通过
|
|
|
+ verifyMobileFlag: false, //手机号是否改变
|
|
|
};
|
|
|
},
|
|
|
beforeRouteLeave(to, from, next) {
|
|
|
@@ -3075,7 +3082,7 @@ export default {
|
|
|
this.stillDistribute = false;
|
|
|
clearInterval(this.time);
|
|
|
this.time = null; //计时
|
|
|
- this.timeNum = 30;
|
|
|
+ this.timeNum = 60;
|
|
|
},
|
|
|
watch: {
|
|
|
$route(to, from) {
|
|
|
@@ -3469,6 +3476,24 @@ export default {
|
|
|
this.$toast(val.collectionName + '格式错误');
|
|
|
}
|
|
|
},
|
|
|
+ sendCodeTelFn(val) {
|
|
|
+ let answerValue = '';
|
|
|
+ if (val.collectionOptionList && val.collectionOptionList.length) {
|
|
|
+ answerValue = val.collectionOptionList[0].answerValue;
|
|
|
+ } else {
|
|
|
+ answerValue = val.answerValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!/^1[3456789]\d{9}$/.test(answerValue) || answerValue == '') {
|
|
|
+ this.$toast(val.collectionName + '格式错误');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (answerValue != this.verificationPassedPhoneNum) {
|
|
|
+ this.verifyMobile = false;
|
|
|
+ } else {
|
|
|
+ this.verifyMobile = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
numberFn(val, index, type) {
|
|
|
if (type == 'A') {
|
|
|
if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.collectionItemList[index].answerValue)) {
|
|
|
@@ -3592,6 +3617,8 @@ export default {
|
|
|
this.processKey = false;
|
|
|
}
|
|
|
this.infoShow = res.data.isMust;
|
|
|
+ // 主经营者电话验证是否通过
|
|
|
+ this.verifyMobile = res.data.verifyMobile;
|
|
|
if (this.$route.query.taskType == 1 || this.$route.query.taskType == 4) {
|
|
|
for (var q = 0; q < collectionItemLists.length; q++) {
|
|
|
if (
|
|
|
@@ -3685,6 +3712,9 @@ export default {
|
|
|
if (listchild[qq1].collectionOptionList[0].answerValue != null) {
|
|
|
listchild[qq1].answerValue =
|
|
|
listchild[qq1].collectionOptionList[0].answerValue;
|
|
|
+ this.verificationPassedPhoneNum =
|
|
|
+ listchild[qq1].collectionOptionList[0].answerValue;
|
|
|
+ console.log(this.verificationPassedPhoneNum);
|
|
|
} else {
|
|
|
listchild[qq1].answerValue = '';
|
|
|
}
|
|
|
@@ -5106,7 +5136,7 @@ export default {
|
|
|
}
|
|
|
if (this.time) return;
|
|
|
clearInterval(this.time);
|
|
|
- this.timeNum = 30;
|
|
|
+ this.timeNum = 60;
|
|
|
this.sendCodeFun(
|
|
|
{
|
|
|
type: '1', //String 调用类型:1:发送验证码 2:校验验证码
|
|
|
@@ -5158,6 +5188,7 @@ export default {
|
|
|
verification: answerValue, //String 手机号验证码
|
|
|
},
|
|
|
(res) => {
|
|
|
+ this.verificationPassedPhoneNum = sendPhone;
|
|
|
this.$toast(res.data ? '验证成功' : '验证码错误');
|
|
|
}
|
|
|
);
|