错误监听及提供重试事件
This commit is contained in:
		| @@ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <section class="AppOpenChat"> |   <section class="AppOpenChat"> | ||||||
|     <AiLoading tips="正在处理..."/> |     <AiLoading :tips="tips" @click="tips=='点击空白处重试'&&execute"/> | ||||||
|   </section> |   </section> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -15,7 +15,8 @@ export default { | |||||||
|   }, |   }, | ||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|       users: {} |       users: {}, | ||||||
|  |       tips: "正在处理..." | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
| @@ -54,15 +55,19 @@ export default { | |||||||
|     handleCreateQrCode(groupId) { |     handleCreateQrCode(groupId) { | ||||||
|       const {activityType, activityId, groupName} = this.$route.query |       const {activityType, activityId, groupName} = this.$route.query | ||||||
|       this.$http.post("/api/wxcp/wxgroup/createGroupQrCode", null, { |       this.$http.post("/api/wxcp/wxgroup/createGroupQrCode", null, { | ||||||
|         params: { |         params: {groupId, activityType, activityId, groupName} | ||||||
|           groupId, activityType, activityId, groupName |  | ||||||
|         } |  | ||||||
|       }) |       }) | ||||||
|     } |     }, | ||||||
|  |     execute() { | ||||||
|  |       return this.getAccount().then(this.getUsers).then(this.handleCreateSuccess) | ||||||
|  |     }, | ||||||
|   }, |   }, | ||||||
|   created() { |   created() { | ||||||
|     this.injectJWeixin("openEnterpriseChat").then(() => this.$confirm(`确定创建${this.$route.query.groupName}?`)) |     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> | </script> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user