fix:优化重进比赛tips展示逻辑

This commit is contained in:
2026-05-13 11:17:30 +08:00
parent 6d434e89ab
commit 6cb5288631
3 changed files with 25 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ export default defineStore("store", {
roomNumber: "", // 当前房间号,供 Header 展示房号胶囊
currentShot: 0, // 当前已射箭数(用于 HeaderProgress 恢复状态)
totalShot: 0, // 轮次总箭数(用于 HeaderProgress 恢复状态)
tips: "", // 当前提示文案(用于 HeaderProgress 恢复状态,替代 uni.$emit 避免时序问题)
},
}),
@@ -143,6 +144,10 @@ export default defineStore("store", {
this.game.currentShot = currentShot;
this.game.totalShot = totalShot;
},
/** 更新当前提示文案(用于 HeaderProgress 恢复状态,替代 uni.$emit 避免时序问题) */
updateTips(tips = "") {
this.game.tips = tips;
},
/** 更新当前房间号,供 Header 组件展示房号胶囊 */
updateRoomNumber(number) {
this.game.roomNumber = number;