2025-05-01 16:36:24 +08:00
|
|
|
|
<script setup>
|
2025-05-23 21:20:38 +08:00
|
|
|
|
import Container from "@/components/Container.vue";
|
2025-06-08 20:59:41 +08:00
|
|
|
|
import Avatar from "@/components/Avatar.vue";
|
2025-05-16 15:56:54 +08:00
|
|
|
|
import { ref } from "vue";
|
2025-06-08 20:59:41 +08:00
|
|
|
|
import useStore from "@/store";
|
|
|
|
|
|
import { storeToRefs } from "pinia";
|
|
|
|
|
|
const store = useStore();
|
|
|
|
|
|
const { user } = storeToRefs(store);
|
2025-05-02 00:39:37 +08:00
|
|
|
|
|
|
|
|
|
|
const selectedIndex = ref(0);
|
|
|
|
|
|
|
|
|
|
|
|
const handleSelect = (index) => {
|
|
|
|
|
|
selectedIndex.value = index;
|
|
|
|
|
|
};
|
2025-05-16 15:56:54 +08:00
|
|
|
|
|
2025-06-08 12:52:49 +08:00
|
|
|
|
const toTeamMatchPage = (gameType, teamSize) => {
|
2025-05-16 15:56:54 +08:00
|
|
|
|
uni.navigateTo({
|
2025-06-08 12:52:49 +08:00
|
|
|
|
url: `/pages/team-match?gameType=${gameType}&teamSize=${teamSize}`,
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const toMeleeMatchPage = (gameType, teamSize) => {
|
|
|
|
|
|
uni.navigateTo({
|
2025-06-09 01:17:18 +08:00
|
|
|
|
url: `/pages/melee-match?gameType=${gameType}&teamSize=${teamSize}`,
|
2025-05-16 15:56:54 +08:00
|
|
|
|
});
|
|
|
|
|
|
};
|
2025-05-01 16:36:24 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
<Container title="排行赛">
|
|
|
|
|
|
<view class="container">
|
|
|
|
|
|
<view class="ranking-my-data">
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<view class="user-info">
|
2025-06-08 20:59:41 +08:00
|
|
|
|
<Avatar :src="user.avatarUrl" frame :size="30" />
|
|
|
|
|
|
<text>{{ user.nickName }}</text>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="ranking-season">
|
|
|
|
|
|
<text>第14赛季</text>
|
|
|
|
|
|
<image src="../static/triangle.png" mode="widthFix" />
|
2025-05-02 00:39:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
<view class="my-data">
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<text>段位</text>
|
|
|
|
|
|
<text :style="{ color: '#83CDFF' }">砖石 III</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<text>赛季平均环数</text>
|
|
|
|
|
|
<text :style="{ color: '#FFD947' }">9.7环</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<text>赛季胜率</text>
|
|
|
|
|
|
<text :style="{ color: '#FF507E' }">52%</text>
|
|
|
|
|
|
</view>
|
2025-05-02 00:39:37 +08:00
|
|
|
|
</view>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
<view class="rank-type">
|
|
|
|
|
|
<image
|
|
|
|
|
|
src="../static/battle1v1.png"
|
|
|
|
|
|
mode="widthFix"
|
2025-06-08 12:52:49 +08:00
|
|
|
|
@click="() => toTeamMatchPage(1, 2)"
|
2025-06-04 16:26:07 +08:00
|
|
|
|
/>
|
|
|
|
|
|
<image
|
|
|
|
|
|
src="../static/battle5.png"
|
|
|
|
|
|
mode="widthFix"
|
2025-06-08 12:52:49 +08:00
|
|
|
|
@click="() => toMeleeMatchPage(2, 5)"
|
2025-06-04 16:26:07 +08:00
|
|
|
|
/>
|
|
|
|
|
|
<image
|
|
|
|
|
|
src="../static/battle10.png"
|
|
|
|
|
|
mode="widthFix"
|
2025-06-08 12:52:49 +08:00
|
|
|
|
@click="() => toMeleeMatchPage(2, 10)"
|
2025-06-04 16:26:07 +08:00
|
|
|
|
/>
|
2025-05-02 00:39:37 +08:00
|
|
|
|
</view>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
<view class="data-progress">
|
|
|
|
|
|
<text>【1 V 1】 163 场 胜率 51%</text>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<view :style="{ width: '50%', backgroundColor: '#FF507E' }" />
|
|
|
|
|
|
</view>
|
2025-05-02 00:39:37 +08:00
|
|
|
|
</view>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
<view class="data-progress">
|
|
|
|
|
|
<text>【5人大乱斗】 12 场 得分率 56%</text>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<view :style="{ width: '60%', backgroundColor: '#FFD947' }" />
|
|
|
|
|
|
</view>
|
2025-05-02 00:39:37 +08:00
|
|
|
|
</view>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
<view class="data-progress">
|
|
|
|
|
|
<text>【10 人大乱斗】 12 场 得分率 5</text>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<view :style="{ width: '45%', backgroundColor: '#FFD947' }" />
|
|
|
|
|
|
</view>
|
2025-05-02 00:39:37 +08:00
|
|
|
|
</view>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
<view>查看我的比赛记录</view>
|
2025-05-02 00:39:37 +08:00
|
|
|
|
</view>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
<view class="ranking-data">
|
2025-05-02 00:39:37 +08:00
|
|
|
|
<view>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
<view
|
|
|
|
|
|
v-for="(rankType, index) in [
|
|
|
|
|
|
'积分表',
|
|
|
|
|
|
'MVP榜',
|
|
|
|
|
|
'十环榜',
|
|
|
|
|
|
'最牛省份',
|
|
|
|
|
|
]"
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
:style="{
|
|
|
|
|
|
color: index === selectedIndex ? '#000' : '#fff',
|
|
|
|
|
|
backgroundColor:
|
|
|
|
|
|
index === selectedIndex ? '#FFD947' : 'transparent',
|
|
|
|
|
|
}"
|
|
|
|
|
|
@tap="handleSelect(index)"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ rankType }}
|
|
|
|
|
|
</view>
|
2025-05-02 00:39:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view
|
2025-06-04 16:26:07 +08:00
|
|
|
|
v-for="(rankType, index) in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
|
2025-05-02 00:39:37 +08:00
|
|
|
|
:key="index"
|
|
|
|
|
|
:style="{
|
2025-06-04 16:26:07 +08:00
|
|
|
|
backgroundColor: index % 2 === 0 ? '#ffffff1f' : 'transparent',
|
2025-05-02 00:39:37 +08:00
|
|
|
|
}"
|
2025-06-04 16:26:07 +08:00
|
|
|
|
class="rank-item"
|
2025-05-02 00:39:37 +08:00
|
|
|
|
>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
<image v-if="index === 0" src="../static/champ1.png" />
|
|
|
|
|
|
<image v-if="index === 1" src="../static/champ2.png" />
|
|
|
|
|
|
<image v-if="index === 2" src="../static/champ3.png" />
|
|
|
|
|
|
<view v-if="index > 2">{{ rankType }}</view>
|
|
|
|
|
|
<image src="../static/avatar.png" mode="widthFix" />
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<text>打酱油大声路过</text>
|
|
|
|
|
|
<text>钻石三级,20场</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<text>8850<text>分</text></text>
|
2025-05-02 00:39:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2025-05-23 21:20:38 +08:00
|
|
|
|
</Container>
|
2025-05-01 16:36:24 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2025-06-04 16:26:07 +08:00
|
|
|
|
.container {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
2025-05-02 00:39:37 +08:00
|
|
|
|
.ranking-my-data,
|
|
|
|
|
|
.ranking-data {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
background-color: #54431d33;
|
|
|
|
|
|
border: 1px solid #54431d;
|
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
margin: 0 15px;
|
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ranking-my-data {
|
|
|
|
|
|
padding: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ranking-my-data > view:first-of-type {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
border-bottom: 1px solid #48494e;
|
|
|
|
|
|
padding-bottom: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.user-info {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
2025-05-01 16:36:24 +08:00
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
2025-06-08 20:59:41 +08:00
|
|
|
|
.user-info > text {
|
|
|
|
|
|
margin-left: 15px;
|
2025-05-02 00:39:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
.ranking-season {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ranking-season > image {
|
|
|
|
|
|
width: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ranking-season > text {
|
|
|
|
|
|
color: #ffd947;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.my-data {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
color: #b3b3b3;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.my-data > view {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
height: 60px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.my-data > view:nth-child(2) {
|
|
|
|
|
|
border-left: 1px solid #48494e;
|
|
|
|
|
|
border-right: 1px solid #48494e;
|
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.my-data > view > text:first-child {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.my-data > view > text:last-child {
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-type {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-type > image {
|
|
|
|
|
|
width: 32%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.data-progress {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
color: #b3b3b3;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.data-progress > view {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 5px;
|
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
background-color: #696969;
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.data-progress > view > view {
|
|
|
|
|
|
height: 5px;
|
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ranking-my-data > view:last-child {
|
|
|
|
|
|
color: #39a8ff;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
padding-top: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ranking-data > view:first-of-type {
|
|
|
|
|
|
width: calc(100% - 30px);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
padding: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ranking-data > view:first-of-type > view {
|
|
|
|
|
|
width: 25%;
|
|
|
|
|
|
padding: 7px 10px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-item {
|
|
|
|
|
|
width: calc(100% - 30px);
|
|
|
|
|
|
height: 55px;
|
|
|
|
|
|
padding: 0 15px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-item > view:first-child {
|
|
|
|
|
|
width: 24px;
|
|
|
|
|
|
height: 24px;
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
background-color: #767676;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-item > image:first-child {
|
|
|
|
|
|
width: 24px;
|
|
|
|
|
|
height: 24px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-item > image:nth-child(2) {
|
|
|
|
|
|
width: 35px;
|
|
|
|
|
|
height: 35px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-item > view:nth-child(3) {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
width: 55%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-item > view:nth-child(3) > text:first-child {
|
|
|
|
|
|
color: #fff9;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-item > view:nth-child(3) > text:last-child {
|
|
|
|
|
|
color: #fff4;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-item > text:last-child {
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rank-item > text:last-child text {
|
|
|
|
|
|
color: #fff4;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
margin-left: 3px;
|
2025-05-01 16:36:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|