From da64974294bb4f3485f5effac13fad9348e04197 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 23 May 2021 16:36:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BC=81=E9=B9=85=E9=9F=B3?= =?UTF-8?q?=E4=B9=90=E6=90=9C=E7=B4=A2=E6=AD=8C=E6=9B=B2=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/utils/music/tx/musicSearch.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index c923ca01e..7ffca0f21 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -2,3 +2,4 @@ - 修复手机分享的wy歌单、某些tx、kg歌单无法打开的问题 - 修复打开空的歌单时,点击播放全部会导致应用崩溃的问题 +- 修复企鹅音乐搜索歌曲没有结果的问题 diff --git a/src/utils/music/tx/musicSearch.js b/src/utils/music/tx/musicSearch.js index db638542a..8a533231e 100644 --- a/src/utils/music/tx/musicSearch.js +++ b/src/utils/music/tx/musicSearch.js @@ -15,7 +15,8 @@ export default { musicSearch(str, page, limit, retryNum = 0) { if (searchRequest && searchRequest.cancelHttp) searchRequest.cancelHttp() if (retryNum > 5) return Promise.reject(new Error('搜索失败')) - searchRequest = httpFetch(`https://c.y.qq.com/soso/fcgi-bin/client_search_cp?ct=24&qqmusic_ver=1298&new_json=1&remoteplace=sizer.yqq.song_next&searchid=49252838123499591&t=0&aggr=1&cr=1&catZhida=1&lossless=0&flag_qc=0&p=${page}&n=${limit}&w=${encodeURIComponent(str)}&loginUin=0&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8¬ice=0&platform=yqq&needNewCode=0`) + // searchRequest = httpFetch(`https://c.y.qq.com/soso/fcgi-bin/client_search_cp?ct=24&qqmusic_ver=1298&new_json=1&remoteplace=sizer.yqq.song_next&searchid=49252838123499591&t=0&aggr=1&cr=1&catZhida=1&lossless=0&flag_qc=0&p=${page}&n=${limit}&w=${encodeURIComponent(str)}&loginUin=0&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8¬ice=0&platform=yqq&needNewCode=0`) + searchRequest = httpFetch(`https://c.y.qq.com/soso/fcgi-bin/client_search_cp?ct=24&qqmusic_ver=1298&new_json=1&remoteplace=txt.yqq.top&searchid=1&aggr=1&cr=1&catZhida=1&lossless=0&flag_qc=0&p=${page}&n=${limit}&w=${encodeURIComponent(str)}&cv=4747474&ct=24&format=json&inCharset=utf-8&outCharset=utf-8¬ice=0&platform=yqq.json&needNewCode=0&uin=0&hostUin=0&loginUin=0`) // 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 }) => { if (body.code !== this.successCode) return this.musicSearch(str, page, limit, ++retryNum)