fix: show full kyapp ck in qx notification
This commit is contained in:
@@ -114,6 +114,12 @@ function getPending() {
|
||||
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) {
|
||||
if (p.device_id) setPref('kyapp_pending_device_id', p.device_id)
|
||||
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 (device) pending.device_id = device
|
||||
setPending(pending)
|
||||
notify('CK 获取成功', '')
|
||||
}
|
||||
|
||||
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 }
|
||||
notifyCk(record)
|
||||
let records = mergeRecord(loadLocalRecords(), record)
|
||||
saveLocalRecords(records)
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user