diff --git a/src/apis.js b/src/apis.js
index 21405e6..fba5ec9 100644
--- a/src/apis.js
+++ b/src/apis.js
@@ -57,8 +57,8 @@ export const getAppConfig = () => {
return request("GET", "/index/appConfig");
};
-export const getHomeData = () => {
- return request("GET", "/user/myHome");
+export const getHomeData = (seasonId) => {
+ return request("GET", `/user/myHome?seasonId=${seasonId}`);
};
export const getProvinceData = () => {
diff --git a/src/components/Avatar.vue b/src/components/Avatar.vue
index efbb002..9d623d8 100644
--- a/src/components/Avatar.vue
+++ b/src/components/Avatar.vue
@@ -33,7 +33,7 @@ const props = defineProps({
});
const avatarFrame = ref("");
watch(
- () => config.value,
+ () => [config.value, props.score],
() => {
if (props.score !== undefined) {
avatarFrame.value = getLvlImage(props.score);
diff --git a/src/pages/rank-list.vue b/src/pages/rank-list.vue
index c3fd200..cd3f4c8 100644
--- a/src/pages/rank-list.vue
+++ b/src/pages/rank-list.vue
@@ -11,7 +11,7 @@ const isIos = ref(true);
const selectedIndex = ref(0);
const currentList = ref([]);
const myData = ref(null);
-const headerColor = ref("");
+const addBg = ref("");
onMounted(async () => {
const deviceInfo = uni.getDeviceInfo();
@@ -38,7 +38,7 @@ const handleSelect = (index) => {
};
const onScrollView = (e) => {
- headerColor.value = e.detail.scrollTop > 100 ? "orange" : "";
+ addBg.value = e.detail.scrollTop > 100;
};
const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"];
@@ -50,13 +50,20 @@ const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"];
class="header"
:style="{
paddingTop: isIos ? '38px' : '25px',
- backgroundColor: headerColor,
}"
>
+
-
+
- 本赛季排行榜
+
+ 本赛季排行榜
+
@@ -178,15 +185,12 @@ const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"];
top: 0;
transition: all 0.3s ease;
z-index: 10;
-}
-.header image {
- width: 22px;
- height: 22px;
- margin: 20px 15px;
+ overflow: hidden;
}
.header text {
transition: all 0.3s ease;
line-height: 60px;
+ position: relative;
}
.rank-tabs {
width: calc(100% - 20px);
@@ -325,4 +329,17 @@ const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"];
color: #fff9;
font-size: 14px;
}
+.header-back {
+ width: 22px;
+ height: 22px;
+ margin: 20px 15px;
+ position: relative;
+}
+.bg-image {
+ width: 100vw;
+ height: 100vh;
+ position: absolute;
+ top: 0;
+ left: 0;
+}
diff --git a/src/pages/ranking.vue b/src/pages/ranking.vue
index 93ce877..5737a59 100644
--- a/src/pages/ranking.vue
+++ b/src/pages/ranking.vue
@@ -1,5 +1,6 @@
-
+ (showSeasonList = false)">
-
+
{{ user.nickName }}
-
+ (showSeasonList = true)"
+ >
{{ seasonName }}
+
+ onChangeSeason(item.seasonId, item.seasonName)
+ "
+ >
+ {{ item.seasonName }}
+
+
+
段位
- {{ user.lvlName || "-" }}
+ {{
+ getLvlName(rankData.user.scores) || "-"
+ }}
赛季平均环数
{{
- user.avg_ring ? user.avg_ring + "环" : "-"
+ rankData.user.avg_ring ? rankData.user.avg_ring + "环" : "-"
}}
赛季胜率
{{
- user.avg_win ? user.avg_win + "%" : "-"
+ rankData.user.avg_win ? rankData.user.avg_win + "%" : "-"
}}
@@ -157,17 +208,17 @@ const toRankListPage = () => {
toTeamMatchPage(1, 2)"
+ @click.stop="() => toTeamMatchPage(1, 2)"
/>
toMeleeMatchPage(2, 5)"
+ @click.stop="() => toMeleeMatchPage(2, 5)"
/>
toMeleeMatchPage(2, 10)"
+ @click.stop="() => toMeleeMatchPage(2, 10)"
/>
@@ -215,7 +266,7 @@ const toRankListPage = () => {
/>
- 查看我的比赛记录
+ 查看我的比赛记录
@@ -277,7 +328,7 @@ const toRankListPage = () => {
筹备中...
- 点击查看更多
+ 点击查看更多
@@ -328,6 +379,7 @@ const toRankListPage = () => {
display: flex;
justify-content: center;
align-items: center;
+ position: relative;
}
.ranking-season > image {
width: 12px;
@@ -479,4 +531,28 @@ const toRankListPage = () => {
align-items: center;
color: #fff9;
}
+.season-list {
+ background-color: #000c;
+ border-radius: 15px;
+ color: #fff;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ font-size: 12px;
+ padding: 5px 0;
+ position: absolute;
+ width: 220rpx;
+ top: -44rpx;
+ right: -30rpx;
+ letter-spacing: 2px;
+}
+.season-list > view {
+ display: flex;
+ align-items: center;
+ padding: 10px 20px;
+}
+.season-list > view > image {
+ width: 12px;
+ margin-left: 10px;
+}