更新字段获取
parent
66d29293cd
commit
0684e29098
|
@ -147,8 +147,8 @@ export default {
|
||||||
// types.reverse()
|
// types.reverse()
|
||||||
return {
|
return {
|
||||||
singer: this.getSinger(item.singer),
|
singer: this.getSinger(item.singer),
|
||||||
name: item.title,
|
name: item.name,
|
||||||
albumName: item.album.title,
|
albumName: item.album.name,
|
||||||
albumId: item.album.mid,
|
albumId: item.album.mid,
|
||||||
source: 'tx',
|
source: 'tx',
|
||||||
interval: formatPlayTime(item.interval),
|
interval: formatPlayTime(item.interval),
|
||||||
|
|
|
@ -72,12 +72,12 @@ export default (songmid) => {
|
||||||
let albumId = ''
|
let albumId = ''
|
||||||
let albumName = ''
|
let albumName = ''
|
||||||
if (item.album) {
|
if (item.album) {
|
||||||
albumName = item.album.title
|
albumName = item.album.name
|
||||||
albumId = item.album.mid
|
albumId = item.album.mid
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
singer: getSinger(item.singer),
|
singer: getSinger(item.singer),
|
||||||
name: item.title,
|
name: item.name,
|
||||||
albumName,
|
albumName,
|
||||||
albumId,
|
albumId,
|
||||||
source: 'tx',
|
source: 'tx',
|
||||||
|
|
|
@ -22,25 +22,32 @@ export default {
|
||||||
},
|
},
|
||||||
body: {
|
body: {
|
||||||
comm: {
|
comm: {
|
||||||
ct: '19',
|
ct: 11,
|
||||||
cv: '1859',
|
cv: '1003006',
|
||||||
uin: '0',
|
v: '1003006',
|
||||||
|
os_ver: '12',
|
||||||
|
phonetype: '0',
|
||||||
|
devicelevel: '31',
|
||||||
|
tmeAppID: 'qqmusiclight',
|
||||||
|
nettype: 'NETWORK_WIFI',
|
||||||
},
|
},
|
||||||
req: {
|
req: {
|
||||||
method: 'DoSearchForQQMusicDesktop',
|
|
||||||
module: 'music.search.SearchCgiService',
|
module: 'music.search.SearchCgiService',
|
||||||
|
method: 'DoSearchForQQMusicLite',
|
||||||
param: {
|
param: {
|
||||||
grp: 1,
|
|
||||||
num_per_page: limit,
|
|
||||||
page_num: page,
|
|
||||||
query: str,
|
query: str,
|
||||||
search_type: 0,
|
search_type: 0,
|
||||||
|
num_per_page: limit,
|
||||||
|
page_num: page,
|
||||||
|
nqc_flag: 0,
|
||||||
|
grp: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
// searchRequest = httpFetch(`http://ioscdn.kugou.com/api/v3/search/song?keyword=${encodeURIComponent(str)}&page=${page}&pagesize=${this.limit}&showtype=10&plat=2&version=7910&tag=1&correct=1&privilege=1&sver=5`)
|
// searchRequest = httpFetch(`http://ioscdn.kugou.com/api/v3/search/song?keyword=${encodeURIComponent(str)}&page=${page}&pagesize=${this.limit}&showtype=10&plat=2&version=7910&tag=1&correct=1&privilege=1&sver=5`)
|
||||||
return searchRequest.promise.then(({ body }) => {
|
return searchRequest.promise.then(({ body }) => {
|
||||||
|
// console.log(body)
|
||||||
if (body.code != this.successCode || body.req.code != this.successCode) return this.musicSearch(str, page, limit, ++retryNum)
|
if (body.code != this.successCode || body.req.code != this.successCode) return this.musicSearch(str, page, limit, ++retryNum)
|
||||||
return body.req.data
|
return body.req.data
|
||||||
})
|
})
|
||||||
|
@ -93,12 +100,12 @@ export default {
|
||||||
let albumId = ''
|
let albumId = ''
|
||||||
let albumName = ''
|
let albumName = ''
|
||||||
if (item.album) {
|
if (item.album) {
|
||||||
albumName = item.album.title
|
albumName = item.album.name
|
||||||
albumId = item.album.mid
|
albumId = item.album.mid
|
||||||
}
|
}
|
||||||
list.push({
|
list.push({
|
||||||
singer: this.getSinger(item.singer),
|
singer: this.getSinger(item.singer),
|
||||||
name: item.title,
|
name: item.name,
|
||||||
albumName,
|
albumName,
|
||||||
albumId,
|
albumId,
|
||||||
source: 'tx',
|
source: 'tx',
|
||||||
|
@ -122,9 +129,9 @@ export default {
|
||||||
if (limit == null) limit = this.limit
|
if (limit == null) limit = this.limit
|
||||||
// http://newlyric.kuwo.cn/newlyric.lrc?62355680
|
// http://newlyric.kuwo.cn/newlyric.lrc?62355680
|
||||||
return this.musicSearch(str, page, limit).then(({ body, meta }) => {
|
return this.musicSearch(str, page, limit).then(({ body, meta }) => {
|
||||||
let list = this.handleResult(body.song.list)
|
let list = this.handleResult(body.item_song)
|
||||||
|
|
||||||
this.total = meta.sum
|
this.total = meta.estimate_sum
|
||||||
this.page = page
|
this.page = page
|
||||||
this.allPage = Math.ceil(this.total / limit)
|
this.allPage = Math.ceil(this.total / limit)
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ export default {
|
||||||
play_count: this.formatPlayCount(item.access_num),
|
play_count: this.formatPlayCount(item.access_num),
|
||||||
id: item.tid,
|
id: item.tid,
|
||||||
author: item.creator_info.nick,
|
author: item.creator_info.nick,
|
||||||
name: item.title,
|
name: item.name,
|
||||||
time: item.modify_time ? dateFormat(item.modify_time * 1000, 'Y-M-D') : '',
|
time: item.modify_time ? dateFormat(item.modify_time * 1000, 'Y-M-D') : '',
|
||||||
img: item.cover_url_medium,
|
img: item.cover_url_medium,
|
||||||
// grade: item.favorcnt / 10,
|
// grade: item.favorcnt / 10,
|
||||||
|
@ -275,8 +275,8 @@ export default {
|
||||||
// types.reverse()
|
// types.reverse()
|
||||||
return {
|
return {
|
||||||
singer: this.getSinger(item.singer),
|
singer: this.getSinger(item.singer),
|
||||||
name: item.title,
|
name: item.name,
|
||||||
albumName: item.album.title,
|
albumName: item.album.name,
|
||||||
albumId: item.album.mid,
|
albumId: item.album.mid,
|
||||||
source: 'tx',
|
source: 'tx',
|
||||||
interval: formatPlayTime(item.interval),
|
interval: formatPlayTime(item.interval),
|
||||||
|
|
Loading…
Reference in New Issue