From 662800000b8c4ab6bff5c3947caf0e72ff1c1375 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 1 Feb 2023 09:56:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9B=91=E5=90=AC=E5=8F=8A?= =?UTF-8?q?=E6=8F=90=E4=BE=9B=E9=87=8D=E8=AF=95=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppOpenChat/AppOpenChat.vue | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/apps/AppOpenChat/AppOpenChat.vue b/src/apps/AppOpenChat/AppOpenChat.vue index 2d0a5657..438356ac 100644 --- a/src/apps/AppOpenChat/AppOpenChat.vue +++ b/src/apps/AppOpenChat/AppOpenChat.vue @@ -1,6 +1,6 @@ @@ -15,7 +15,8 @@ export default { }, data() { return { - users: {} + users: {}, + tips: "正在处理..." } }, methods: { @@ -54,15 +55,19 @@ export default { handleCreateQrCode(groupId) { const {activityType, activityId, groupName} = this.$route.query this.$http.post("/api/wxcp/wxgroup/createGroupQrCode", null, { - params: { - groupId, activityType, activityId, groupName - } + params: {groupId, activityType, activityId, groupName} }) - } + }, + execute() { + return this.getAccount().then(this.getUsers).then(this.handleCreateSuccess) + }, }, created() { this.injectJWeixin("openEnterpriseChat").then(() => this.$confirm(`确定创建${this.$route.query.groupName}?`)) - .then(this.getAccount).then(this.getUsers).then(this.handleCreateSuccess).catch(() => 0) + .then(this.execute).catch(err => { + console.error(err) + this.tips = "点击空白处重试" + }) } }