Commit 43becd6a by 李伟康

```

feat(HomeFrame): 为活动消息获取添加错误处理

- 在getActivityMessage方法中添加try-catch块来捕获异步请求错误
- 确保在发生错误时重置onShowCount计数器,避免状态不一致
- 提高组件的错误处理能力和稳定性
```
1 parent 2f927a3f
...@@ -722,6 +722,7 @@ export default { ...@@ -722,6 +722,7 @@ export default {
}) })
}, },
async getActivityMessage (count = 1) { async getActivityMessage (count = 1) {
try {
this.onShowCount = count this.onShowCount = count
if (this.activityStatus) return if (this.activityStatus) return
const { sceneType } = this, const { sceneType } = this,
...@@ -730,6 +731,9 @@ export default { ...@@ -730,6 +731,9 @@ export default {
}) })
this.onShowCount = 0 this.onShowCount = 0
if (data) this.$refs.activityPopup.open(data) if (data) this.$refs.activityPopup.open(data)
} catch (error) {
this.onShowCount = 0
}
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!