|
@ -57,14 +57,14 @@ Component({ |
|
|
// 身份证号 双向绑定
|
|
|
// 身份证号 双向绑定
|
|
|
bindIdentityNoInput (e) { |
|
|
bindIdentityNoInput (e) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
"personalInfo.identityNo": e.detail.value |
|
|
"personalInfo.identityNo": e.detail.value.trim('') |
|
|
}) |
|
|
}) |
|
|
console.log(this.data.personalInfo) |
|
|
console.log(this.data.personalInfo) |
|
|
}, |
|
|
}, |
|
|
// 姓名 双向绑定
|
|
|
// 姓名 双向绑定
|
|
|
bindRealNameInput (e) { |
|
|
bindRealNameInput (e) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
"personalInfo.realName": e.detail.value |
|
|
"personalInfo.realName": e.detail.value.trim('') |
|
|
}) |
|
|
}) |
|
|
console.log(this.data.personalInfo) |
|
|
console.log(this.data.personalInfo) |
|
|
}, |
|
|
}, |
|
@ -92,7 +92,7 @@ Component({ |
|
|
// 路 双向绑定
|
|
|
// 路 双向绑定
|
|
|
bindRoadInput (e) { |
|
|
bindRoadInput (e) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
"personalInfo.road": e.detail.value |
|
|
"personalInfo.road": e.detail.value.trim(' ') |
|
|
}) |
|
|
}) |
|
|
console.log(this.data.personalInfo) |
|
|
console.log(this.data.personalInfo) |
|
|
}, |
|
|
}, |
|
@ -112,14 +112,14 @@ Component({ |
|
|
}, |
|
|
}, |
|
|
// 获取验证码
|
|
|
// 获取验证码
|
|
|
getSmsCode () { |
|
|
getSmsCode () { |
|
|
if (!this.data.personalInfo.mobile) { |
|
|
if (!this.data.personalInfo.mobile.trim('')) { |
|
|
this.showToast("请先输入手机号") |
|
|
this.showToast("请先输入手机号") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
smsCodeText: "获取中..." |
|
|
smsCodeText: "获取中..." |
|
|
}) |
|
|
}) |
|
|
const mobile = this.data.personalInfo.mobile |
|
|
const mobile = this.data.personalInfo.mobile.trim('') |
|
|
api.sendSms(mobile).then(() => { |
|
|
api.sendSms(mobile).then(() => { |
|
|
this.showToast("验证码发送成功") |
|
|
this.showToast("验证码发送成功") |
|
|
let num = 60 |
|
|
let num = 60 |
|
@ -268,7 +268,7 @@ Component({ |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (!this.data.personalInfo.realName) { |
|
|
if (!this.data.personalInfo.realName.trim('')) { |
|
|
this.showToast("请填写姓名") |
|
|
this.showToast("请填写姓名") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
@ -276,7 +276,7 @@ Component({ |
|
|
this.showToast("请选择性别") |
|
|
this.showToast("请选择性别") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (!this.data.personalInfo.mobile) { |
|
|
if (!this.data.personalInfo.mobile.trim('')) { |
|
|
this.showToast("请填写手机号") |
|
|
this.showToast("请填写手机号") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
@ -284,7 +284,7 @@ Component({ |
|
|
// this.showToast('请填写验证码')
|
|
|
// this.showToast('请填写验证码')
|
|
|
// return false
|
|
|
// return false
|
|
|
// }
|
|
|
// }
|
|
|
if (!this.data.personalInfo.road) { |
|
|
if (!this.data.personalInfo.road.trim('')) { |
|
|
this.showToast("请填写所在小区或所在道路") |
|
|
this.showToast("请填写所在小区或所在道路") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
@ -298,11 +298,11 @@ Component({ |
|
|
const para = { |
|
|
const para = { |
|
|
partyFlag: this.data.type === "partyMember" ? "1" : "0", |
|
|
partyFlag: this.data.type === "partyMember" ? "1" : "0", |
|
|
identityNo: this.data.personalInfo.identityNo, |
|
|
identityNo: this.data.personalInfo.identityNo, |
|
|
mobile: this.data.personalInfo.mobile, |
|
|
mobile: this.data.personalInfo.mobile.trim(''), |
|
|
smsCode: this.data.personalInfo.smsCode, |
|
|
smsCode: this.data.personalInfo.smsCode, |
|
|
realName: this.data.personalInfo.realName, |
|
|
realName: this.data.personalInfo.realName.trim(''), |
|
|
sex: this.data.personalInfo.sex, |
|
|
sex: this.data.personalInfo.sex, |
|
|
road: this.data.personalInfo.road, |
|
|
road: this.data.personalInfo.road.trim(''), |
|
|
villageName: this.data.personalInfo.villageName, |
|
|
villageName: this.data.personalInfo.villageName, |
|
|
dwellingPlace: this.data.personalInfo.dwellingPlace, |
|
|
dwellingPlace: this.data.personalInfo.dwellingPlace, |
|
|
gridId: this.data.gridInfo.gridId, |
|
|
gridId: this.data.gridInfo.gridId, |
|
@ -401,6 +401,11 @@ Component({ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
wx.hideLoading() |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
lock: false |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
} else if (this.data.type === "resident") { |
|
|
} else if (this.data.type === "resident") { |
|
|
api.completeResidentInfoV2(para).then(res => { |
|
|
api.completeResidentInfoV2(para).then(res => { |
|
@ -433,6 +438,11 @@ Component({ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
lock: false |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -445,7 +455,7 @@ Component({ |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (!this.data.personalInfo.realName) { |
|
|
if (!this.data.personalInfo.realName.trim('')) { |
|
|
this.showToast("请填写姓名") |
|
|
this.showToast("请填写姓名") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
@ -453,7 +463,7 @@ Component({ |
|
|
this.showToast("请选择性别") |
|
|
this.showToast("请选择性别") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (!this.data.personalInfo.mobile) { |
|
|
if (!this.data.personalInfo.mobile.trim('')) { |
|
|
this.showToast("请填写手机号") |
|
|
this.showToast("请填写手机号") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
@ -461,7 +471,7 @@ Component({ |
|
|
this.showToast("请填写验证码") |
|
|
this.showToast("请填写验证码") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (!this.data.personalInfo.road) { |
|
|
if (!this.data.personalInfo.road.trim('')) { |
|
|
this.showToast("请填写所在街道") |
|
|
this.showToast("请填写所在街道") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
@ -471,11 +481,11 @@ Component({ |
|
|
const para = { |
|
|
const para = { |
|
|
partyFlag: this.data.type === "partyMember" ? "1" : "0", |
|
|
partyFlag: this.data.type === "partyMember" ? "1" : "0", |
|
|
identityNo: this.data.personalInfo.identityNo, |
|
|
identityNo: this.data.personalInfo.identityNo, |
|
|
mobile: this.data.personalInfo.mobile, |
|
|
mobile: this.data.personalInfo.mobile.trim(''), |
|
|
smsCode: this.data.personalInfo.smsCode, |
|
|
smsCode: this.data.personalInfo.smsCode, |
|
|
realName: this.data.personalInfo.realName, |
|
|
realName: this.data.personalInfo.realName.trim(''), |
|
|
sex: this.data.personalInfo.sex, |
|
|
sex: this.data.personalInfo.sex, |
|
|
road: this.data.personalInfo.road, |
|
|
road: this.data.personalInfo.road.trim(''), |
|
|
villageName: this.data.personalInfo.villageName, |
|
|
villageName: this.data.personalInfo.villageName, |
|
|
dwellingPlace: this.data.personalInfo.dwellingPlace, |
|
|
dwellingPlace: this.data.personalInfo.dwellingPlace, |
|
|
gridId: this.data.gridInfo.gridId, |
|
|
gridId: this.data.gridInfo.gridId, |
|
|