|
@@ -8,8 +8,9 @@
|
|
|
v-model="detail.ownerMobile"
|
|
v-model="detail.ownerMobile"
|
|
|
label="主经营者电话"
|
|
label="主经营者电话"
|
|
|
placeholder="请输入主经营者电话"
|
|
placeholder="请输入主经营者电话"
|
|
|
|
|
+ @blur="sendCodeTelFn(detail.ownerMobile)"
|
|
|
type="tel">
|
|
type="tel">
|
|
|
- <template #button>
|
|
|
|
|
|
|
+ <template #button v-if="!verifyMobile">
|
|
|
<van-button
|
|
<van-button
|
|
|
size="small"
|
|
size="small"
|
|
|
style="color: white; background: rgb(0, 87, 186); border-radius: 6px"
|
|
style="color: white; background: rgb(0, 87, 186); border-radius: 6px"
|
|
@@ -25,7 +26,8 @@
|
|
|
label="主经营者收到的验证码"
|
|
label="主经营者收到的验证码"
|
|
|
placeholder="请输入验证码"
|
|
placeholder="请输入验证码"
|
|
|
type="number"
|
|
type="number"
|
|
|
- @blur="verification(verificationVal)" />
|
|
|
|
|
|
|
+ @blur="verification(verificationVal)"
|
|
|
|
|
+ v-if="!verifyMobile" />
|
|
|
<van-field v-model="detail.ownerName" label="主经营者姓名" />
|
|
<van-field v-model="detail.ownerName" label="主经营者姓名" />
|
|
|
<van-field
|
|
<van-field
|
|
|
v-model="detail.ownerBirthday"
|
|
v-model="detail.ownerBirthday"
|
|
@@ -117,6 +119,7 @@ export default {
|
|
|
maxDate: new Date(),
|
|
maxDate: new Date(),
|
|
|
currentDate: new Date(1945, 0, 1),
|
|
currentDate: new Date(1945, 0, 1),
|
|
|
mobileStatus: '0',
|
|
mobileStatus: '0',
|
|
|
|
|
+ verifyMobile: false, //手机号是否验证透通过
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
activated() {
|
|
activated() {
|
|
@@ -151,12 +154,25 @@ export default {
|
|
|
? res.data.mainProductCategorys.split(',')
|
|
? res.data.mainProductCategorys.split(',')
|
|
|
: [];
|
|
: [];
|
|
|
this.detail = res.data;
|
|
this.detail = res.data;
|
|
|
|
|
+ this.mobileStatus = res.data.mobileStatus;
|
|
|
// mobileStatus 1是 是否验证通过
|
|
// mobileStatus 1是 是否验证通过
|
|
|
- if (res.data.mobileStatus == '1')
|
|
|
|
|
|
|
+ if (res.data.mobileStatus == '1') {
|
|
|
this.verificationPassedPhoneNum = this.detail.ownerMobile;
|
|
this.verificationPassedPhoneNum = this.detail.ownerMobile;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 验证码和发送按钮是否显示
|
|
|
|
|
+ this.verifyMobile = this.mobileStatus == '0' ? true : false;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ sendCodeTelFn(tel) {
|
|
|
|
|
+ if (!/^1[3456789]\d{9}$/.test(tel) || tel == '') {
|
|
|
|
|
+ this.$toast('格式错误');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (tel != this.verificationPassedPhoneNum) {
|
|
|
|
|
+ this.verifyMobile = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// 发送验证码
|
|
// 发送验证码
|
|
|
sendCode(val) {
|
|
sendCode(val) {
|
|
|
if (!/^1[3456789]\d{9}$/.test(val) || val == '') {
|
|
if (!/^1[3456789]\d{9}$/.test(val) || val == '') {
|