写错了

This commit is contained in:
shijingjing
2023-03-02 10:35:42 +08:00
parent 9b17b6d853
commit 81c6619b04
2 changed files with 5 additions and 7 deletions

View File

@@ -539,7 +539,7 @@ export default {
if(typeof res.result == 'string') { if(typeof res.result == 'string') {
res.result = JSON.parse(res.result) res.result = JSON.parse(res.result)
} }
this.form.examines = res.result.userList this.form.examines = res.userList
} }
}).catch((err) => { }).catch((err) => {
this.$u.toast(err) this.$u.toast(err)

View File

@@ -92,20 +92,18 @@ export default {
}, },
getDeptUser() { getDeptUser() {
// this.selectEnterpriseContact({ this.selectEnterpriseContact({
wx.invoke("selectEnterpriseContact", {
fromDepartmentId: 0, // 从最上层开始 fromDepartmentId: 0, // 从最上层开始
mode: "multi", // 多选 mode: "multi", // 多选
type: ["department"], // 选部门 type: ["department"],
selectedDepartmentIds: this.deptListArr?.map(e => e.id) // 已选部门ID列表。用于多次选人时可重入 selectedDepartmentIds: this.deptListArr?.map(e => e.id) // 已选部门ID列表
}).then((res)=>{ }).then((res)=>{
console.log(res,'企微通讯录'); console.log(res,'企微通讯录');
if(res.err_msg == "selectEnterpriseContact:ok") { if(res.err_msg == "selectEnterpriseContact:ok") {
if(typeof res.result == 'string') { if(typeof res.result == 'string') {
res.result = JSON.parse(res.result) res.result = JSON.parse(res.result)
//由于目前各个终端尚未完全兼容需要开发者额外判断result类型以保证在各个终端的兼容性
} }
this.deptListArr = res.result.departmentList this.deptListArr = res.departmentList
console.log(this.deptListArr, '111'); console.log(this.deptListArr, '111');
} }
}).catch((err) => { }).catch((err) => {