From 64a6b9677ab8a625d8ba6574b6e912b5a7c68d76 Mon Sep 17 00:00:00 2001 From: Zxwy <112370739+ZxwyWebSite@users.noreply.github.com> Date: Sat, 18 Jul 2026 14:57:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E4=BA=91=E5=B0=8F?= =?UTF-8?q?=E7=BC=96=E6=8A=BD=E5=A5=96=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/middle_play_do_lottery.js | 24 + module/middle_play_lottery_remain_chance.js | 17 + module/rep_ugc_exam_info_get.js | 28 ++ module/rep_ugc_exam_question_single_get.js | 32 ++ module/rep_ugc_exam_result_get.js | 32 ++ module/rep_ugc_exam_start.js | 24 + module/rep_ugc_exam_submit.js | 36 ++ public/docs/home.md | 98 ++++ public/index.html | 3 +- public/ugc.html | 212 +++++++- public/ugc_lottery.html | 506 ++++++++++++++++++++ 11 files changed, 994 insertions(+), 18 deletions(-) create mode 100644 module/middle_play_do_lottery.js create mode 100644 module/middle_play_lottery_remain_chance.js create mode 100644 module/rep_ugc_exam_info_get.js create mode 100644 module/rep_ugc_exam_question_single_get.js create mode 100644 module/rep_ugc_exam_result_get.js create mode 100644 module/rep_ugc_exam_start.js create mode 100644 module/rep_ugc_exam_submit.js create mode 100644 public/ugc_lottery.html diff --git a/module/middle_play_do_lottery.js b/module/middle_play_do_lottery.js new file mode 100644 index 0000000..6ef5d9d --- /dev/null +++ b/module/middle_play_do_lottery.js @@ -0,0 +1,24 @@ +// 云小编每日抽奖 +// +// activityId: +// 默认 6501202 +// +// drawCount: +// 默认 1 +// +// checkToken: +// 易盾反作弊 Token + +const createOption = require('../util/option.js') + +module.exports = (query, request) => { + const data = { + activityId: query.activityId || '6501202', + drawCount: query.drawCount || '1', + } + return request( + `/api/middle/play/do/lottery`, + data, + createOption(query, 'eapi', 'v3'), + ) +} diff --git a/module/middle_play_lottery_remain_chance.js b/module/middle_play_lottery_remain_chance.js new file mode 100644 index 0000000..ef65392 --- /dev/null +++ b/module/middle_play_lottery_remain_chance.js @@ -0,0 +1,17 @@ +// 云小编抽奖剩余次数查询 +// +// activityId: +// 默认 6501202 + +const createOption = require('../util/option.js') + +module.exports = (query, request) => { + const data = { + activityId: query.activityId || '6501202', + } + return request( + `/api/middle/play/lottery/remain/chance`, + data, + createOption(query, 'eapi'), + ) +} diff --git a/module/rep_ugc_exam_info_get.js b/module/rep_ugc_exam_info_get.js new file mode 100644 index 0000000..62fee45 --- /dev/null +++ b/module/rep_ugc_exam_info_get.js @@ -0,0 +1,28 @@ +// 云小编考试状态 +// +// examType: +// 1. 歌曲曲风审核: musicalStyleEnter +// 2. 歌曲语种审核: languageEnter +// 3. 歌曲原唱审核: oriSingerEnter +// 4. 情绪标签审核: emotionEnter + +const createOption = require('../util/option.js') + +module.exports = (query, request) => { + if (!query.examType) + return Promise.reject({ + status: 400, + body: { + code: 400, + message: '参数不足', + }, + }) + const data = { + examType: query.examType, + } + return request( + '/api/rep/ugc/exam/info/get', + data, + createOption(query, 'eapi'), + ) +} diff --git a/module/rep_ugc_exam_question_single_get.js b/module/rep_ugc_exam_question_single_get.js new file mode 100644 index 0000000..7a35921 --- /dev/null +++ b/module/rep_ugc_exam_question_single_get.js @@ -0,0 +1,32 @@ +// 云小编考试取题 +// +// examType: +// 1. 歌曲曲风审核: musicalStyleEnter +// 2. 歌曲语种审核: languageEnter +// 3. 歌曲原唱审核: oriSingerEnter +// 4. 情绪标签审核: emotionEnter +// +// taskId: +// 首次调用 rep/ugc/exam/start 获取,之后调用 rep/ugc/exam/info/get 获取 + +const createOption = require('../util/option.js') + +module.exports = (query, request) => { + if (!query.examType || !query.taskId) + return Promise.reject({ + status: 400, + body: { + code: 400, + message: '参数不足', + }, + }) + const data = { + examType: query.examType, + taskId: query.taskId, + } + return request( + '/api/rep/ugc/exam/question/single/get', + data, + createOption(query, 'eapi'), + ) +} diff --git a/module/rep_ugc_exam_result_get.js b/module/rep_ugc_exam_result_get.js new file mode 100644 index 0000000..9d21f43 --- /dev/null +++ b/module/rep_ugc_exam_result_get.js @@ -0,0 +1,32 @@ +// 云小编考试结果 +// +// examType: +// 1. 歌曲曲风审核: musicalStyleEnter +// 2. 歌曲语种审核: languageEnter +// 3. 歌曲原唱审核: oriSingerEnter +// 4. 情绪标签审核: emotionEnter +// +// taskId: +// 首次调用 rep/ugc/exam/start 获取,之后调用 rep/ugc/exam/info/get 获取 + +const createOption = require('../util/option.js') + +module.exports = (query, request) => { + if (!query.examType || !query.taskId) + return Promise.reject({ + status: 400, + body: { + code: 400, + message: '参数不足', + }, + }) + const data = { + examType: query.examType, + taskId: query.taskId, + } + return request( + '/api/rep/ugc/exam/result/get', + data, + createOption(query, 'eapi'), + ) +} diff --git a/module/rep_ugc_exam_start.js b/module/rep_ugc_exam_start.js new file mode 100644 index 0000000..b19347b --- /dev/null +++ b/module/rep_ugc_exam_start.js @@ -0,0 +1,24 @@ +// 云小编考试开始 +// +// examType: +// 1. 歌曲曲风审核: musicalStyleEnter +// 2. 歌曲语种审核: languageEnter +// 3. 歌曲原唱审核: oriSingerEnter +// 4. 情绪标签审核: emotionEnter + +const createOption = require('../util/option.js') + +module.exports = (query, request) => { + if (!query.examType) + return Promise.reject({ + status: 400, + body: { + code: 400, + message: '参数不足', + }, + }) + const data = { + examType: query.examType, + } + return request('/api/rep/ugc/exam/start', data, createOption(query, 'eapi')) +} diff --git a/module/rep_ugc_exam_submit.js b/module/rep_ugc_exam_submit.js new file mode 100644 index 0000000..2b38f8f --- /dev/null +++ b/module/rep_ugc_exam_submit.js @@ -0,0 +1,36 @@ +// 云小编考试提交 +// +// examType: +// 1. 歌曲曲风审核: musicalStyleEnter +// 2. 歌曲语种审核: languageEnter +// 3. 歌曲原唱审核: oriSingerEnter +// 4. 情绪标签审核: emotionEnter +// +// taskId: +// 首次调用 rep/ugc/exam/start 获取,之后调用 rep/ugc/exam/info/get 获取 +// +// questionId: +// 调用 rep/ugc/exam/question/single/get 获取 +// +// answer: +// A 对, B 错 + +const createOption = require('../util/option.js') + +module.exports = (query, request) => { + if (!query.examType || !query.taskId || !query.questionId || !query.answer) + return Promise.reject({ + status: 400, + body: { + code: 400, + message: '参数不足', + }, + }) + const data = { + examType: query.examType, + taskId: query.taskId, + questionId: query.questionId, + answer: query.answer, + } + return request('/api/rep/ugc/exam/submit', data, createOption(query, 'eapi')) +} diff --git a/public/docs/home.md b/public/docs/home.md index 91970a4..d9e97c5 100644 --- a/public/docs/home.md +++ b/public/docs/home.md @@ -5604,6 +5604,104 @@ let data = encodeURIComponent( **调用例子:** `/rep/ugc/user/collect-vip?activityId=5001` +### 云小编 - 剩余抽奖次数 + +说明: 登录后调用此接口, 获取今日云小编抽奖剩余次数 + +**可选参数:** + +`activityId`: 活动 ID, 默认 `6501202` + +**接口地址:** `/middle/play/lottery/remain/chance` + +**调用例子:** `/middle/play/lottery/remain/chance?activityId=6501202` + +### 云小编 - 每日抽奖 + +说明: 登录后调用此接口, 消耗 200 积分进行抽奖, 每日最多抽 3 次 + +> 注意: 抽奖失败也消耗每日次数, 请先调用 `/rep/ugc/user/get` 查询可用积分 + +**可选参数:** + +`activityId`: 活动 ID, 默认 `6501202` + +`drawCount`: 未知, 默认 `1` + +**接口地址:** `/middle/play/do/lottery` + +**调用例子:** `/middle/play/do/lottery?activityId=6501202&drawCount=1` + +### 云小编 - 考试状态 + +说明: 登录后调用此接口, 查询云小编入站考试状态, 进度 (`data.process`): no: 未开始, process: 考试中, whole_exam_end: 已结束, 此时可检查 `data.hasPassExamination` 确认是否通过 + +**必选参数:** + +`examType`: 考试类型, musicalStyleEnter: 歌曲曲风审核, languageEnter: 歌曲语种审核, oriSingerEnter: 歌曲原唱审核, emotionEnter: 情绪标签审核 + +**接口地址:** `/rep/ugc/exam/info/get` + +**调用例子:** `/rep/ugc/exam/info/get?examType=emotionEnter` + +### 云小编 - 考试开始 + +说明: 未考试或考试失败时调用此接口, 开始新一轮考试 + +**必选参数:** + +`examType`: 考试类型, musicalStyleEnter: 歌曲曲风审核, languageEnter: 歌曲语种审核, oriSingerEnter: 歌曲原唱审核, emotionEnter: 情绪标签审核 + +**接口地址:** `/rep/ugc/exam/start` + +**调用例子:** `/rep/ugc/exam/start?examType=emotionEnter` + +### 云小编 - 考试取题 + +说明: 考试开始后调用此接口, 获取当前试题 + +**必选参数:** + +`examType`: 考试类型, musicalStyleEnter: 歌曲曲风审核, languageEnter: 歌曲语种审核, oriSingerEnter: 歌曲原唱审核, emotionEnter: 情绪标签审核 + +`taskId`: 任务 ID, 首次调用 `/rep/ugc/exam/start` 获取,之后调用 `/rep/ugc/exam/info/get` 获取 + +**接口地址:** `/rep/ugc/exam/question/single/get` + +**调用例子:** `/rep/ugc/exam/question/single/get?examType=emotionEnter&taskId=123456` + +### 云小编 - 考试提交 + +说明: 取题后调用此接口, 提交作答结果 + +**必选参数:** + +`examType`: 考试类型, musicalStyleEnter: 歌曲曲风审核, languageEnter: 歌曲语种审核, oriSingerEnter: 歌曲原唱审核, emotionEnter: 情绪标签审核 + +`taskId`: 任务 ID, 首次调用 `/rep/ugc/exam/start` 获取,之后调用 `/rep/ugc/exam/info/get` 获取 + +`questionId`: 试题 ID, 调用 `/rep/ugc/exam/question/single/get` 获取 + +`answer`: 判断结果, A: 对, B: 错 + +**接口地址:** `/rep/ugc/exam/submit` + +**调用例子:** `/rep/ugc/exam/submit?examType=emotionEnter&taskId=123456&questionId=123456&answer=A` + +### 云小编 - 考试结果 + +说明: 考试结束后调用此接口, 获取考试正确数与正确率 + +**必选参数:** + +`examType`: 考试类型, musicalStyleEnter: 歌曲曲风审核, languageEnter: 歌曲语种审核, oriSingerEnter: 歌曲原唱审核, emotionEnter: 情绪标签审核 + +`taskId`: 任务 ID, 首次调用 `/rep/ugc/exam/start` 获取,之后调用 `/rep/ugc/exam/info/get` 获取 + +**接口地址:** `/rep/ugc/exam/result/get` + +**调用例子:** `/rep/ugc/exam/result/get?examType=emotionEnter&taskId=123456` + ### 发送/删除评论 说明 : 调用此接口,可发送评论或者删除评论 diff --git a/public/index.html b/public/index.html index 00058b8..20752e7 100644 --- a/public/index.html +++ b/public/index.html @@ -99,7 +99,8 @@ curl -s {origin}/search?keywords=网易云 听歌打卡示例 · 获取 CheckToken · 免费听权益 · - 云小编任务中心 + 云小编任务中心 · + 云小编每日抽奖 diff --git a/public/ugc.html b/public/ugc.html index b258bd2..b0ed3a0 100644 --- a/public/ugc.html +++ b/public/ugc.html @@ -4,6 +4,8 @@ + + 云小编任务中心 - 网易云音乐 API Enhanced + + + +
+ +
+

🎉 云小编每日抽奖

+

每次抽奖消耗 200 个曲库编辑部积分,每日最多可抽奖 3 次

+
+ +
+
等待抽奖
+
+ + +
+ + 就绪,点击按钮开始抽奖 +
+
+ + +
+ + + + + \ No newline at end of file