|
@@ -82,24 +82,6 @@ export default defineComponent({
|
|
|
await getMusicList()
|
|
|
await getData()
|
|
|
})
|
|
|
- const user = computed(() => {
|
|
|
- if (!state.musicList[state.tabIndex]) return {} as any
|
|
|
- const userdata = userInfo.user.data
|
|
|
- if (!userdata.userId) return {} as any
|
|
|
- const rank = state.musicList[state.tabIndex]
|
|
|
- const item = rank?.rankingList?.find(n => n.userId == userdata.userId)
|
|
|
- let step = rank?.rankingList?.findIndex(n => n.userId == userdata.userId)
|
|
|
- step = step > -1 ? step + 1 : 0
|
|
|
- return {
|
|
|
- join: rank.join,
|
|
|
- score: rank.score,
|
|
|
- isTop: item ? true : false,
|
|
|
- heardUrl: userdata.heardUrl,
|
|
|
- username: userdata.username,
|
|
|
- userId: userdata.userId,
|
|
|
- step
|
|
|
- }
|
|
|
- })
|
|
|
const imgRef = ref()
|
|
|
return () => (
|
|
|
<div class={styles.leaderboard}>
|
|
@@ -126,8 +108,8 @@ export default defineComponent({
|
|
|
class={styles.tabs}
|
|
|
animated
|
|
|
swipeable
|
|
|
- titleInactiveColor="#fff"
|
|
|
- titleActiveColor="rgba(224,146,144,1)"
|
|
|
+ titleInactiveColor="rgba(153,152,155,1)"
|
|
|
+ titleActiveColor="#fff"
|
|
|
onChange={index => getData()}
|
|
|
>
|
|
|
{state.musicList.map((item: IMusicItem) => {
|