省志愿者企微端完成
This commit is contained in:
		| @@ -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> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user