新增各平台通过输入歌单链接或歌单ID打开歌单详情列表
This commit is contained in:
@@ -197,6 +197,13 @@ export default {
|
||||
limit: this.limit_song,
|
||||
total: body.result.song_num,
|
||||
source: 'bd',
|
||||
info: {
|
||||
name: body.result.info.list_title,
|
||||
img: body.result.info.list_pic,
|
||||
desc: body.result.info.list_desc,
|
||||
author: body.result.info.userinfo.username,
|
||||
play_count: this.formatPlayCount(body.result.listen_num),
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -35,6 +35,7 @@ export default {
|
||||
],
|
||||
regExps: {
|
||||
listData: /global\.data = (\[.+\]);/,
|
||||
listInfo: /global = {[\s\S]+?name: "(.+)"[\s\S]+?pic: "(.+)"[\s\S]+?};/,
|
||||
},
|
||||
getInfoUrl(tagId) {
|
||||
return tagId
|
||||
@@ -143,13 +144,27 @@ export default {
|
||||
this._requestObj_listDetail = httpFetch(this.getSongListDetailUrl(id))
|
||||
return this._requestObj_listDetail.promise.then(({ body }) => {
|
||||
let listData = body.match(this.regExps.listData)
|
||||
if (listData) listData = this.filterData(JSON.parse(RegExp.$1))
|
||||
let listInfo = body.match(this.regExps.listInfo)
|
||||
if (listData) listData = this.filterData(JSON.parse(listData[1]))
|
||||
let name
|
||||
let pic
|
||||
if (listInfo) {
|
||||
name = listInfo[1]
|
||||
pic = listInfo[2]
|
||||
}
|
||||
return {
|
||||
list: listData,
|
||||
page: 1,
|
||||
limit: 10000,
|
||||
total: listData.length,
|
||||
source: 'kg',
|
||||
info: {
|
||||
name,
|
||||
img: pic,
|
||||
// desc: body.result.info.list_desc,
|
||||
// author: body.result.info.userinfo.username,
|
||||
// play_count: this.formatPlayCount(body.result.listen_num),
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -166,6 +166,13 @@ export default {
|
||||
limit: body.rn,
|
||||
total: body.total,
|
||||
source: 'kw',
|
||||
info: {
|
||||
name: body.title,
|
||||
img: body.pic,
|
||||
desc: body.info,
|
||||
author: body.uname,
|
||||
play_count: this.formatPlayCount(body.playnum),
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -60,12 +60,20 @@ export default {
|
||||
this._requestObj_listDetail = httpFetch(this.getSongListDetailUrl(id, page), { headers: this.defaultHeaders })
|
||||
return this._requestObj_listDetail.promise.then(({ body }) => {
|
||||
if (body.code !== this.successCode) return this.getListDetail(id, page)
|
||||
// console.log(JSON.stringify(body))
|
||||
return {
|
||||
list: this.filterListDetail(body.list),
|
||||
page,
|
||||
limit: this.limit_song,
|
||||
total: body.totalCount,
|
||||
source: 'mg',
|
||||
info: {
|
||||
// name: body.result.info.list_title,
|
||||
// img: body.result.info.list_pic,
|
||||
// desc: body.result.info.list_desc,
|
||||
// author: body.result.info.userinfo.username,
|
||||
// play_count: this.formatPlayCount(body.result.listen_num),
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user