Skip to content

Commit

Permalink
test build dN
Browse files Browse the repository at this point in the history
  • Loading branch information
Kloping committed Nov 19, 2024
1 parent e919883 commit 3974f48
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/pages/musicoom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ let cover0 = ref("")
const ap = reactive(window.ap)
/**
* 获取最近的歌词
* @param time
* @param nextn
*/
function getNearst(time: number, nextn: number = 3) {
let outs = []
let ns = false
Expand Down Expand Up @@ -50,7 +55,6 @@ onMounted(() => {
let iee = $("#icon-img");
//旋转关键
let rting = 0;
let rn = 0
function animateBox() {
iee.animate({
Expand All @@ -62,12 +66,16 @@ onMounted(() => {
function loadRes(et: number = 2000) {
setTimeout(() => {
const ad0 = ap.list.audios[ap.list.index];
cover0.value = ad0.cover
if (ad0.songId) {
now_id.value = ad0.songId
} else now_id.value = ad0.id
info.value = ad0
if (!ad0.lyric) {
if (!getLyricing) {
getLyricing = true
Expand All @@ -87,6 +95,7 @@ onMounted(() => {
lyrics.value = parseLyrics(r)
ad0.lyric = r;
}
}, et)
}
Expand All @@ -105,6 +114,7 @@ onMounted(() => {
loadRes(0)
}
}, 102)
})
let percentage = ref(0)
Expand All @@ -127,6 +137,11 @@ const rmop = ref(true)
//私有歌单
let isPri = false
/**
* 添加歌
* @param index
* @param row
*/
const handlePoi = (index: number, row) => {
service.get(`/api/music/point?id=${row.id}&name=${row.name}&arts=${row.artist}`).then((r) => {
if (r.code == 200) {
Expand All @@ -143,7 +158,11 @@ const handlePoi = (index: number, row) => {
console.log(e)
});
}
/**
* 移除歌
* @param index
* @param row
*/
const handleRmp = (index: number, row) => {
service.get(`/api/music/rmp?id=${row.id}`).then((r) => {
if (r.code == 200) {
Expand Down

0 comments on commit 3974f48

Please sign in to comment.