存档:TS 重构前基线(lx 聚合源 = isolated-vm 加载器,签名方案已移除)
This commit is contained in:
commit
f289df4cd7
124 files changed
+14110
No files matched your search
@@ -0,0 +1,40 @@
|
||||
import leaderboard from './leaderboard.js'
|
||||
import { apis } from '../api-source.js'
|
||||
import musicInfo from './musicInfo.js'
|
||||
import songList from './songList.js'
|
||||
import { httpFetch } from '../request.js'
|
||||
import musicSearch from './musicSearch.js'
|
||||
import hotSearch from './hotSearch.js'
|
||||
|
||||
const bd = {
|
||||
leaderboard,
|
||||
songList,
|
||||
musicSearch,
|
||||
hotSearch,
|
||||
getMusicUrl(songInfo, type) {
|
||||
return apis('bd').getMusicUrl(songInfo, type)
|
||||
},
|
||||
getPic(songInfo) {
|
||||
const requestObj = this.getMusicInfo(songInfo)
|
||||
return requestObj.promise.then(info => info.pic_premium)
|
||||
},
|
||||
getLyric(songInfo) {
|
||||
const requestObj = this.getMusicInfo(songInfo)
|
||||
requestObj.promise = requestObj.promise.then(info => httpFetch(info.lrclink).promise.then(resp => ({ lyric: resp.body, tlyric: '' })))
|
||||
return requestObj
|
||||
},
|
||||
// getLyric(songInfo) {
|
||||
// return apis('bd').getLyric(songInfo)
|
||||
// },
|
||||
// getPic(songInfo) {
|
||||
// return apis('bd').getPic(songInfo)
|
||||
// },
|
||||
getMusicInfo(songInfo) {
|
||||
return musicInfo.getMusicInfo(songInfo.songmid)
|
||||
},
|
||||
getMusicDetailPageUrl(songInfo) {
|
||||
return `http://music.taihe.com/song/${songInfo.songmid}`
|
||||
},
|
||||
}
|
||||
|
||||
export default bd
|
||||
Reference in new issue
Block a user