最近播放完成一半,差清除列表
This commit is contained in:
@@ -66,13 +66,16 @@
|
||||
<div class="title">
|
||||
<span class="name">
|
||||
{{ song.name }}
|
||||
<span class="alias"><template
|
||||
v-for="(al, idx) in song.alias"
|
||||
> {{al}}
|
||||
</template></span>
|
||||
<span class="alias"
|
||||
><template
|
||||
v-for="(al, idx) in song.alias"
|
||||
>
|
||||
{{ al }}
|
||||
</template></span
|
||||
>
|
||||
</span>
|
||||
<span class="artist">
|
||||
<ArtistsSpan :artists="song.artists"/>
|
||||
<ArtistsSpan :artists="song.artists" />
|
||||
</span>
|
||||
</div>
|
||||
<span class="icon"></span>
|
||||
@@ -184,7 +187,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import {
|
||||
NCarousel,
|
||||
@@ -213,6 +216,8 @@ import {
|
||||
import pubsub from "pubsub-js";
|
||||
import ArtistsSpan from "@/components/ArtistsSpan.vue";
|
||||
|
||||
console.log("recommend 初始化");
|
||||
|
||||
const store = useStore();
|
||||
|
||||
const play = (id) => {
|
||||
@@ -230,18 +235,28 @@ getBanner(0)
|
||||
.catch((err) => {
|
||||
console.log("getBanner err", err);
|
||||
});
|
||||
//最新音乐
|
||||
|
||||
let topSongs = ref([]);
|
||||
//最新音乐
|
||||
getTopSong()
|
||||
.then((res) => {
|
||||
topSongs.value = res.data.data.filter((item, index) => {
|
||||
return index < 20;
|
||||
return index < 10;
|
||||
});
|
||||
// console.log(topSongs.value);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("getTopSong err", err);
|
||||
});
|
||||
|
||||
|
||||
// onMounted(() => {
|
||||
// console.log("onMounted");
|
||||
// });
|
||||
// onUnmounted(() => {
|
||||
// console.log("卸载组件");
|
||||
// });
|
||||
|
||||
function songAlias(alias) {
|
||||
if (alias.length > 0) return "[" + alias.join(",") + "]";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user