fix: remove qdreader message box time gate

This commit is contained in:
2026-05-22 19:10:43 +08:00
parent b7afbf421a
commit c7011a43ea
5 changed files with 13 additions and 15 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ GET /api/sms/stats
- Cookie 维护:`启点账号` / `启点ck <cookie>` / `启点查询`
- 任务配置入口:`启点账号``账号任务配置`,按账号保存到 `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
- 可选任务(默认关闭):激励任务 `mainPage`/`finishWatch`、每日任务 `packagelist`/`finishWatch`、每日抽奖 `detail`/`lottery`、每周兑换 `checkinexchangepage`/`exchangegoods`(仅周日)、章节卡片 `chaptercardwithbook`、大咖荐书 `pullmessage`
- 签名环境:相对路径走 `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 跑全部账号、运行后立即归档清日志。
+2 -2
View File
@@ -650,7 +650,7 @@ QDReader 签到结果判定补充:
- 激励任务 `finishWatch` 可能返回 `result=9``Result=9`,上游将其视为可继续/已受理,再回查 `mainPage` 判断任务是否完成;插件不能把大小写不同的 `result=9` 直接计为失败。
- 每日任务不是简单取任务列表第一个。上游会先处理 `packagelist` 里的惊喜/前置任务,再从任务列表按标题定位“每日任务”,执行多次 `finishWatch` 后回查完成状态。
- 大咖荐书不是一次 `pullmessage` 即结束。消息 token 需要由 `UserId` 经过 `(uid * 4 & 0x7ffffffffffffffc) ^ 0x113a4f` 后转 base62;流程是:拉会话列表(`appappend` + `categoryIds=0`)→ 对红点会话带 `fromId` 拉消息 → 从最近消息的 `ActionUrl/RefUrl` 提取 `orderId``/argus/api/v1/interaction/rewarddetail``refresh=0`)→ 根据 `ChanceCount/BookStatus``/argus/api/v1/interaction/rewardcallback``/argus/api/v1/interaction/rewardaddshelf`。如果直接用十进制 token、旧的 `token/type/senderId` 参数,或旧的 `/argus/api/v2/recommend/...` 路径,实测会偏离当前上游并容易返回“参数错误”。
- 大咖荐书应限制在北京时间 `20:00-22:00` 窗口执行;窗口外要标记为跳过并避免调用消息接口,否则晚间窗口后容易返回“参数错误”并污染整账号结果
- 大咖荐书不应再做固定北京时间窗口限制;当前反混淆上游里没有 `20:00-22:00` 之类限制,只保留“消息必须是最近一段时间”的过滤。若接口在某些时段返回空列表/无未读消息,按正常无任务处理,不要在插件侧提前跳过
- “无可领取礼包/今日已签到”属于幂等成功类提示;这类提示不应让整个账号汇总失败。
- 每次修复这类链路必须补 VM 回归测试:请求路径、签名 payload 里的参数、特殊返回码分类、最终账号成功/失败汇总。
@@ -689,7 +689,7 @@ QDReader 签到结果判定补充:
| 每日抽奖 | 账号开启后执行 | `checkin/detail``checkin/lottery` |
| 每周兑换 | 账号开启且北京时间周日 | `checkin/checkinexchangepage``checkin/exchangegoods` |
| 章节卡片 | 账号开启后执行 | `readtime/scoremall/chaptercardwithbook` |
| 大咖荐书 | 账号开启且北京时间 20:00-22:00 | `magev6.if.qidian.com/.../pullmessage``getrewarddetail``rewardcallback/addbookshelf` |
| 大咖荐书 | 账号开启 | `magev6.if.qidian.com/.../pullmessage``getRewardDetail``rewardCallback/rewardAddShelf` |
### 14.4 上游返回和签名网关要按实测分类
+2 -4
View File
@@ -744,17 +744,15 @@ function recentCreateTime(v) {
return now - t >= 0 && now - t <= 24 * 60 * 60 * 1000
}
function beijingHour(dateLike) { return beijingDate(dateLike).getUTCHours() }
function messageBoxWindowLabel() { return "20:00-22:00" }
function messageBoxWindowLabel() { return "全天" }
function messageBoxAllowedNow() {
var h = beijingHour()
return h >= 20 && h < 22
return true
}
function orderIdFromText(s) {
var m = String(s || "").match(/orderId=([a-f0-9]+)/i)
return m ? m[1] : ""
}
function doMessageBox(cookie) {
if (!messageBoxAllowedNow()) return { name: "大咖荐书", ok: true, skipped: true, msg: "不在执行时间 " + messageBoxWindowLabel() + ",已跳过", path: "https://magev6.if.qidian.com/argus/api/v2/message/pullmessage" }
var token = messageTokenFromCookie(cookie)
if (!token) return { name: "大咖荐书", ok: true, msg: "缺少消息 token,已跳过", path: "https://magev6.if.qidian.com/argus/api/v2/message/pullmessage" }
var baseParams = { appappend: token, categoryIds: "0", pg: "1", pz: "10" }
+2 -4
View File
@@ -744,17 +744,15 @@ function recentCreateTime(v) {
return now - t >= 0 && now - t <= 24 * 60 * 60 * 1000
}
function beijingHour(dateLike) { return beijingDate(dateLike).getUTCHours() }
function messageBoxWindowLabel() { return "20:00-22:00" }
function messageBoxWindowLabel() { return "全天" }
function messageBoxAllowedNow() {
var h = beijingHour()
return h >= 20 && h < 22
return true
}
function orderIdFromText(s) {
var m = String(s || "").match(/orderId=([a-f0-9]+)/i)
return m ? m[1] : ""
}
function doMessageBox(cookie) {
if (!messageBoxAllowedNow()) return { name: "大咖荐书", ok: true, skipped: true, msg: "不在执行时间 " + messageBoxWindowLabel() + ",已跳过", path: "https://magev6.if.qidian.com/argus/api/v2/message/pullmessage" }
var token = messageTokenFromCookie(cookie)
if (!token) return { name: "大咖荐书", ok: true, msg: "缺少消息 token,已跳过", path: "https://magev6.if.qidian.com/argus/api/v2/message/pullmessage" }
var baseParams = { appappend: token, categoryIds: "0", pg: "1", pz: "10" }
+6 -4
View File
@@ -93,7 +93,6 @@ test('README documents QDReader task schedule windows and required endpoints', (
'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, '\\$&')));
@@ -1161,7 +1160,7 @@ test('daily task follows upstream sequence: surprise task, one-ad task, then thr
});
test('message box skips outside Beijing 20-22 window without calling message API', () => {
test('message box runs outside former Beijing 20-22 window and calls message API', () => {
const store = {
qdreader_cookie_json: JSON.stringify({ '12345': cookie }),
qdreader_user_bind_json: JSON.stringify({ '12345': 'user-a' }),
@@ -1178,11 +1177,14 @@ test('message box skips outside Beijing 20-22 window without calling message API
{ statusCode: 200, body: { code: 1, msg: '今日已签到' } },
{ body: { code: 0, data: { headers: { 'QD-Sign': 'sig' } } } },
{ statusCode: 200, body: { code: 1, msg: '无可领取礼包' } },
{ body: { code: 0, data: { headers: { 'QD-Sign': 'sig' } } } },
{ statusCode: 200, body: { code: 0, Data: { UserList: [] } } },
],
});
assert.match(r.replies[0], /大咖荐书⏭\(不在执行时间 20:00-22:00已跳过\)/);
assert.doesNotMatch(r.replies[0], /不在执行时间|已跳过/);
assert.match(r.replies[0], /大咖荐书✅\(无消息\)/);
assert.match(r.replies[0], /汇总:成功 1 \/ 失败 0 \/ 总计 1/);
assert.equal(r.calls.some(c => /message\/pullmessage/.test(c.url)), false);
assert.equal(r.calls.some(c => /message\/pullmessage/.test(c.url)), true);
});
test('message box uses upstream appappend/fromId/interaction reward chain instead of parameter-error one-shot', () => {