diff --git a/src/apps/AppOpenChat/AppOpenChat.vue b/src/apps/AppOpenChat/AppOpenChat.vue index 3b5135df..cc90ae9e 100644 --- a/src/apps/AppOpenChat/AppOpenChat.vue +++ b/src/apps/AppOpenChat/AppOpenChat.vue @@ -22,18 +22,18 @@ export default { ...mapActions(['injectJWeixin']), getUsers() { return Promise.all([ - this.$http.post("/app/wxcp/wxuser/list", null, {params: {listType: 0}}).then(res => { - if (res?.data) { - return this.users.userIds = res.data.records?.map(e => e.id) - } - }), + // this.$http.post("/app/wxcp/wxuser/list", null, {params: {listType: 0}}).then(res => { + // if (res?.data) { + // return this.users.userIds = res.data.records?.map(e => e.id).join(";") + // } + // }), this.$http.post("/app/wxcp/wxcustomer/list", null, { params: { wxUserId: this.user.wxUserId } }).then(res => { if (res?.data) { - return this.users.externalUserIds = res.data.records?.map(e => e.id) + return this.users.externalUserIds = res.data.records?.filter(e => e.type == 1)?.map(e => e.id).join(";") } }), ]) @@ -43,8 +43,8 @@ export default { created() { this.injectJWeixin("openEnterpriseChat").then(() => this.$confirm("确定创建省志愿者活动专用群聊?")) .then(this.getUsers).then(() => { + console.log(this.users) wx.openEnterpriseChat({ - userIds: "18507227517;AiXianLing", externalUserIds: "wmGBFVDgAAj_krfwaThRm-RRAq9rBeaQ", groupName: "省志愿者活动专用群", ...this.users,