This commit is contained in:
kron
2025-07-01 23:07:47 +08:00
parent 606de53579
commit d2aa87e91c
4 changed files with 18 additions and 13 deletions

View File

@@ -1,9 +1,8 @@
<script setup> <script setup>
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { onLoad } from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";
import { getGameAPI } from "@/apis";
import Avatar from "@/components/Avatar.vue"; import Avatar from "@/components/Avatar.vue";
import { getHomeData } from "@/apis"; import { getGameAPI, getHomeData } from "@/apis";
import { topThreeColors } from "@/constants"; import { topThreeColors } from "@/constants";
import useStore from "@/store"; import useStore from "@/store";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
@@ -145,6 +144,7 @@ const checkBowData = () => {
</block> </block>
<view class="battle-e"> <view class="battle-e">
<image src="../static/row-yellow-bg.png" mode="widthFix" /> <image src="../static/row-yellow-bg.png" mode="widthFix" />
<Avatar v-if="data.mode === 1" :src="user.avatar" :size="40" />
<text v-if="data.gameMode === 1" <text v-if="data.gameMode === 1"
>经验 {{ totalPoints > 0 ? "+" + totalPoints : totalPoints }}</text >经验 {{ totalPoints > 0 ? "+" + totalPoints : totalPoints }}</text
> >
@@ -221,19 +221,20 @@ const checkBowData = () => {
.battle-e { .battle-e {
width: 100%; width: 100%;
height: 60px; height: 60px;
display: flex;
align-items: center;
justify-content: center;
margin-top: 20px;
} }
.battle-e > image { .battle-e > image {
position: absolute; position: absolute;
width: 100vw; width: 100vw;
top: 45%;
} }
.battle-e > text { .battle-e > text {
position: absolute; position: relative;
width: 100%;
font-size: 30px; font-size: 30px;
color: #fff; color: #fff;
text-align: center; margin-left: 10px;
top: 54%;
} }
.description { .description {
margin: 50px 0; margin: 50px 0;

View File

@@ -256,7 +256,7 @@ async function onReceiveMessage(messages = []) {
} }
if (msg.constructor === MESSAGETYPES.MatchOver) { if (msg.constructor === MESSAGETYPES.MatchOver) {
uni.redirectTo({ uni.redirectTo({
url: `/pages/battle-result?battleId=${msg.id}&winner=${msg.endStatus.winner}`, url: `/pages/battle-result?battleId=${msg.id}`,
}); });
} }
} }
@@ -478,7 +478,7 @@ onUnmounted(() => {
} }
.team-mode { .team-mode {
width: calc(100vw - 30px); width: calc(100vw - 30px);
height: 120vw; height: 107vw;
margin: 15px; margin: 15px;
} }
.team-mode > image:first-child { .team-mode > image:first-child {

View File

@@ -122,15 +122,19 @@ const toRankListPage = () => {
<view class="my-data"> <view class="my-data">
<view> <view>
<text>段位</text> <text>段位</text>
<text :style="{ color: '#83CDFF' }">{{ user.lvlName }}</text> <text :style="{ color: '#83CDFF' }">{{ user.lvlName || "-" }}</text>
</view> </view>
<view> <view>
<text>赛季平均环数</text> <text>赛季平均环数</text>
<text :style="{ color: '#FFD947' }">{{ user.avg_ring }}</text> <text :style="{ color: '#FFD947' }"
>{{ user.avg_ring || "-" }}</text
>
</view> </view>
<view> <view>
<text>赛季胜率</text> <text>赛季胜率</text>
<text :style="{ color: '#FF507E' }">{{ user.avg_win }}%</text> <text :style="{ color: '#FF507E' }"
>{{ user.avg_win || "-" }}%</text
>
</view> </view>
</view> </view>
<view class="rank-type"> <view class="rank-type">

View File

@@ -127,7 +127,7 @@ async function onReceiveMessage(messages = []) {
} }
if (msg.constructor === MESSAGETYPES.MatchOver) { if (msg.constructor === MESSAGETYPES.MatchOver) {
uni.redirectTo({ uni.redirectTo({
url: `/pages/battle-result?battleId=${msg.id}&winner=${msg.endStatus.winner}`, url: `/pages/battle-result?battleId=${msg.id}`,
}); });
} }
}); });