diff --git a/packages/extra/AppAddressBook/components/List.vue b/packages/extra/AppAddressBook/components/List.vue index ebc7b9fe..bfbf0711 100644 --- a/packages/extra/AppAddressBook/components/List.vue +++ b/packages/extra/AppAddressBook/components/List.vue @@ -92,9 +92,8 @@ - 同步数据 - + 同步部门 + 同步成员 添加成员 @@ -505,25 +504,13 @@ export default { }, syncMembers() { - let departId = this.search.departmentId; - if (!departId) departId = 1; this.btnLoading = true this.instance.post(`/app/wxcp/wxdepartment/syncDepart`).then(res => { if (res.code == 0) { - this.instance.post(`/app/wxcp/wxdepartment/syncUser?departmentId=${departId}`, null, { - timeout: 1000000 - }).then(res => { - if (res.code == 0) { - this.$message.success('同步成功') - this.getList() - this.getTree() - } - - this.btnLoading = false - }).catch(() => { - this.btnLoading = false - }) + this.$message.success('同步成功') + this.getList() + this.getTree() } }).catch(() => { @@ -531,6 +518,26 @@ export default { }) }, + syncUser() { + let departId = this.search.departmentId; + if (!departId) departId = 1; + this.btnLoading = true + + this.instance.post(`/app/wxcp/wxdepartment/syncUser?departmentId=${departId}`, null, { + timeout: 1000000 + }).then(res => { + if (res.code == 0) { + this.$message.success('同步成功') + this.getList() + this.getTree() + } + + this.btnLoading = false + }).catch(() => { + this.btnLoading = false + }) + }, + getTags() { this.instance.post(`/app/wxcp/wxtag/listAll`).then(res => { if (res.code == 0) {