mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
feat: 获取播客里面的声音列表
This commit is contained in:
parent
00d3594814
commit
38e5a8742c
@ -276,6 +276,7 @@
|
||||
258. 验证接口-二维码检测
|
||||
259. 听歌识曲
|
||||
260. 根据nickname获取userid接口
|
||||
261. 播客声音列表
|
||||
|
||||
## 安装
|
||||
|
||||
@ -4179,6 +4180,20 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
|
||||
|
||||
`podcastName`: 播客名称
|
||||
|
||||
### 播客声音列表
|
||||
|
||||
说明: 可以获取播客里的声音
|
||||
|
||||
**接口地址:** `/voicelist/list`
|
||||
|
||||
**必选参数:**
|
||||
`voiceListId`: 播客id
|
||||
|
||||
**可选参数:**
|
||||
`limit`: 取出歌单数量 , 默认为 200
|
||||
|
||||
`offset`: 偏移数量 , 用于分页 , 如 :( 评论页数 -1)\*200, 其中 200 为 limit 的值
|
||||
|
||||
### 播客上传声音
|
||||
说明: 可以上传声音到播客,例子在 `/public/voice_upload.html` 访问地址: <a href="/voice_upload.html" target="_blank">/voice_upload.html</a>
|
||||
|
||||
|
18
module/voicelist_list.js
Normal file
18
module/voicelist_list.js
Normal file
@ -0,0 +1,18 @@
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
limit: query.limit || '200',
|
||||
offset: query.offset || '0',
|
||||
voiceListId: query.voiceListId,
|
||||
}
|
||||
return request(
|
||||
'POST',
|
||||
`https://interface.music.163.com/weapi/voice/workbench/voices/by/voicelist`,
|
||||
data,
|
||||
{
|
||||
crypto: 'weapi',
|
||||
cookie: query.cookie,
|
||||
proxy: query.proxy,
|
||||
realIP: query.realIP,
|
||||
},
|
||||
)
|
||||
}
|
@ -13,6 +13,11 @@
|
||||
<li v-for="(item,index) in voicelist" @click="currentVoiceIndex=index"
|
||||
:class="{active:currentVoiceIndex===index}">
|
||||
<img :src="item.coverUrl" style="width:50px;width:50px;" />
|
||||
<ul>
|
||||
<li v-for="(item2,index) in item.voiceListData">
|
||||
{{item2.voiceName}}
|
||||
</li>
|
||||
</ul>
|
||||
{{item.voiceListName}}
|
||||
</li>
|
||||
</ul>
|
||||
@ -85,6 +90,13 @@
|
||||
|
||||
console.log(res.data.data)
|
||||
this.voicelist = res.data.data.list
|
||||
this.voicelist.map(async i => {
|
||||
const res2 = await axios({
|
||||
url: `/voicelist/list?cookie=${this.cookieToken}&voiceListId=${i.voiceListId}&limit=5`,
|
||||
})
|
||||
i.voiceListData = res2.data.data.list
|
||||
console.log(res2);
|
||||
})
|
||||
},
|
||||
upload(file) {
|
||||
var formData = new FormData()
|
||||
|
Loading…
x
Reference in New Issue
Block a user