|
@@ -26,23 +26,34 @@ export default defineComponent({
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ rankingMethod() {
|
|
|
+ const activeInfo: any = this.activeInfo
|
|
|
+ return activeInfo.rankingMethod || ''
|
|
|
+ },
|
|
|
activityMusic() {
|
|
|
const activeInfo: any = this.activeInfo
|
|
|
- return activeInfo.activityMusicVoList || []
|
|
|
+ const list =
|
|
|
+ activeInfo.rankingMethod === 'TOTAL_SCORE'
|
|
|
+ ? activeInfo.subjectInfos
|
|
|
+ : activeInfo.activityMusicVoList
|
|
|
+ return list || []
|
|
|
},
|
|
|
rewardList() {
|
|
|
const activeInfo: any = this.activeInfo
|
|
|
- // activityRewardList = activityRewardList?.activityRewardList
|
|
|
- // console.log(activityRewardList)
|
|
|
let list = activeInfo.activityRewardList || []
|
|
|
if (list && list.length > 0) {
|
|
|
- const last = list.sort((a: any, b: any) => {
|
|
|
- return Number(a.group) < Number(b.group) ? -1 : 1
|
|
|
- })
|
|
|
- list = this.groupBy(last, (item: any) => {
|
|
|
- return [item.group]
|
|
|
- })
|
|
|
+ if (activeInfo.rankingMethod === 'TOTAL_SCORE') {
|
|
|
+ list = [list]
|
|
|
+ } else {
|
|
|
+ const last = list.sort((a: any, b: any) => {
|
|
|
+ return Number(a.group) < Number(b.group) ? -1 : 1
|
|
|
+ })
|
|
|
+ list = this.groupBy(last, (item: any) => {
|
|
|
+ return [item.group]
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
+ // console.log(list)
|
|
|
return list || []
|
|
|
}
|
|
|
},
|
|
@@ -182,25 +193,34 @@ export default defineComponent({
|
|
|
{this.rewardList.map((item: any, index: number) => (
|
|
|
<>
|
|
|
<div class={styles.prizeTitle}>
|
|
|
- {index === 0 && (
|
|
|
- <Image
|
|
|
- class={styles.prizeLevel}
|
|
|
- src={getAssetsHomeFile('icon_level.png')}
|
|
|
- />
|
|
|
- )}
|
|
|
- {index === 1 && (
|
|
|
- <Image
|
|
|
- class={styles.prizeLevel}
|
|
|
- src={getAssetsHomeFile('icon_level2.png')}
|
|
|
- />
|
|
|
- )}
|
|
|
- {index === 2 && (
|
|
|
- <Image
|
|
|
- class={styles.prizeLevel}
|
|
|
- src={getAssetsHomeFile('icon_level3.png')}
|
|
|
- />
|
|
|
+ {this.rankingMethod === 'TOTAL_SCORE' ? (
|
|
|
+ <div class={styles.prizeTitle_score}>
|
|
|
+ 总评测分数达到 {this.activeInfo.rankingScore || 0}
|
|
|
+ 分即可获奖
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ <>
|
|
|
+ {index === 0 && (
|
|
|
+ <Image
|
|
|
+ class={styles.prizeLevel}
|
|
|
+ src={getAssetsHomeFile('icon_level.png')}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {index === 1 && (
|
|
|
+ <Image
|
|
|
+ class={styles.prizeLevel}
|
|
|
+ src={getAssetsHomeFile('icon_level2.png')}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {index === 2 && (
|
|
|
+ <Image
|
|
|
+ class={styles.prizeLevel}
|
|
|
+ src={getAssetsHomeFile('icon_level3.png')}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ 第{++index}名奖品
|
|
|
+ </>
|
|
|
)}
|
|
|
- 第{++index}名奖品
|
|
|
</div>
|
|
|
<div class={styles.prizeSection}>
|
|
|
{item.map((child: any) => (
|
|
@@ -236,22 +256,25 @@ export default defineComponent({
|
|
|
活动曲目
|
|
|
</span>
|
|
|
|
|
|
- <span
|
|
|
- class={styles.titleTips}
|
|
|
- // onClick={() =>
|
|
|
- // this.$router.push({
|
|
|
- // path: '/leaderboard',
|
|
|
- // query: { id: this.id }
|
|
|
- // })
|
|
|
- // }
|
|
|
- >
|
|
|
- {/* 查看挑战排行榜
|
|
|
- <img
|
|
|
- style={{ width: '16px', marginLeft: '4px' }}
|
|
|
- src={getAssetsHomeFile('icon-lv.png')}
|
|
|
- /> */}
|
|
|
- 共{this.activityMusic.length || 0}首曲目
|
|
|
- </span>
|
|
|
+ {this.rankingMethod === 'TOTAL_SCORE' ? (
|
|
|
+ <span
|
|
|
+ class={styles.titleTips}
|
|
|
+ onClick={() => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/track-subject-song',
|
|
|
+ query: {
|
|
|
+ id: this.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 查看曲目
|
|
|
+ </span>
|
|
|
+ ) : (
|
|
|
+ <span class={styles.titleTips}>
|
|
|
+ 共{this.activityMusic.length || 0}首曲目
|
|
|
+ </span>
|
|
|
+ )}
|
|
|
</h2>
|
|
|
|
|
|
{this.activityMusic.map((item: any) => (
|
|
@@ -262,16 +285,38 @@ export default defineComponent({
|
|
|
v-slots={{
|
|
|
icon: () => (
|
|
|
<Image
|
|
|
- src={getAssetsHomeFile('icon_music.png')}
|
|
|
+ src={getAssetsHomeFile(
|
|
|
+ this.rankingMethod === 'TOTAL_SCORE'
|
|
|
+ ? 'icon_music.png'
|
|
|
+ : 'icon_subject.png'
|
|
|
+ )}
|
|
|
class={styles.iconMusic}
|
|
|
/>
|
|
|
),
|
|
|
title: () => (
|
|
|
<span class={styles.musicName}>
|
|
|
- {item.musicSheetName}
|
|
|
+ {this.rankingMethod === 'TOTAL_SCORE'
|
|
|
+ ? item.subjectName
|
|
|
+ : item.musicSheetName}
|
|
|
</span>
|
|
|
),
|
|
|
- value: () => <span>{item.musicSubject}</span>
|
|
|
+ value: () => (
|
|
|
+ <span
|
|
|
+ onClick={() => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/track-subject-song',
|
|
|
+ query: {
|
|
|
+ id: this.id,
|
|
|
+ subjectId: item.subjectId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {this.rankingMethod === 'TOTAL_SCORE'
|
|
|
+ ? `共${item.musicNums}首活动曲目`
|
|
|
+ : item.musicSubject}
|
|
|
+ </span>
|
|
|
+ )
|
|
|
}}
|
|
|
/>
|
|
|
<Cell
|
|
@@ -319,11 +364,13 @@ export default defineComponent({
|
|
|
{item.userId ? (
|
|
|
<>
|
|
|
<p class={styles.name}>{item.username}</p>
|
|
|
- <p>
|
|
|
- <span class={styles.subjectName}>
|
|
|
- {item.userSubject}
|
|
|
- </span>
|
|
|
- </p>{' '}
|
|
|
+ {this.rankingMethod !== 'TOTAL_SCORE' && (
|
|
|
+ <p>
|
|
|
+ <span class={styles.subjectName}>
|
|
|
+ {item.userSubject}
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ )}
|
|
|
</>
|
|
|
) : (
|
|
|
<span class={styles.noText}>虚位以待</span>
|
|
@@ -338,11 +385,7 @@ export default defineComponent({
|
|
|
height: '32px'
|
|
|
}}
|
|
|
color="linear-gradient(180deg, #FFA200 0%, #FF6900 100%)"
|
|
|
- disabled={
|
|
|
- // this.activeInfo.join === 0 ||
|
|
|
- // (this.userSelectMusic && item.join !== 1)
|
|
|
- true
|
|
|
- }
|
|
|
+ disabled={true}
|
|
|
>
|
|
|
立刻挑战
|
|
|
</Button>
|