|
|
@ -6,16 +6,17 @@ |
|
|
|
<van-image width="37" height="37" :src="userInfo.headImgUrl" round /> |
|
|
|
</template> |
|
|
|
</van-cell> |
|
|
|
<van-field label="姓名" required v-model="surName" placeholder="请输入" /> |
|
|
|
<van-field label="姓名" v-model="surName" placeholder="请输入" /> |
|
|
|
<van-cell title="性别"> |
|
|
|
<van-radio-group class="gender" v-model="gender"> |
|
|
|
<van-radio name="1">男</van-radio> |
|
|
|
<van-radio name="2" style="margin-left: 50px">女</van-radio> |
|
|
|
</van-radio-group> |
|
|
|
</van-cell> |
|
|
|
<template v-if="type !== 'edit'"> |
|
|
|
<van-field label="手机号" required v-model="phone" placeholder="请输入" /> |
|
|
|
<van-field label="验证码" required v-model="smsCode" placeholder="请输入"> |
|
|
|
<van-field label="身份证号码" v-model="idNum" placeholder="请输入" /> |
|
|
|
<template> |
|
|
|
<van-field label="手机号" v-model="phone" placeholder="请输入" /> |
|
|
|
<van-field label="验证码" v-model="smsCode" placeholder="请输入"> |
|
|
|
<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-else disabled>{{ time }}s后重试</van-button> |
|
|
@ -102,7 +103,6 @@ export default { |
|
|
|
jiedaoOptions: [], |
|
|
|
time: 60, |
|
|
|
userInfo: {}, |
|
|
|
|
|
|
|
phone: '', |
|
|
|
smsCode: '', |
|
|
|
surName: '', |
|
|
@ -117,7 +117,6 @@ export default { |
|
|
|
gridId: '', |
|
|
|
customerId: '', |
|
|
|
homeId: '', |
|
|
|
|
|
|
|
streetOptions: [], |
|
|
|
communityOptions: [], |
|
|
|
quarterOptions: [], |
|
|
@ -125,7 +124,10 @@ export default { |
|
|
|
unitOptions: [], |
|
|
|
houseOptions: [], |
|
|
|
type: '', |
|
|
|
city: '' |
|
|
|
city: '', |
|
|
|
street:"", |
|
|
|
district:"", |
|
|
|
idNum:"" |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -146,6 +148,7 @@ export default { |
|
|
|
document.title = this.$route.params.type === 'edit' ? '编辑' : '注册' |
|
|
|
this.userInfo = this.$store.state.app.userInfo |
|
|
|
this.gender = this.$store.state.app.userInfo.gender |
|
|
|
console.log(this.userInfo, 'this.userInfo'); |
|
|
|
if (this.type === 'edit') { |
|
|
|
this.surName = this.userInfo.realName |
|
|
|
this.gender = this.userInfo.gender |
|
|
@ -158,6 +161,7 @@ export default { |
|
|
|
console.log(this.streetId, 'this.streetId') |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
/* this.quarterId = this.userInfo.quarterId |
|
|
|
this.buildingId = this.userInfo.buildingId |
|
|
|
this.unitId = this.userInfo.unitId |
|
|
@ -191,6 +195,7 @@ export default { |
|
|
|
console.log('定位失败,再次进行定位') |
|
|
|
}, |
|
|
|
submit() { |
|
|
|
console.log(this.gender); |
|
|
|
let params = { |
|
|
|
gender: this.gender, |
|
|
|
userId: this.userInfo.userId, |
|
|
@ -204,6 +209,21 @@ export default { |
|
|
|
customerId: this.customerId, |
|
|
|
homeId: this.homeId |
|
|
|
} |
|
|
|
// let params1={ |
|
|
|
// street:this.street, |
|
|
|
// userId:this.userInfo.id, |
|
|
|
// mobile:this.phone, |
|
|
|
// district:this.district, |
|
|
|
// surname:this.surName, |
|
|
|
// name:this.userInfo.name, |
|
|
|
// realName:this.userInfo.realName, |
|
|
|
// idNum:this.idNum, |
|
|
|
// gender:this.gender, |
|
|
|
// // buildingAddress:this.userInfo.realName, |
|
|
|
// nickname:this.userInfo.nickname, |
|
|
|
// headImgUrl:this.userInfo.headImgUrl, |
|
|
|
// customerId:this.customerId |
|
|
|
// } |
|
|
|
if (this.type !== 'edit') { |
|
|
|
params.phone = this.phone |
|
|
|
params.smsCode = this.smsCode |
|
|
@ -227,11 +247,11 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (!params.streetId) { |
|
|
|
if (!this.street) { |
|
|
|
this.$toast.fail('请选择所在街道') |
|
|
|
return |
|
|
|
} |
|
|
|
if (!params.communityId) { |
|
|
|
if (!this.district) { |
|
|
|
this.$toast.fail('请选择所在社区') |
|
|
|
return |
|
|
|
} |
|
|
@ -287,18 +307,25 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
setVal(key, val, method) { |
|
|
|
console.log(key, val, method,"url"); |
|
|
|
|
|
|
|
console.log(this.street, 'street'); |
|
|
|
if (key === 'street') { |
|
|
|
this.communityId = '' |
|
|
|
this.customerId = val.customerId |
|
|
|
this.street=val.label; |
|
|
|
this.communityOptions = [] |
|
|
|
this.quarterOptions = [] |
|
|
|
this.buildingOptions = [] |
|
|
|
this.unitOptions = [] |
|
|
|
this.houseOptions = [] |
|
|
|
} |
|
|
|
|
|
|
|
if (key === 'community') { |
|
|
|
this.quarterId = '' |
|
|
|
this.gridId = '' |
|
|
|
this.district=val.label |
|
|
|
console.log(this.district, 'district'); |
|
|
|
this.quarterOptions = [] |
|
|
|
this.buildingOptions = [] |
|
|
|
this.unitOptions = [] |
|
|
@ -335,7 +362,7 @@ export default { |
|
|
|
// 获取街道 |
|
|
|
getAllAgencyStreet() { |
|
|
|
getAllAgencyStreet({}).then(res => { |
|
|
|
console.log(res, 'resresres') |
|
|
|
|
|
|
|
this.streetOptions = res |
|
|
|
? res.map(item => { |
|
|
|
return { |
|
|
@ -345,6 +372,7 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
: [] |
|
|
|
console.log(this.streetOptions, 'resresres') |
|
|
|
this.communityOptions = [] |
|
|
|
console.log(this.city) |
|
|
|
if (this.city === '青岛市') { |
|
|
@ -355,6 +383,7 @@ export default { |
|
|
|
console.log(item) |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(this.streetOptions,"wrf "); |
|
|
|
this.getChildAgencyByPid() |
|
|
|
} |
|
|
|
}) |
|
|
|