省志愿者企微端完成

This commit is contained in:
2022-11-22 10:29:49 +08:00
parent 495045ead1
commit dd646b4e50
2 changed files with 24 additions and 13 deletions

View File

@@ -38,19 +38,32 @@ export default {
}
}),
])
},
handleCreateSuccess() {
const {groupName} = this.$route.query
wx.openEnterpriseChat({
externalUserIds: "wmGBFVDgAAj_krfwaThRm-RRAq9rBeaQ",
groupName,
...this.users,
success: res => {
if (res?.chatId) {
this.handleCreateQrCode(res.chatId)
}
}
})
},
handleCreateQrCode(groupId) {
const {activityType, activityId, groupName} = this.$route.query
this.$http.post("/wxcp/wxgroup/createGroupQrCode", null, {
params: {
groupId, activityType, activityId, groupName
}
})
}
},
created() {
this.injectJWeixin("openEnterpriseChat").then(() => this.$confirm("确定创建省志愿者活动专用群聊?"))
.then(this.getUsers).then(() => {
console.log(this.users)
wx.openEnterpriseChat({
externalUserIds: "wmGBFVDgAAj_krfwaThRm-RRAq9rBeaQ",
groupName: "省志愿者活动专用群",
...this.users,
})
}).catch(() => 0)
.then(this.getUsers).then(this.handleCreateSuccess).catch(() => 0)
}
}
</script>