|
@@ -3,18 +3,19 @@ import { useRoute, useRouter } from 'vue-router'
|
|
|
import request from '@/helpers/request'
|
|
|
import ColHeader from '@/components/col-header'
|
|
|
import { Button, Icon, Image, List, NavBar, Sticky } from 'vant'
|
|
|
-import classNames from 'classnames'
|
|
|
-import Footer from '../album/footer'
|
|
|
-import FavoriteIcon from '../album/favorite.svg'
|
|
|
-import FavoritedIcon from '../album/favorited.svg'
|
|
|
+// import classNames from 'classnames'
|
|
|
+// import Footer from '../album/footer'
|
|
|
+// import FavoriteIcon from '../album/favorite.svg'
|
|
|
+// import FavoritedIcon from '../album/favorited.svg'
|
|
|
import styles from './index.module.less'
|
|
|
-import Item from '../list/item'
|
|
|
+// import Item from '../list/item'
|
|
|
import { useRect } from '@vant/use'
|
|
|
import { useEventListener, useWindowScroll } from '@vueuse/core'
|
|
|
import { getRandomKey, musicBuy } from '../music'
|
|
|
import { state } from '@/state'
|
|
|
import IconPan from './pan.png'
|
|
|
import oStart from './oStart.png'
|
|
|
+import iStart from './iStart.png'
|
|
|
import Title from '../component/title'
|
|
|
import Song from '../component/song'
|
|
|
import ColResult from '@/components/col-result'
|
|
@@ -39,10 +40,10 @@ export default defineComponent({
|
|
|
rows: 200
|
|
|
})
|
|
|
const albumDetail = ref<any>(null)
|
|
|
- const data = ref<any>(null)
|
|
|
+ // const data = ref<any>(null)
|
|
|
const rows = ref<any[]>([])
|
|
|
const loading = ref(false)
|
|
|
- const finished = ref(false)
|
|
|
+ // const finished = ref(false)
|
|
|
const isError = ref(false)
|
|
|
const favorited = ref(0)
|
|
|
const albumFavoriteCount = ref(0)
|
|
@@ -154,8 +155,13 @@ export default defineComponent({
|
|
|
<div class={styles.alumCollect}>
|
|
|
<img src={IconPan} />
|
|
|
<span>共{albumDetail.value?.musicSheetCount}首曲目</span>
|
|
|
- <img class={styles.right} src={oStart} />
|
|
|
- <span>{albumDetail.value?.albumFavoriteCount}人收藏</span>
|
|
|
+ <div
|
|
|
+ class={styles.right}
|
|
|
+ onClick={() => toggleFavorite(albumDetail.value?.id)}
|
|
|
+ >
|
|
|
+ <img src={favorited.value ? iStart : oStart} />
|
|
|
+ <span>{albumFavoriteCount.value}人收藏</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class={styles.alumnContainer}>
|