chore(qdreader): document task matrix and compat

This commit is contained in:
2026-05-20 22:37:28 +08:00
parent e035a760de
commit 46369d9af2
4 changed files with 41 additions and 9 deletions
+6 -3
View File
@@ -62,15 +62,18 @@ GET /api/sms/stats
初始通用仓库骨架已创建。等待 BOSS 上传既有 Autman 插件后,再按实际风格补齐实现。
### 点读书 QDReader 签到插件
### 点读书 QDReader 签到插件
- 正式源码:`plugins/qdreader/qdreader_sign_autman.js`
- 实机 JS 副本:`js/qdreader_sign_autman.js`
- 定时运行:`cron: 1 7 * * *`,每日 07:01 自动签到;签到结束后立即归档并清空最近运行日志
- 手动运行:`启点签到` / `启点签到 <uid>`
- Cookie 维护:`启点账号` / `启点ck <cookie>` / `启点查询`
- 完全体任务:`启点任务` 菜单按需开启激励任务、每日任务、每日抽奖、每周兑换、章节卡片、大咖荐书;默认只执行签到 + 领取奖励
- v2.6.0:适配上游 QDReader 完全体任务框架,保留 Autman 单插件、独立 bucket、多用户隔离、手动只跑当前用户、cron 跑全部账号、运行后立即归档清日志。
- 任务配置入口`启点账号` `账号任务配置`,按账号保存到 `qdreader_task_pref_json``all on/off` 只影响选中的账号
- 默认执行:主签到 `/argus/api/v3/checkin/checkin` + 固定低风险领取奖励 `/argus/api/v3/checkin/receivegifts`
- 可选任务(默认关闭):激励任务 `mainPage`/`finishWatch`、每日任务 `packagelist`/`finishWatch`、每日抽奖 `detail`/`lottery`、每周兑换 `checkinexchangepage`/`exchangegoods`(仅周日)、章节卡片 `chaptercardwithbook`、大咖荐书 `pullmessage`(仅北京时间 20:00-22:00
- 签名环境:相对路径走 `https://h5.if.qidian.com`;大咖荐书使用绝对地址 `https://magev6.if.qidian.com/argus/api/v2/message/pullmessage`;请求签名 method 使用小写;Autman 运行时需支持 `BigInt`(插件避免使用 BigInt 字面量以兼容较旧 JS 解析器)
- v2.10.3:复核全部任务矩阵、补齐执行窗口/接口文档,并移除 BigInt 字面量,保留 Autman 单插件、独立 bucket、多用户隔离、手动只跑当前用户、cron 跑全部账号、运行后立即归档清日志。
Raw 导入:
+5 -3
View File
@@ -4,7 +4,7 @@
//[author: Hermes]
//[service: BOSS]
//[class: 工具类]
//[version: 2.10.2]
//[version: 2.10.3]
//[platform: web,qq,wx,tg,tb,fs,we]
//[public: false]
//[price: 0]
@@ -605,9 +605,11 @@ function taskFinished(task) { return Number(field(task, ["IsFinished", "Finished
function makeBase62Token(num) {
var alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
var n = BigInt(num)
if (n === BigInt(0)) return "0"
var zero = BigInt(0)
var base = BigInt(62)
if (n === zero) return "0"
var out = ""
while (n > 0n) { out = alphabet[Number(n % 62n)] + out; n = n / 62n }
while (n > zero) { out = alphabet[Number(n % base)] + out; n = n / base }
return out
}
function doReceiveGifts(cookie) {
+5 -3
View File
@@ -4,7 +4,7 @@
//[author: Hermes]
//[service: BOSS]
//[class: 工具类]
//[version: 2.10.2]
//[version: 2.10.3]
//[platform: web,qq,wx,tg,tb,fs,we]
//[public: false]
//[price: 0]
@@ -605,9 +605,11 @@ function taskFinished(task) { return Number(field(task, ["IsFinished", "Finished
function makeBase62Token(num) {
var alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
var n = BigInt(num)
if (n === BigInt(0)) return "0"
var zero = BigInt(0)
var base = BigInt(62)
if (n === zero) return "0"
var out = ""
while (n > 0n) { out = alphabet[Number(n % 62n)] + out; n = n / 62n }
while (n > zero) { out = alphabet[Number(n % base)] + out; n = n / base }
return out
}
function doReceiveGifts(cookie) {
+25
View File
@@ -70,6 +70,31 @@ function test(name, fn) {
}
}
test('plugin source avoids BigInt literal syntax for older Autman JS parsers', () => {
assert.doesNotMatch(code, /\b\d+n\b/);
});
test('README documents QDReader task schedule windows and required endpoints', () => {
const readme = fs.readFileSync(new URL('../README.md', import.meta.url), 'utf8');
for (const token of [
'cron: 1 7 * * *',
'qdreader_task_pref_json',
'receivegifts',
'mainPage',
'finishWatch',
'packagelist',
'lottery',
'checkinexchangepage',
'exchangegoods',
'chaptercardwithbook',
'20:00-22:00',
'magev6.if.qidian.com/argus/api/v2/message/pullmessage',
'BigInt',
]) assert.match(readme, new RegExp(token.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
});
test('manual cookie save masks cookie and stores by uid', () => {
const r = runPlugin({ content: '启点ck ' + cookie });
assert.match(r.replies.join('\n'), /CK新增成功/);