UI调整
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
@@ -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}`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user