|
|
@ -146,7 +146,6 @@ Page({ |
|
|
|
title: options.title, |
|
|
|
}) |
|
|
|
let obj = JSON.parse(wx.getStorageSync('userInfo')) |
|
|
|
this.data.form.faceImg = obj.faceImg; |
|
|
|
for (let key in obj) { |
|
|
|
if (!this.data.form.hasOwnProperty(key)) { |
|
|
|
delete obj[key]; |
|
|
@ -282,7 +281,6 @@ Page({ |
|
|
|
}, |
|
|
|
//确定选择社区
|
|
|
|
bindMultiPickerChange() { |
|
|
|
console.log(this.data.multiIds); |
|
|
|
this.setData({ |
|
|
|
'form.allDeptIds': ['1175270520603930625', this.data.multiIds[0].value, this.data.multiIds[1].value, this.data.multiIds[1].children[0].value], |
|
|
|
changeFlag: true |
|
|
@ -332,7 +330,6 @@ Page({ |
|
|
|
searchColumn(); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
this.setData(data); |
|
|
|
this.setData({ |
|
|
|
newArr: this.data.newArr, |
|
|
@ -378,13 +375,11 @@ Page({ |
|
|
|
searchColumn(); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
this.setData(data); |
|
|
|
this.setData({ |
|
|
|
newArrC: this.data.newArrC, |
|
|
|
changeFlagC: true |
|
|
|
}) |
|
|
|
console.log(this.data.newArrC); |
|
|
|
}, |
|
|
|
reverseLocation() { |
|
|
|
const _this = this |
|
|
@ -397,7 +392,6 @@ Page({ |
|
|
|
_this.setData({ |
|
|
|
addressContent: res.result.address, |
|
|
|
address: res.result.address |
|
|
|
// 'form.issueAddress': res.result.address,
|
|
|
|
}) |
|
|
|
}, |
|
|
|
fail(err) { |
|
|
@ -410,20 +404,19 @@ Page({ |
|
|
|
this.setData({ |
|
|
|
'form.realName': e.detail.value |
|
|
|
}) |
|
|
|
console.log(this.data.form) |
|
|
|
}, |
|
|
|
//身份证双向绑定
|
|
|
|
bindRealidentityNoInput(e) { |
|
|
|
this.setData({ |
|
|
|
'form.identityNo': e.detail.value |
|
|
|
'form.identityNo': e.detail.value, |
|
|
|
}) |
|
|
|
this.idNo = e.detail.value |
|
|
|
}, |
|
|
|
//工作单位
|
|
|
|
bindWorkUnitInput(e) { |
|
|
|
this.setData({ |
|
|
|
'form.workUnit': e.detail.value |
|
|
|
}) |
|
|
|
console.log(this.data.form) |
|
|
|
}, |
|
|
|
//所属行业
|
|
|
|
bindWorkIndustryInput(e) { |
|
|
@ -459,14 +452,18 @@ Page({ |
|
|
|
this.getDeptTree() |
|
|
|
this.setData({ |
|
|
|
'form.shibei': e.detail.value, |
|
|
|
// 'form.allDeptIds': [""],
|
|
|
|
'form.couplingCommunity': [], |
|
|
|
multiIndex: [0, 0], |
|
|
|
multiIndexC: [0, 0], |
|
|
|
changeFlag: false, |
|
|
|
changeFlagC: false, |
|
|
|
}) |
|
|
|
|
|
|
|
if(e.detail.value != null && e.detail.value === '0'){ |
|
|
|
this.setData({ |
|
|
|
'form.villageName': '', |
|
|
|
'form.allDeptIds':'' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
bindFlagpartyFlagChange(e) { |
|
|
|
this.setData({ |
|
|
@ -576,7 +573,18 @@ Page({ |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!this.data.form.identityNo) { |
|
|
|
this.showToast('请填写身份证号') |
|
|
|
this.showToast('请填写身份证号码') |
|
|
|
return false |
|
|
|
} |
|
|
|
this.data.form.identityNo = this.idNo |
|
|
|
if (this.data.form.identityNo.length != 18) { |
|
|
|
this.showToast('请填写正确的身份证号码') |
|
|
|
return false |
|
|
|
}else { |
|
|
|
this.data.form.identityNo = this.idNo; |
|
|
|
} |
|
|
|
if (this.data.form.mobile.length != 11) { |
|
|
|
this.showToast('请填写正确的手机号码') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!this.data.form.workUnit) { |
|
|
@ -587,7 +595,7 @@ Page({ |
|
|
|
this.showToast('请填写专业特长') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!this.data.form.mobile || this.data.form.mobile.length < 11) { |
|
|
|
if (!this.data.form.mobile) { |
|
|
|
this.showToast('请填写正确的手机号码') |
|
|
|
return false |
|
|
|
} |
|
|
@ -605,10 +613,8 @@ Page({ |
|
|
|
// return false
|
|
|
|
// }
|
|
|
|
} else if (this.data.form.shibei == '0') { |
|
|
|
// if (this.data.form.allDeptIds.length == 0) {
|
|
|
|
// this.showToast('请填写单位包联社区名称名称')
|
|
|
|
// return false
|
|
|
|
// }
|
|
|
|
this.data.form.villageName = '', |
|
|
|
this.data.form.allDeptIds = [] |
|
|
|
} |
|
|
|
const para = { |
|
|
|
...this.data.form |
|
|
@ -630,9 +636,9 @@ Page({ |
|
|
|
if (res.code) { |
|
|
|
api.userInfoUpdate(para).then(res => { |
|
|
|
if (res.code == 0) { |
|
|
|
wx.removeStorageSync('userInfo') |
|
|
|
this.getUserInfo() |
|
|
|
than.showToast('修改成功') |
|
|
|
wx.removeStorageSync('userInfo'); |
|
|
|
this.getUserInfo(); |
|
|
|
than.showToast('修改成功'); |
|
|
|
} else { |
|
|
|
than.showToast(res.msg) |
|
|
|
} |
|
|
@ -700,11 +706,9 @@ Page({ |
|
|
|
this.showToast('请输入姓名') |
|
|
|
return |
|
|
|
} |
|
|
|
if (!this.data.form.identityNo) { |
|
|
|
this.showToast('请填写身份证号') |
|
|
|
if (!this.data.form.identityNo && this.data.form.identityNo.length == 18) { |
|
|
|
this.showToast('请填写正确的身份证号码') |
|
|
|
return |
|
|
|
} else { |
|
|
|
this.data.form.identityNo = this.idNo |
|
|
|
} |
|
|
|
if (!this.data.form.workIndustry) { |
|
|
|
this.showToast('请填写专业特长') |
|
|
@ -728,10 +732,8 @@ Page({ |
|
|
|
// return
|
|
|
|
// }
|
|
|
|
} else if (this.data.form.shibei == '0') { |
|
|
|
// if (this.data.form.allDeptIds.length == 0) {
|
|
|
|
// this.showToast('请填写单位包联社区名称名称')
|
|
|
|
// return
|
|
|
|
// }
|
|
|
|
this.data.form.allDeptIds = [], |
|
|
|
this.data.form.villageName = '' |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
visible: true |
|
|
|