Files
MusicServer/musicSdk/tx/index.ts
T

38 lines
998 B
TypeScript

import leaderboard from './leaderboard.ts'
import lyric from './lyric.ts'
import songList from './songList.ts'
import musicSearch from './musicSearch.ts'
import { apis } from '../api-source.ts'
import hotSearch from './hotSearch.ts'
import comment from './comment.ts'
import singer from './singer.ts'
import album from './album.ts'
// import tipSearch from './tipSearch.ts'
const tx = {
// tipSearch,
leaderboard,
songList,
musicSearch,
hotSearch,
comment,
singer,
album,
getMusicUrl(songInfo, type) {
return apis('tx')!.getMusicUrl(songInfo, type)
},
getLyric(songInfo) {
// let singer = songInfo.singer.indexOf('、') > -1 ? songInfo.singer.split('、')[0] : songInfo.singer
return lyric.getLyric(songInfo)
},
async getPic(songInfo) {
return `https://y.gtimg.cn/music/photo_new/T002R500x500M000${songInfo.albumId}.jpg`
},
getMusicDetailPageUrl(songInfo) {
return `https://y.qq.com/n/yqq/song/${songInfo.songmid}.html`
},
}
export default tx