fix:比赛射箭数改为用indexMap字段展示
This commit is contained in:
@@ -290,9 +290,9 @@ onShow(async () => {
|
||||
} else {
|
||||
if (result.status !== 0) {
|
||||
// 比赛进行中,从后端恢复箭数(测距阶段不展示)
|
||||
// 决金轮不展示箭数;其余轮次使用后端 myIndex 恢复已射箭数
|
||||
// 决金轮不展示箭数;其余轮次从 indexMap 按用户 id 取已射箭数
|
||||
if (result.shootNumber && !result.current?.goldRound) {
|
||||
store.updateShotInfo(result.current?.myIndex ?? 0, result.shootNumber);
|
||||
store.updateShotInfo(result.current?.indexMap?.[user.value.id] ?? 0, result.shootNumber);
|
||||
}
|
||||
} else {
|
||||
// 测距阶段重置箭数,防止 ImmediateWatcher 读取 Pinia 保留的旧值
|
||||
|
||||
Reference in New Issue
Block a user