diff --git a/src/views/Ranking/Overall/Ranking.vue b/src/views/Ranking/Overall/Ranking.vue index 1729a6c..e747959 100644 --- a/src/views/Ranking/Overall/Ranking.vue +++ b/src/views/Ranking/Overall/Ranking.vue @@ -190,7 +190,7 @@ display: flex; justify-content: space-between; align-items: center; - gap: 4px; + gap: 8px; " :style="{ background: rankItemBackground, border: '1px ' + rankItemBorder }" @click="gotoAppPage(userInfo.id)" @@ -297,7 +297,7 @@ display: flex; justify-content: space-between; align-items: center; - gap: 4px; + gap: 8px; " :style="{ background: rankItemBackground, @@ -309,33 +309,54 @@
-
+
{{ myRanking.rank || 999 }}
+ +
+
{{ myRanking.quantityFormat || 0 }} @@ -371,6 +401,7 @@ import { connectToApp } from '@/utils/appConnector.js' import { preloadImages } from '@/utils/imagePreloader' import { getPngUrl } from '@/config/imagePaths.js' import { handleAvatarImageError } from '@/utils/imageHandler.js' +import { useThrottle } from '@/utils/useDebounce' import { getWealthRanking, getCharmRanking, getRoomRanking, getMyRanking } from '@/api/ranking' @@ -427,9 +458,7 @@ const updateTimeRanking = () => { showRanking.value = totalRanking.value.monthly } } - -// 改变排行榜类型 -const changeType = (type) => { +const ThrottleChangeType = (type) => { if (rankingType.value != type) { console.log('改变rankingType') rankingType.value = type @@ -454,8 +483,11 @@ const changeType = (type) => { } } +// 改变排行榜类型 +const changeType = useThrottle(ThrottleChangeType, 1000) + // 改变时间类型 -const changeDateType = (dateType) => { +const ThrottleChangeDateType = (dateType) => { if (selectedTimeTab.value != dateType) { console.log('改变rankingType') selectedTimeTab.value = dateType @@ -479,6 +511,8 @@ const changeDateType = (dateType) => { } } +const changeDateType = useThrottle(ThrottleChangeDateType, 500) + // 前三名榜单 const RankingTop3 = computed(() => { console.log('刷新RankingTop3')