update domain

This commit is contained in:
2023-10-22 12:55:58 +08:00
parent 0b971bf4d4
commit 9301dcc0aa
3 changed files with 9 additions and 3 deletions

View File

@@ -231,6 +231,7 @@ function createColumns(): DataTableColumns<SongsInfo> {
type: 'primary',
size: 'small',
circle: true,
loading: isLrcLoading.value == data.key,
onClick: () => OnPlayMusic(data),
},
{
@@ -306,7 +307,9 @@ function OnPlayMusic(song: SongsInfo) {
}
}
}
const isLrcLoading = ref('')
async function GetLyric(song: SongsInfo) {
isLrcLoading.value = song.key
QueryGetAPI<{ lyric: string; tlyric: string }>(SONG_API_URL + 'get-netease-lyric', { id: song.id })
.then((data) => {
console.log(mergeLyrics(data.data.lyric, data.data.tlyric))
@@ -329,6 +332,9 @@ async function GetLyric(song: SongsInfo) {
lrc: '',
}
})
.finally(() => {
isLrcLoading.value = ''
})
}
function mergeLyrics(originalLyrics: string, translatedLyrics: string): string {
const originalLines = originalLyrics.split('\n')

View File

@@ -1,7 +1,7 @@
import { ref } from 'vue'
const debugAPI = import.meta.env.VITE_DEBUG_API
const releseAPI = `${document.location.protocol}//api.vtsuru.live/api/`
const releseAPI = `https://vtsuru.suki.club/api/`
export const isBackendUsable = ref(true)

View File

@@ -14,6 +14,6 @@ defineProps<{
<template>
<NDivider style="margin-top: 10px" />
<ScheduleList v-if="currentData" :schedules="currentData ?? []" :is-self="accountInfo?.id == userInfo?.id" v-bind="$attrs" />
<ScheduleList v-if="currentData" :schedules="currentData ?? []" :is-self="false" v-bind="$attrs" />
<NDivider />
</template>