|
@ -45,6 +45,12 @@ Page({ |
|
|
id: '' |
|
|
id: '' |
|
|
}], |
|
|
}], |
|
|
tagIndex: 0, |
|
|
tagIndex: 0, |
|
|
|
|
|
volunteerDept: {}, //志愿者部门id
|
|
|
|
|
|
deptList: [{ |
|
|
|
|
|
deptName: '请选择', |
|
|
|
|
|
id: '' |
|
|
|
|
|
}], |
|
|
|
|
|
deptIndex: 0, |
|
|
}, |
|
|
}, |
|
|
onLoad: function () { |
|
|
onLoad: function () { |
|
|
this.setData({ |
|
|
this.setData({ |
|
@ -55,6 +61,7 @@ Page({ |
|
|
this.getPrepareComplete().then(() => { |
|
|
this.getPrepareComplete().then(() => { |
|
|
this.getGridList() |
|
|
this.getGridList() |
|
|
this.getVolunteerTags() |
|
|
this.getVolunteerTags() |
|
|
|
|
|
this.getVolunteerDepts() |
|
|
}) |
|
|
}) |
|
|
this.checkWxUnionId() |
|
|
this.checkWxUnionId() |
|
|
this.getWxCode() |
|
|
this.getWxCode() |
|
@ -139,6 +146,26 @@ Page({ |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 获取志愿者部门列表
|
|
|
|
|
|
getVolunteerDepts () { |
|
|
|
|
|
api.getVolunteerDepts().then(res => { |
|
|
|
|
|
if (res.code == 0 && res.msg == 'success') { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
deptList: this.data.deptList.concat(res.data) |
|
|
|
|
|
}) |
|
|
|
|
|
res.data.forEach((item, key) => { |
|
|
|
|
|
if (item.id == this.data.volunteerDept.id) { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
'volunteerDept.dept': item.deptName, |
|
|
|
|
|
deptIndex: parseInt(key)+1 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 获取配置图片
|
|
|
// 获取配置图片
|
|
|
getImgUrl:function (){//0:咨询热线
|
|
|
getImgUrl:function (){//0:咨询热线
|
|
|
let that = this |
|
|
let that = this |
|
@ -207,7 +234,8 @@ Page({ |
|
|
volunteerNickname:res.data.volunteerNickname, |
|
|
volunteerNickname:res.data.volunteerNickname, |
|
|
volunteerSignature:res.data.volunteerSignature, |
|
|
volunteerSignature:res.data.volunteerSignature, |
|
|
volunteerFaceImg:res.data.volunteerFaceImg, |
|
|
volunteerFaceImg:res.data.volunteerFaceImg, |
|
|
'volunteerTag.id': res.data.volunteerTagId || '0' |
|
|
'volunteerTag.id': res.data.volunteerTagId || '0', |
|
|
|
|
|
'volunteerDept.id': res.data.volunteerDeptId || '0' |
|
|
// introduce:res.data.introduce
|
|
|
// introduce:res.data.introduce
|
|
|
}) |
|
|
}) |
|
|
resolve(true) |
|
|
resolve(true) |
|
@ -323,6 +351,7 @@ Page({ |
|
|
volunteerNickname:this.data.volunteerNickname.trim(''), |
|
|
volunteerNickname:this.data.volunteerNickname.trim(''), |
|
|
volunteerSignature:this.data.volunteerSignature, |
|
|
volunteerSignature:this.data.volunteerSignature, |
|
|
volunteerTagId: this.data.volunteerTag.id, |
|
|
volunteerTagId: this.data.volunteerTag.id, |
|
|
|
|
|
volunteerDeptId: this.data.volunteerDept.id, |
|
|
wxCode: this.data.unionIdStatus === "1" ? "" : this.data.wxCode, |
|
|
wxCode: this.data.unionIdStatus === "1" ? "" : this.data.wxCode, |
|
|
encryptedData: this.data.unionIdStatus === "1" ? "" : this.data.encryptedData, |
|
|
encryptedData: this.data.unionIdStatus === "1" ? "" : this.data.encryptedData, |
|
|
iv: this.data.unionIdStatus === "1" ? "" : this.data.iv |
|
|
iv: this.data.unionIdStatus === "1" ? "" : this.data.iv |
|
@ -570,4 +599,13 @@ Page({ |
|
|
'volunteerTag.tag': this.data.tagList[index].tagName |
|
|
'volunteerTag.tag': this.data.tagList[index].tagName |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
//
|
|
|
|
|
|
choosePicker2 (e) { |
|
|
|
|
|
let index = e.detail.value |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
deptIndex: index, |
|
|
|
|
|
'volunteerDept.id': this.data.deptList[index].id, |
|
|
|
|
|
'volunteerDept.dept': this.data.deptList[index].deptName |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}) |
|
|
}) |