feat: updates

This commit is contained in:
qier222 2023-01-07 14:39:03 +08:00
parent 884f3df41a
commit c6c59b2cd9
No known key found for this signature in database
84 changed files with 3531 additions and 2616 deletions

View file

@ -1,5 +1,6 @@
import axios from 'axios'
import { useQuery } from '@tanstack/react-query'
import { appName } from '../utils/const'
export default function useVideoCover(props: {
id?: number
@ -13,9 +14,12 @@ export default function useVideoCover(props: {
async () => {
if (!id || !name || !artist) return
const fromRemote = await axios.get('/yesplaymusic/video-cover', {
params: props,
})
const fromRemote = await axios.get(
`/${appName.toLowerCase()}/video-cover`,
{
params: props,
}
)
if (fromRemote?.data?.url) {
return fromRemote.data.url
}