错误监听及提供重试事件
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<section class="AppOpenChat">
|
||||
<AiLoading tips="正在处理..."/>
|
||||
<AiLoading :tips="tips" @click="tips=='点击空白处重试'&&execute"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -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 = "点击空白处重试"
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user