mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: #802
This commit is contained in:
@@ -1,19 +1,21 @@
|
|||||||
import { PlayMode } from '@/const/enum'
|
import { PlayMode } from '@/const/enum'
|
||||||
|
|
||||||
|
import WebUIManager from '@/controllers/webui_manager'
|
||||||
import type {
|
import type {
|
||||||
FinalMusic,
|
FinalMusic,
|
||||||
Music163ListResponse,
|
Music163ListResponse,
|
||||||
Music163URLResponse
|
Music163URLResponse
|
||||||
} from '@/types/music'
|
} from '@/types/music'
|
||||||
|
|
||||||
import WebUIManager from '@/controllers/webui_manager'
|
|
||||||
/**
|
/**
|
||||||
* 获取网易云音乐歌单
|
* 获取网易云音乐歌单
|
||||||
* @param id 歌单id
|
* @param id 歌单id
|
||||||
* @returns 歌单信息
|
* @returns 歌单信息
|
||||||
*/
|
*/
|
||||||
export const get163MusicList = async (id: string) => {
|
export const get163MusicList = async (id: string) => {
|
||||||
let res = await WebUIManager.proxy<Music163ListResponse>('https://wavesgame.top/playlist/track/all?id=' + id);
|
let res = await WebUIManager.proxy<Music163ListResponse>(
|
||||||
|
'https://wavesgame.top/playlist/track/all?id=' + id
|
||||||
|
)
|
||||||
// const res = await request.get<Music163ListResponse>(
|
// const res = await request.get<Music163ListResponse>(
|
||||||
// `https://wavesgame.top/playlist/track/all?id=${id}`
|
// `https://wavesgame.top/playlist/track/all?id=${id}`
|
||||||
// )
|
// )
|
||||||
@@ -71,7 +73,7 @@ export const get163MusicListSongs = async (id: string) => {
|
|||||||
if (songURL) {
|
if (songURL) {
|
||||||
finalMusic.push({
|
finalMusic.push({
|
||||||
id: song.id,
|
id: song.id,
|
||||||
url: songURL,
|
url: songURL.replace(/http:\/\//, '//').replace(/https:\/\//, '//'),
|
||||||
title: song.name,
|
title: song.name,
|
||||||
artist: song.ar.map((p) => p.name).join('/'),
|
artist: song.ar.map((p) => p.name).join('/'),
|
||||||
cover: song.al.picUrl
|
cover: song.al.picUrl
|
||||||
|
Reference in New Issue
Block a user