feat(排行榜): 对接我的排名接口
This commit is contained in:
parent
f2c71c1597
commit
4e2dcd9a45
@ -35,3 +35,15 @@ export const getRoomRanking = async () => {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
// 获取我的排名
|
||||
export const getMyRanking = async () => {
|
||||
try {
|
||||
const response = await get(`/activity/leaderboard/my-rank`)
|
||||
return response
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch get my ranking:', error)
|
||||
console.error('error:' + error.response.errorMsg)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@
|
||||
import { isInApp, closePage } from '@/utils/appBridge.js'
|
||||
import { computed, onMounted, ref, watch, watchEffect } from 'vue'
|
||||
import TopUser from '@/components/Ranking/topUser.vue'
|
||||
import { getWealthRanking, getCharmRanking, getRoomRanking } from '@/api/ranking'
|
||||
import { getWealthRanking, getCharmRanking, getRoomRanking, getMyRanking } from '@/api/ranking'
|
||||
|
||||
//vite动态批量导入图片
|
||||
const imageModules = import.meta.glob('@/assets/images/Ranking/*.{png,jpg,svg}', { eager: true })
|
||||
@ -289,6 +289,7 @@ const selectedTimeTab = ref('Hourly') //时间标签
|
||||
|
||||
const totalRanking = ref({})
|
||||
const showRanking = ref([])
|
||||
const myRanking = ref({}) //我的排名
|
||||
|
||||
const updateTimeRanking = () => {
|
||||
console.log('updateTimeRanking()')
|
||||
@ -443,8 +444,8 @@ onMounted(() => {
|
||||
|
||||
observer.observe(sentinel.value)
|
||||
|
||||
// 获取榜单
|
||||
getRanking()
|
||||
getRanking() // 获取榜单
|
||||
getMyRanking() //获取我的排名
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user