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 = "点击空白处重试" + }) } }