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 @@