|
@ -15,7 +15,7 @@ |
|
|
</van-cell> |
|
|
</van-cell> |
|
|
<van-field label="身份证号码" v-model="idNum" placeholder="请输入" /> |
|
|
<van-field label="身份证号码" v-model="idNum" placeholder="请输入" /> |
|
|
<template> |
|
|
<template> |
|
|
<van-field label="手机号" v-model="phone" placeholder="请输入" /> |
|
|
<van-field label="手机号" v-model="mobile" placeholder="请输入" /> |
|
|
<van-field label="验证码" v-model="smsCode" placeholder="请输入" v-if="type !== 'edit'"> |
|
|
<van-field label="验证码" v-model="smsCode" placeholder="请输入" v-if="type !== 'edit'"> |
|
|
<template #button> |
|
|
<template #button> |
|
|
<van-button size="mini" round type="info" v-if="time === 60" @click="getCode">获取验证码</van-button> |
|
|
<van-button size="mini" round type="info" v-if="time === 60" @click="getCode">获取验证码</van-button> |
|
@ -103,7 +103,7 @@ export default { |
|
|
jiedaoOptions: [], |
|
|
jiedaoOptions: [], |
|
|
time: 60, |
|
|
time: 60, |
|
|
userInfo: {}, |
|
|
userInfo: {}, |
|
|
phone: '', |
|
|
mobile: '', |
|
|
smsCode: '', |
|
|
smsCode: '', |
|
|
surName: '', |
|
|
surName: '', |
|
|
gender: '', |
|
|
gender: '', |
|
@ -155,7 +155,7 @@ export default { |
|
|
this.customerId = this.userInfo.customerId; |
|
|
this.customerId = this.userInfo.customerId; |
|
|
this.communityId = this.userInfo.agencyId; |
|
|
this.communityId = this.userInfo.agencyId; |
|
|
this.idNum = this.userInfo.idNum; |
|
|
this.idNum = this.userInfo.idNum; |
|
|
this.phone = this.userInfo.mobile; |
|
|
this.mobile = this.userInfo.mobile; |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.getAllAgencyStreet() |
|
|
this.getAllAgencyStreet() |
|
|
this.getChildAgencyByPid() |
|
|
this.getChildAgencyByPid() |
|
@ -206,7 +206,7 @@ export default { |
|
|
params.idNum = this.idNum; |
|
|
params.idNum = this.idNum; |
|
|
params.mobile = this.mobile; |
|
|
params.mobile = this.mobile; |
|
|
if (this.type !== 'edit') { |
|
|
if (this.type !== 'edit') { |
|
|
params.mobile = this.phone |
|
|
params.mobile = this.mobile |
|
|
params.smsCode = this.smsCode |
|
|
params.smsCode = this.smsCode |
|
|
params.surName = this.surName |
|
|
params.surName = this.surName |
|
|
if (!params.realName) { |
|
|
if (!params.realName) { |
|
@ -266,16 +266,16 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
getCode() { |
|
|
getCode() { |
|
|
if (!this.phone) { |
|
|
if (!this.mobile) { |
|
|
this.$toast.fail('请输入手机号') |
|
|
this.$toast.fail('请输入手机号') |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (!/1[3456789]\d{9}/.test(this.phone)) { |
|
|
if (!/1[3456789]\d{9}/.test(this.mobile)) { |
|
|
this.$toast.fail('手机号格式错误') |
|
|
this.$toast.fail('手机号格式错误') |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
sendsmscode({ |
|
|
sendsmscode({ |
|
|
phone: this.phone |
|
|
mobile: this.mobile |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
leftTime = setInterval(() => { |
|
|
leftTime = setInterval(() => { |
|
|
if (this.time > 0) { |
|
|
if (this.time > 0) { |
|
|