fix: show full kyapp ck in qx notification

This commit is contained in:
2026-05-30 01:34:28 +08:00
parent bb390a3b38
commit d111612aea
+7 -1
View File
@@ -114,6 +114,12 @@ function getPending() {
token_body: getPref('kyapp_pending_token_body', '') token_body: getPref('kyapp_pending_token_body', '')
} }
} }
function formatCk(rec) {
return JSON.stringify({ device_id: rec.device_id, token_body: rec.token_body, txAmount: 3 })
}
function notifyCk(rec) {
notify('CK 获取成功', formatCk(rec))
}
function setPending(p) { function setPending(p) {
if (p.device_id) setPref('kyapp_pending_device_id', p.device_id) if (p.device_id) setPref('kyapp_pending_device_id', p.device_id)
if (p.token_body) setPref('kyapp_pending_token_body', p.token_body) if (p.token_body) setPref('kyapp_pending_token_body', p.token_body)
@@ -190,7 +196,6 @@ async function main() {
if (token) pending.token_body = token if (token) pending.token_body = token
if (device) pending.device_id = device if (device) pending.device_id = device
setPending(pending) setPending(pending)
notify('CK 获取成功', '')
} }
if (/\/task\/get_task_page_info/.test(url)) { if (/\/task\/get_task_page_info/.test(url)) {
@@ -211,6 +216,7 @@ async function main() {
} }
const record = { device_id: pending.device_id, token_body: pending.token_body, txAmount: 3 } const record = { device_id: pending.device_id, token_body: pending.token_body, txAmount: 3 }
notifyCk(record)
let records = mergeRecord(loadLocalRecords(), record) let records = mergeRecord(loadLocalRecords(), record)
saveLocalRecords(records) saveLocalRecords(records)
try { try {