修改回合得分显示

This commit is contained in:
kron
2025-07-02 15:57:58 +08:00
parent d2aa87e91c
commit 997e2ee756
7 changed files with 179 additions and 54 deletions

View File

@@ -8,7 +8,7 @@ import useStore from "@/store";
import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
const { updateUser } = store;
const { updateUser, getLvlName } = store;
const battleId = ref("");
const ifWin = ref(false);
@@ -133,7 +133,7 @@ const checkBowData = () => {
/>
<view class="player-title">
<text>{{ player.name }}</text>
<text>钻石三级</text>
<text>{{ getLvlName(player.totalScore) }}</text>
</view>
<text
><text :style="{ color: '#fff' }">{{ player.totalRings }}</text>
@@ -152,7 +152,9 @@ const checkBowData = () => {
>积分 {{ totalPoints > 0 ? "+" + totalPoints : totalPoints }}</text
>
</view>
<text v-if="data.mode === 1" class="description">你是朋友中的佼佼者哦</text>
<text v-if="data.mode === 1" class="description">{{
ifWin ? "你已经奔跑在通向王者的路上了" : "失败是成功之母儿子在等你"
}}</text>
<text v-if="data.mode === 2" class="description"
>好成绩全国排位赛等着你</text
>

View File

@@ -14,6 +14,7 @@ import ShootProgress from "@/components/ShootProgress.vue";
import PlayersRow from "@/components/PlayersRow.vue";
import SModal from "@/components/SModal.vue";
import ScreenHint from "@/components/ScreenHint.vue";
import RoundEndTip from "@/components/RoundEndTip.vue";
import { getRoomAPI, destroyRoomAPI, exitRoomAPI, startRoomAPI } from "@/apis";
import { checkConnection } from "@/util";
import { MESSAGETYPES, roundsName, getMessageTypeName } from "@/constants";
@@ -404,16 +405,12 @@ onUnmounted(() => {
</view>
<Timer :seq="timerSeq" />
<ScreenHint :show="showRoundTip" :onClose="() => (showRoundTip = false)">
<view class="round-end-tip">
<text>{{ currentRound - 1 }}轮射击结束</text>
<view>
<text>蓝队</text>
<text>{{ currentBluePoint }}</text>
<text>红队</text>
<text>{{ currentRedPoint }}</text>
<text></text>
</view>
</view>
<RoundEndTip
:round="currentRound - 1"
:bluePoint="currentBluePoint"
:redPoint="currentRedPoint"
:roundData="roundResults[roundResults.length - 1]"
/>
</ScreenHint>
<ScreenHint
:show="halfTimeTip"

View File

@@ -56,10 +56,10 @@ onMounted(async () => {
if (item.gameType === 2 && item.teamSize === 5) keyName = "5m";
if (item.gameType === 2 && item.teamSize === 10) keyName = "10m";
if (keyName) {
currentSeasonData.value["1v1"] = {
currentSeasonData.value[keyName] = {
totalGames: item.totalGames,
winCount: item.winCount,
winRate: (item.winCount / item.totalGames) * 100,
winRate: Number(((item.winCount / item.totalGames) * 100).toFixed(2)),
};
}
});

View File

@@ -13,6 +13,7 @@ import ScreenHint from "@/components/ScreenHint.vue";
import SButton from "@/components/SButton.vue";
import Matching from "@/components/Matching.vue";
import SModal from "@/components/SModal.vue";
import RoundEndTip from "@/components/RoundEndTip.vue";
import { matchGameAPI, readyGameAPI } from "@/apis";
import { MESSAGETYPES, roundsName, getMessageTypeName } from "@/constants";
import useStore from "@/store";
@@ -209,18 +210,12 @@ onUnmounted(() => {
:show="showRoundTip"
:onClose="() => (showRoundTip = false)"
>
<view class="round-end-tip">
<text>{{ currentRound - 1 }}轮射击结束</text>
<view>
<text>蓝队</text>
<text>{{ currentBluePoint }}</text>
<text>红队</text>
<text>{{ currentRedPoint }}</text>
<text></text>
</view>
<!-- <text>同分僵局最后一箭定江山</text>
<text>10 秒后蓝红双方 决金箭 一箭决胜负</text> -->
</view>
<RoundEndTip
:round="currentRound - 1"
:bluePoint="currentBluePoint"
:redPoint="currentRedPoint"
:roundData="roundResults[roundResults.length - 1]"
/>
</ScreenHint>
</block>
<block v-else>