From 101a708c0971ee3e2a47ff70bcae9f16ee454904 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Tue, 7 Mar 2023 16:43:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AD=97=E6=AE=B5=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/musicSdk/tx/leaderboard.js | 4 ++-- src/utils/musicSdk/tx/musicInfo.js | 4 ++-- src/utils/musicSdk/tx/musicSearch.js | 32 +++++++++++++++++----------- src/utils/musicSdk/tx/songList.js | 6 +++--- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/src/utils/musicSdk/tx/leaderboard.js b/src/utils/musicSdk/tx/leaderboard.js index 90bc9e2..ac8d132 100644 --- a/src/utils/musicSdk/tx/leaderboard.js +++ b/src/utils/musicSdk/tx/leaderboard.js @@ -147,8 +147,8 @@ export default { // types.reverse() return { singer: this.getSinger(item.singer), - name: item.title, - albumName: item.album.title, + name: item.name, + albumName: item.album.name, albumId: item.album.mid, source: 'tx', interval: formatPlayTime(item.interval), diff --git a/src/utils/musicSdk/tx/musicInfo.js b/src/utils/musicSdk/tx/musicInfo.js index 1887ceb..ce8c52f 100644 --- a/src/utils/musicSdk/tx/musicInfo.js +++ b/src/utils/musicSdk/tx/musicInfo.js @@ -72,12 +72,12 @@ export default (songmid) => { let albumId = '' let albumName = '' if (item.album) { - albumName = item.album.title + albumName = item.album.name albumId = item.album.mid } return { singer: getSinger(item.singer), - name: item.title, + name: item.name, albumName, albumId, source: 'tx', diff --git a/src/utils/musicSdk/tx/musicSearch.js b/src/utils/musicSdk/tx/musicSearch.js index f1fb3df..160e17f 100644 --- a/src/utils/musicSdk/tx/musicSearch.js +++ b/src/utils/musicSdk/tx/musicSearch.js @@ -22,19 +22,25 @@ export default { }, body: { comm: { - ct: '19', - cv: '1859', - uin: '0', + ct: 11, + cv: '1003006', + v: '1003006', + os_ver: '12', + phonetype: '0', + devicelevel: '31', + tmeAppID: 'qqmusiclight', + nettype: 'NETWORK_WIFI', }, req: { - method: 'DoSearchForQQMusicDesktop', module: 'music.search.SearchCgiService', + method: 'DoSearchForQQMusicLite', param: { - grp: 1, - num_per_page: limit, - page_num: page, query: str, search_type: 0, + num_per_page: limit, + page_num: page, + nqc_flag: 0, + grp: 1, }, }, }, @@ -84,8 +90,8 @@ export default { } if (file.size_hires !== 0) { let size = sizeFormate(file.size_hires) - types.push({ type: 'flac32bit', size }) - _types.flac32bit = { + types.push({ type: 'flac24bit', size }) + _types.flac24bit = { size, } } @@ -93,12 +99,12 @@ export default { let albumId = '' let albumName = '' if (item.album) { - albumName = item.album.title + albumName = item.album.name albumId = item.album.mid } list.push({ singer: this.getSinger(item.singer), - name: item.title, + name: item.name, albumName, albumId, source: 'tx', @@ -122,9 +128,9 @@ export default { if (limit == null) limit = this.limit // http://newlyric.kuwo.cn/newlyric.lrc?62355680 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.allPage = Math.ceil(this.total / limit) diff --git a/src/utils/musicSdk/tx/songList.js b/src/utils/musicSdk/tx/songList.js index 7ae4bb8..a045f96 100644 --- a/src/utils/musicSdk/tx/songList.js +++ b/src/utils/musicSdk/tx/songList.js @@ -143,7 +143,7 @@ export default { play_count: this.formatPlayCount(item.access_num), id: item.tid, author: item.creator_info.nick, - name: item.title, + name: item.name, time: item.modify_time ? dateFormat(item.modify_time * 1000, 'Y-M-D') : '', img: item.cover_url_medium, // grade: item.favorcnt / 10, @@ -277,8 +277,8 @@ export default { // types.reverse() return { singer: this.getSinger(item.singer), - name: item.title, - albumName: item.album.title, + name: item.name, + albumName: item.album.name, albumId: item.album.mid, source: 'tx', interval: formatPlayTime(item.interval),