|
@@ -15,8 +15,33 @@ export default defineComponent({
|
|
|
default: {}
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ album() {
|
|
|
+ const courseInfo = this.item.courseInfo || []
|
|
|
+ const albumList = [] as any
|
|
|
+ courseInfo.map((course: any) => {
|
|
|
+ course.musicAlbumInfos &&
|
|
|
+ course.musicAlbumInfos.map((info: any) => {
|
|
|
+ info.relationType === 'ALBUM' && albumList.push(info)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ return [...albumList]
|
|
|
+ },
|
|
|
+ music() {
|
|
|
+ const courseInfo = this.item.courseInfo || []
|
|
|
+ const albumList = [] as any
|
|
|
+ courseInfo.map((course: any) => {
|
|
|
+ course.musicAlbumInfos &&
|
|
|
+ course.musicAlbumInfos.map((info: any) => {
|
|
|
+ info.relationType === 'MUSIC' && albumList.push(info)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ return [...albumList]
|
|
|
+ }
|
|
|
+ },
|
|
|
render() {
|
|
|
const item = this.item
|
|
|
+ console.log(item)
|
|
|
return (
|
|
|
<div class={styles.videoOrder}>
|
|
|
<CellGroup border={false}>
|
|
@@ -51,6 +76,69 @@ export default defineComponent({
|
|
|
}}
|
|
|
/>
|
|
|
</CellGroup>
|
|
|
+
|
|
|
+ {this.album.length > 0 && (
|
|
|
+ <CellGroup border={false}>
|
|
|
+ <Cell
|
|
|
+ center
|
|
|
+ v-slots={{
|
|
|
+ title: () => (
|
|
|
+ <div
|
|
|
+ class={[styles.title, 'van-ellipsis']}
|
|
|
+ style={{ display: 'flex', alignItems: 'center' }}
|
|
|
+ >
|
|
|
+ <span class={styles.line}></span>
|
|
|
+ 附带专辑
|
|
|
+ </div>
|
|
|
+ ),
|
|
|
+ value: () => <span class={styles.titleSong}>· 赠送</span>
|
|
|
+ }}
|
|
|
+ />
|
|
|
+
|
|
|
+ {this.album.map((album: any) => (
|
|
|
+ <Cell
|
|
|
+ center
|
|
|
+ v-slots={{
|
|
|
+ icon: () => <Image src={album.cover} class={styles.img} />
|
|
|
+ }}
|
|
|
+ title={album.name}
|
|
|
+ titleClass={styles.titleClass}
|
|
|
+ label={album.remark || ''}
|
|
|
+ />
|
|
|
+ ))}
|
|
|
+ </CellGroup>
|
|
|
+ )}
|
|
|
+ {this.music.length > 0 && (
|
|
|
+ <CellGroup border={false}>
|
|
|
+ <Cell
|
|
|
+ center
|
|
|
+ v-slots={{
|
|
|
+ title: () => (
|
|
|
+ <div
|
|
|
+ class={[styles.title, 'van-ellipsis']}
|
|
|
+ style={{ display: 'flex', alignItems: 'center' }}
|
|
|
+ >
|
|
|
+ <span class={styles.line}></span>
|
|
|
+ 附带乐谱
|
|
|
+ </div>
|
|
|
+ ),
|
|
|
+ value: () => <span class={styles.titleSong}>· 赠送</span>
|
|
|
+ }}
|
|
|
+ />
|
|
|
+
|
|
|
+ {this.music.map((album: any) => (
|
|
|
+ <Cell
|
|
|
+ center
|
|
|
+ v-slots={{
|
|
|
+ icon: () => <Image src={album.cover} class={styles.img} />
|
|
|
+ }}
|
|
|
+ title={album.name}
|
|
|
+ titleClass={styles.titleClass}
|
|
|
+ label={'作者:' + (album.remark || '')}
|
|
|
+ />
|
|
|
+ ))}
|
|
|
+ </CellGroup>
|
|
|
+ )}
|
|
|
</div>
|
|
|
)
|
|
|
}
|