未验证 提交 8b36cdec 编写于 作者: B binaryify 提交者: GitHub

Merge pull request #589 from jsososo/master

回复评论
...@@ -1277,7 +1277,7 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具 ...@@ -1277,7 +1277,7 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
**必选参数** **必选参数**
`t`:1 发送 `t`:1 发送, 2 回复
`tpye`: 数字,资源类型,对应歌曲,mv,专辑,歌单,电台,视频对应以下类型 `tpye`: 数字,资源类型,对应歌曲,mv,专辑,歌单,电台,视频对应以下类型
...@@ -1301,6 +1301,8 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具 ...@@ -1301,6 +1301,8 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
`content` :要发送的内容 `content` :要发送的内容
`commentId` :回复的评论id
**调用例子** : `/comment?t=1&type=1&id=5436712&content=test` (往广岛之恋 mv 发送评论: test) **调用例子** : `/comment?t=1&type=1&id=5436712&content=test` (往广岛之恋 mv 发送评论: test)
注意:如给动态发送评论,则不需要传 id,需要传动态的 `threadId`,如:`/comment?t=1&type=6&threadId=A_EV_2_6559519868_32953014&content=test` 注意:如给动态发送评论,则不需要传 id,需要传动态的 `threadId`,如:`/comment?t=1&type=6&threadId=A_EV_2_6559519868_32953014&content=test`
......
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
module.exports = (query, request) => { module.exports = (query, request) => {
query.cookie.os = 'pc' query.cookie.os = 'pc'
query.t = (query.t == 1 ? 'add' : 'delete') query.t = {
1: 'add',
0: 'delete',
2: 'reply'
}[query.t]
query.type = { query.type = {
0: 'R_SO_4_', // 歌曲 0: 'R_SO_4_', // 歌曲
1: 'R_MV_5_', // MV 1: 'R_MV_5_', // MV
...@@ -23,6 +27,10 @@ module.exports = (query, request) => { ...@@ -23,6 +27,10 @@ module.exports = (query, request) => {
data.content = query.content data.content = query.content
else if(query.t == 'delete') else if(query.t == 'delete')
data.commentId = query.commentId data.commentId = query.commentId
else if (query.t == 'reply') {
data.commentId = query.commentId
data.content = query.content
}
return request( return request(
'POST', `https://music.163.com/weapi/resource/comments/${query.t}`, data, 'POST', `https://music.163.com/weapi/resource/comments/${query.t}`, data,
{crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册