diff --git a/src/audioManager.js b/src/audioManager.js index 5be11b7..23d57ba 100644 --- a/src/audioManager.js +++ b/src/audioManager.js @@ -57,7 +57,7 @@ class AudioManager { // 监听加载状态 audio.onCanplay(() => { - console.log(`音频 ${key} 已加载完成`); + // console.log(`音频 ${key} 已加载完成`); }); audio.onError((res) => { diff --git a/src/constants.js b/src/constants.js index f1894f3..9979746 100644 --- a/src/constants.js +++ b/src/constants.js @@ -113,20 +113,14 @@ export const getBattleResultTips = ( return tests[getRandomIndex(3)]; } } else if (mode === 2) { - if (score > 0) { + if (rank <= 3) { const tests = [ - "王者一定属于你!", - "高光时刻!继续保持!", - "射灵世界的佼佼者!", + "好成绩!全国排位赛等着你!", + "持续练习,就会迎来更多高光时刻!", ]; - return tests[getRandomIndex(3)]; + return tests[getRandomIndex(2)]; } else { - const tests = [ - "再来一次,定能脱颖而出!", - "加强练习,争取越战越勇", - "人生走过的每一步都算数", - ]; - return tests[getRandomIndex(3)]; + return "每日练习打卡,争取下次脱颖而出!"; } } } else if (gameMode === 2) { @@ -147,14 +141,20 @@ export const getBattleResultTips = ( return tests[getRandomIndex(3)]; } } else if (mode === 2) { - if (rank <= 3) { + if (score > 0) { const tests = [ - "好成绩!全国排位赛等着你!", - "持续练习,就会迎来更多高光时刻!", + "王者一定属于你!", + "高光时刻!继续保持!", + "射灵世界的佼佼者!", ]; - return tests[getRandomIndex(2)]; + return tests[getRandomIndex(3)]; } else { - return "每日练习打卡,争取下次脱颖而出!"; + const tests = [ + "再来一次,定能脱颖而出!", + "加强练习,争取越战越勇", + "人生走过的每一步都算数", + ]; + return tests[getRandomIndex(3)]; } } } diff --git a/src/pages/battle-room.vue b/src/pages/battle-room.vue index 5bb1b53..5bc4f69 100644 --- a/src/pages/battle-room.vue +++ b/src/pages/battle-room.vue @@ -85,8 +85,18 @@ onLoad(async (options) => { redTeam.value = battleInfo.redTeam; blueTeam.value = battleInfo.blueTeam; currentRound.value = battleInfo.currentRound; - bluePoints.value = battleInfo.blueScore; - redPoints.value = battleInfo.redScore; + battleInfo.roundResults.forEach((round) => { + if (round.blueTotal && round.redTotal) { + if (round.blueTotal === round.redTotal) { + bluePoints.value += 1; + redPoints.value += 1; + } else if (round.blueTotal > round.redTotal) { + bluePoints.value += 2; + } else { + redPoints.value += 2; + } + } + }); totalRounds.value = battleInfo.maxRound; roundResults.value = battleInfo.roundResults; currentShooterId.value = battleInfo.firePlayerIndex; diff --git a/src/pages/index.vue b/src/pages/index.vue index b5828d8..2a253ca 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -185,11 +185,11 @@ const comingSoon = () => { { src="../static/region-5.png" mode="widthFix" /> - {{ region }} + {{ region.name }} - 2323 + {{ + region.score + }} diff --git a/src/pages/match-detail.vue b/src/pages/match-detail.vue index 17392c2..966f07a 100644 --- a/src/pages/match-detail.vue +++ b/src/pages/match-detail.vue @@ -33,20 +33,31 @@ onLoad(async (options) => { blueId = Object.keys(item)[1]; redId = Object.keys(item)[0]; } + let bluePoint = 1; + let redPoint = 1; + const blueTotalRings = item[blueId].reduce((a, b) => a + b.ring, 0); + const redTotalRings = item[redId].reduce((a, b) => a + b.ring, 0); + if (blueTotalRings > redTotalRings) { + bluePoint = 2; + redPoint = 0; + } else if (blueTotalRings < redTotalRings) { + bluePoint = 0; + redPoint = 2; + } roundsData.value.push({ blue: { name: result.bluePlayers[blueId].name, avatar: result.bluePlayers[blueId].avatar, arrows: item[blueId], - totalRing: item[blueId].reduce((a, b) => a + b.ring, 0), - totalScore: item[blueId].reduce((a, b) => a + b.ringScore, 0), + totalRing: blueTotalRings, + totalScore: bluePoint, }, red: { name: result.redPlayers[redId].name, avatar: result.redPlayers[redId].avatar, arrows: item[redId], - totalRing: item[redId].reduce((a, b) => a + b.ring, 0), - totalScore: item[redId].reduce((a, b) => a + b.ringScore, 0), + totalRing: redTotalRings, + totalScore: redPoint, }, }); }); @@ -76,6 +87,28 @@ const checkBowData = () => { :redTeam="redTeam" :players="data.players" /> + + 大乱斗 + + 查看靶纸 + + + + 决金箭轮(环数) @@ -127,28 +160,6 @@ const checkBowData = () => { /> - - 大乱斗 - - 查看靶纸 - - - - { - {{ round.blue.totalRing }}环 + {{ round.red.totalRing }}环 - 得分 {{ round.blue.totalScore }} + 得分 {{ round.red.totalScore }} diff --git a/src/pages/team-match.vue b/src/pages/team-match.vue index c411471..7deeded 100644 --- a/src/pages/team-match.vue +++ b/src/pages/team-match.vue @@ -54,8 +54,18 @@ onLoad(async (options) => { redTeam.value = battleInfo.redTeam; blueTeam.value = battleInfo.blueTeam; currentRound.value = battleInfo.currentRound; - bluePoints.value = battleInfo.blueScore; - redPoints.value = battleInfo.redScore; + battleInfo.roundResults.forEach((round) => { + if (round.blueTotal && round.redTotal) { + if (round.blueTotal === round.redTotal) { + bluePoints.value += 1; + redPoints.value += 1; + } else if (round.blueTotal > round.redTotal) { + bluePoints.value += 2; + } else { + redPoints.value += 2; + } + } + }); totalRounds.value = battleInfo.maxRound; roundResults.value = battleInfo.roundResults; setTimeout(() => { diff --git a/src/static/versus.png b/src/static/versus.png index 65d2eb5..7a3dc7d 100644 Binary files a/src/static/versus.png and b/src/static/versus.png differ