Skip to content

Commit

Permalink
Merge branches 'next' and 'next' of github.com:Linkontoask/radishes i…
Browse files Browse the repository at this point in the history
…nto next
  • Loading branch information
Linkontoask committed Dec 12, 2020
2 parents e6653d1 + 41bcce3 commit a9a22f9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/pages/artist/children/detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ export const Desc = defineComponent({

return () => (
<div class="artist-desc">
<h2>{state.artist.name}简介</h2>
<h2 v-show={!!state.briefDesc}>{state.artist.name}简介</h2>
<div>{state.briefDesc}</div>
{state.introduction.map(item => (
<>
<h2>{item.ti}</h2>
<div v-html={item.txt.replace(/(.+)\n/g, '<div>$1</div>')}></div>
<div
v-html={item.txt.replace(/(.+\n)|(.+$)/g, (ment: string) => {
return `<div>${ment}</div>`
})}
></div>
</>
))}
</div>
Expand Down
12 changes: 9 additions & 3 deletions src/pages/list/view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ import {
FooterMutations
} from '@/pages/footer/module'
import { getSongUrl } from '@/api/index'
import { SongsBase, FormatSource } from '@/interface'
import { SongsBase, FormatSource, SongsDetail } from '@/interface'
import { SecondaryList } from '@/components/secondary-list'
import './index.less'

const isCopyright = (song: SongsDetail) => {
// Currently does not clear which values are used to determine whether there is copyright
// return song.fee === 0 && song.no === 1
return true
}

const formatPlayListData = (item: SongState['playlist']): FormatSource => {
return {
id: item.id,
Expand All @@ -38,7 +44,7 @@ const formatPlayListData = (item: SongState['playlist']): FormatSource => {
list: [
...item.tracks.map(o => ({
...o,
noCopyright: !(o.fee === 8 && o.no === 2)
noCopyright: !isCopyright(o)
}))
]
}
Expand All @@ -62,7 +68,7 @@ const formatAlbumListData = (item: SongState['albumList']): FormatSource => {
list: [
...item.song.map(o => ({
...o,
noCopyright: !(o.fee === 8 && o.no === 2)
noCopyright: !isCopyright(o)
}))
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const navRouter: RouteRecordRaw[] = [
component: SongList,
name: 'songlist',
meta: {
name: '歌单',
name: '精品歌单',
path: {
name: 'songlist',
query: {
Expand Down

0 comments on commit a9a22f9

Please sign in to comment.