mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-04 08:52:09 +08:00
修复wy源热搜词失效的问题
This commit is contained in:
parent
8ab38f5714
commit
3b1eab3381
@ -9,6 +9,7 @@
|
|||||||
- 修复因插入数字类型的ID导致其意外在末尾追加 .0 导致列表数据异常的问题,同时也可能导致同步数据丢失的问题(此问题会影响PC端,要完全修复这个问题还需要同时将PC端、同步服务更新到最新版本)
|
- 修复因插入数字类型的ID导致其意外在末尾追加 .0 导致列表数据异常的问题,同时也可能导致同步数据丢失的问题(此问题会影响PC端,要完全修复这个问题还需要同时将PC端、同步服务更新到最新版本)
|
||||||
- 修复在线列表、我的列表内的歌曲批量操作后,没有自动取消选择的问题
|
- 修复在线列表、我的列表内的歌曲批量操作后,没有自动取消选择的问题
|
||||||
- 修复tx热门评论昵称被错误切割的问题 (By: @helloplhm-qwq, @Folltoshe)
|
- 修复tx热门评论昵称被错误切割的问题 (By: @helloplhm-qwq, @Folltoshe)
|
||||||
|
- 修复wy源热搜词失效的问题(@Folltoshe)
|
||||||
|
|
||||||
### 其他
|
### 其他
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { httpFetch } from '../../request'
|
import { eapiRequest } from './utils/index'
|
||||||
import { weapi } from './utils/crypto'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
_requestObj: null,
|
_requestObj: null,
|
||||||
@ -7,20 +6,15 @@ export default {
|
|||||||
if (this._requestObj) this._requestObj.cancelHttp()
|
if (this._requestObj) this._requestObj.cancelHttp()
|
||||||
if (retryNum > 2) return Promise.reject(new Error('try max num'))
|
if (retryNum > 2) return Promise.reject(new Error('try max num'))
|
||||||
|
|
||||||
const _requestObj = httpFetch('https://music.163.com/weapi/search/hot', {
|
const _requestObj = eapiRequest('/api/search/chart/detail', {
|
||||||
method: 'post',
|
id: 'HOT_SEARCH_SONG#@#',
|
||||||
headers: {
|
|
||||||
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36',
|
|
||||||
origin: 'https://music.163.com',
|
|
||||||
},
|
|
||||||
form: weapi({ type: 1111 }),
|
|
||||||
})
|
})
|
||||||
const { body, statusCode } = await _requestObj.promise
|
const { body, statusCode } = await _requestObj.promise
|
||||||
if (statusCode != 200 || body.code !== 200) throw new Error('获取热搜词失败')
|
if (statusCode != 200 || body.code !== 200) throw new Error('获取热搜词失败')
|
||||||
// console.log(body)
|
|
||||||
return { source: 'wy', list: this.filterList(body.result.hots) }
|
return { source: 'wy', list: this.filterList(body.data.itemList) }
|
||||||
},
|
},
|
||||||
filterList(rawList) {
|
filterList(rawList) {
|
||||||
return rawList.map(item => item.first)
|
return rawList.map(item => item.searchWord)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user