信息完善
This commit is contained in:
@@ -57,7 +57,7 @@ class AudioManager {
|
||||
|
||||
// 监听加载状态
|
||||
audio.onCanplay(() => {
|
||||
console.log(`音频 ${key} 已加载完成`);
|
||||
// console.log(`音频 ${key} 已加载完成`);
|
||||
});
|
||||
|
||||
audio.onError((res) => {
|
||||
|
||||
@@ -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)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -185,11 +185,11 @@ const comingSoon = () => {
|
||||
<view class="region-stats">
|
||||
<view
|
||||
v-for="(region, index) in [
|
||||
'广东',
|
||||
'湖南',
|
||||
'内蒙',
|
||||
'海南',
|
||||
'四川',
|
||||
{ name: '广东', score: 4291 },
|
||||
{ name: '湖南', score: 3095 },
|
||||
{ name: '内蒙', score: 2342 },
|
||||
{ name: '海南', score: 1812 },
|
||||
{ name: '四川', score: 1293 },
|
||||
]"
|
||||
:key="index"
|
||||
class="region-item"
|
||||
@@ -221,9 +221,11 @@ const comingSoon = () => {
|
||||
src="../static/region-5.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<text>{{ region }}</text>
|
||||
<text>{{ region.name }}</text>
|
||||
<view>
|
||||
<text :style="{ color: '#fff', marginRight: '2px' }">2323</text>
|
||||
<text :style="{ color: '#fff', marginRight: '2px' }">{{
|
||||
region.score
|
||||
}}</text>
|
||||
<text>分</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -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"
|
||||
/>
|
||||
<view
|
||||
v-if="data.players && data.players.length"
|
||||
class="score-header"
|
||||
:style="{ border: 'none', padding: '5px 15px' }"
|
||||
>
|
||||
<text>大乱斗</text>
|
||||
<view @click="checkBowData">
|
||||
<text>查看靶纸</text>
|
||||
<image src="../static/back.png" mode="widthFix" />
|
||||
</view>
|
||||
</view>
|
||||
<PlayerScore2
|
||||
v-if="data.players && data.players.length"
|
||||
v-for="(player, index) in data.players"
|
||||
:key="index"
|
||||
:name="player.name"
|
||||
:avatar="player.avatar"
|
||||
:scores="player.arrowHistory"
|
||||
:totalScore="player.totalScore"
|
||||
:totalRing="player.totalRings"
|
||||
:rank="index + 1"
|
||||
/>
|
||||
<block v-if="data.goldenRound">
|
||||
<view class="score-header">
|
||||
<text>决金箭轮(环数)</text>
|
||||
@@ -127,28 +160,6 @@ const checkBowData = () => {
|
||||
/>
|
||||
</view>
|
||||
</block>
|
||||
<view
|
||||
v-if="data.players && data.players.length"
|
||||
class="score-header"
|
||||
:style="{ border: 'none', padding: '5px 15px' }"
|
||||
>
|
||||
<text>大乱斗</text>
|
||||
<view @click="checkBowData">
|
||||
<text>查看靶纸</text>
|
||||
<image src="../static/back.png" mode="widthFix" />
|
||||
</view>
|
||||
</view>
|
||||
<PlayerScore2
|
||||
v-if="data.players && data.players.length"
|
||||
v-for="(player, index) in data.players"
|
||||
:key="index"
|
||||
:name="player.name"
|
||||
:avatar="player.avatar"
|
||||
:scores="player.arrowHistory"
|
||||
:totalScore="player.totalScore"
|
||||
:totalRing="player.totalRings"
|
||||
:rank="index + 1"
|
||||
/>
|
||||
<view
|
||||
v-for="(round, index) in roundsData"
|
||||
:key="index"
|
||||
@@ -184,9 +195,9 @@ const checkBowData = () => {
|
||||
</view>
|
||||
<view>
|
||||
<text :style="{ color: '#FF6767' }">
|
||||
{{ round.blue.totalRing }}环
|
||||
{{ round.red.totalRing }}环
|
||||
</text>
|
||||
<text>得分 {{ round.blue.totalScore }}</text>
|
||||
<text>得分 {{ round.red.totalScore }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 22 KiB |
Reference in New Issue
Block a user