selectEnterpriseContact(selectedDepartmentIds) {
let _that = this
console.log(`selectedDepartmentIds`, selectedDepartmentIds)
wx.invoke("selectEnterpriseContact", {
"fromDepartmentId": -1,
"mode": "multi",
"type": ["department"],
"selectedDepartmentIds": selectedDepartmentIds,
}, function (res) {
console.log(res)
if (res.err_msg == "selectEnterpriseContact:ok") {
if (typeof res.result == 'string') {
res.result = JSON.parse(res.result)
}
var selectedDepartmentList = res.result.departmentList;
if (selectedDepartmentList.length > 0) {
_that.selectedDepartmentIds.length = 0
}
for (var i = 0; i < selectedDepartmentList.length; i++) {
var department = selectedDepartmentList[i];
var departmentId = department.id;
var departemntName = department.name;
_that.selectedDepartmentIds.push(departmentId)
}
_that.selectedDepartmentList = selectedDepartmentList
_that.formData.depname = _that.selectedDepartmentIds.join(',')
}
});
},
回填selectedDepartmentIds在mac端正常,可是在windows系统下就无效了,同样的代码
建议移步企微官方讨论区咨询:https://developer.work.weixin.qq.com/community/question