错误监听及提供重试事件

This commit is contained in:
aixianling
2023-02-01 09:56:45 +08:00
parent 7611071655
commit 662800000b

View File

@@ -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>