|
@ -9,14 +9,14 @@ |
|
|
<van-field label="姓名" v-model="surName" placeholder="请输入" /> |
|
|
<van-field label="姓名" v-model="surName" placeholder="请输入" /> |
|
|
<van-cell title="性别"> |
|
|
<van-cell title="性别"> |
|
|
<van-radio-group class="gender" v-model="gender"> |
|
|
<van-radio-group class="gender" v-model="gender"> |
|
|
<van-radio name="1">男</van-radio> |
|
|
<van-radio :name="0">男</van-radio> |
|
|
<van-radio name="2" style="margin-left: 50px">女</van-radio> |
|
|
<van-radio :name="1" style="margin-left: 50px">女</van-radio> |
|
|
</van-radio-group> |
|
|
</van-radio-group> |
|
|
</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="phone" placeholder="请输入" /> |
|
|
<van-field label="验证码" v-model="smsCode" placeholder="请输入"> |
|
|
<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> |
|
|
<van-button size="mini" round type="info" v-else disabled>{{ time }}s后重试</van-button> |
|
|
<van-button size="mini" round type="info" v-else disabled>{{ time }}s后重试</van-button> |
|
@ -147,14 +147,15 @@ export default { |
|
|
this.type = this.$route.params.type ? this.$route.params.type : '' |
|
|
this.type = this.$route.params.type ? this.$route.params.type : '' |
|
|
document.title = this.$route.params.type === 'edit' ? '编辑' : '注册' |
|
|
document.title = this.$route.params.type === 'edit' ? '编辑' : '注册' |
|
|
this.userInfo = this.$store.state.app.userInfo |
|
|
this.userInfo = this.$store.state.app.userInfo |
|
|
this.gender = this.$store.state.app.userInfo.gender |
|
|
|
|
|
console.log(this.userInfo, 'this.userInfo'); |
|
|
console.log(this.userInfo, 'this.userInfo'); |
|
|
if (this.type === 'edit') { |
|
|
if (this.type === 'edit') { |
|
|
this.surName = this.userInfo.realName |
|
|
this.surName = this.userInfo.realName; |
|
|
this.gender = this.userInfo.gender |
|
|
this.gender = this.userInfo.sex; |
|
|
this.streetId = this.userInfo.streetId |
|
|
this.streetId = this.userInfo.streetId; |
|
|
this.customerId = this.userInfo.customerId |
|
|
this.customerId = this.userInfo.customerId; |
|
|
this.communityId = this.userInfo.communityId |
|
|
this.communityId = this.userInfo.agencyId; |
|
|
|
|
|
this.idNum = this.userInfo.idNum; |
|
|
|
|
|
this.phone = this.userInfo.mobile; |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.getAllAgencyStreet() |
|
|
this.getAllAgencyStreet() |
|
|
this.getChildAgencyByPid() |
|
|
this.getChildAgencyByPid() |
|
@ -197,42 +198,22 @@ export default { |
|
|
submit() { |
|
|
submit() { |
|
|
console.log(this.gender); |
|
|
console.log(this.gender); |
|
|
let params = { |
|
|
let params = { |
|
|
gender: this.gender, |
|
|
...this.userInfo |
|
|
userId: this.userInfo.userId, |
|
|
} |
|
|
streetId: this.streetId, |
|
|
params.agencyId = this.communityId; |
|
|
communityId: this.communityId, |
|
|
params.gender = this.gender; |
|
|
quarterId: this.quarterId, |
|
|
params.realName = this.surName; |
|
|
buildingId: this.buildingId, |
|
|
params.idNum = this.idNum; |
|
|
unitId: this.unitId, |
|
|
params.mobile = this.mobile; |
|
|
houseNumberId: this.houseNumberId, |
|
|
|
|
|
gridId: this.gridId, |
|
|
|
|
|
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') { |
|
|
if (this.type !== 'edit') { |
|
|
params.phone = this.phone |
|
|
params.mobile = this.phone |
|
|
params.smsCode = this.smsCode |
|
|
params.smsCode = this.smsCode |
|
|
params.surName = this.surName |
|
|
params.surName = this.surName |
|
|
if (!params.surName) { |
|
|
if (!params.realName) { |
|
|
this.$toast.fail('请输入姓名') |
|
|
this.$toast.fail('请输入姓名') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (!params.phone) { |
|
|
if (!params.mobile) { |
|
|
this.$toast.fail('请输入手机号') |
|
|
this.$toast.fail('请输入手机号') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|