update jd_blueCoin.js ,云端多账号内容全集中到一次通知,注:部分推送方式可能会对内容有长度限制可能会导致推送失败或者推送内容不完整
This commit is contained in:
@@ -22,6 +22,7 @@ cron "0 0 0 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/j
|
|||||||
*/
|
*/
|
||||||
const $ = new Env('东东超市兑换奖品');
|
const $ = new Env('东东超市兑换奖品');
|
||||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||||
|
let allMessage = '';
|
||||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||||
let coinToBeans = $.getdata('coinToBeans') || 20; //兑换多少数量的京豆(20或者1000),0表示不兑换,默认兑换20京豆,如需兑换把0改成20或者1000,或者'商品名称'(商品名称放到单引号内)即可
|
let coinToBeans = $.getdata('coinToBeans') || 20; //兑换多少数量的京豆(20或者1000),0表示不兑换,默认兑换20京豆,如需兑换把0改成20或者1000,或者'商品名称'(商品名称放到单引号内)即可
|
||||||
@@ -88,6 +89,9 @@ const JD_API_HOST = `https://api.m.jd.com/api?appid=jdsupermarket`;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($.isNode() && allMessage) {
|
||||||
|
await notify.sendNotify(`${$.name}`, `${allMessage}`)
|
||||||
|
}
|
||||||
})()
|
})()
|
||||||
.catch((e) => $.logErr(e))
|
.catch((e) => $.logErr(e))
|
||||||
.finally(() => $.done())
|
.finally(() => $.done())
|
||||||
@@ -355,9 +359,10 @@ function msgShow() {
|
|||||||
//默认只在兑换奖品成功后弹窗提醒。情况情况加,只打印日志,不弹窗
|
//默认只在兑换奖品成功后弹窗提醒。情况情况加,只打印日志,不弹窗
|
||||||
if ($.beanscount && ctrTemp) {
|
if ($.beanscount && ctrTemp) {
|
||||||
$.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n${coinToBeans ? `【兑换${$.title}】${ $.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}`);
|
$.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n${coinToBeans ? `【兑换${$.title}】${ $.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}`);
|
||||||
if ($.isNode()) {
|
allMessage += `【京东账号${$.index}】${$.nickName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}${$.index !== cookiesArr.length ? '\n\n' : ''}`
|
||||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}`)
|
// if ($.isNode()) {
|
||||||
}
|
// await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}`)
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user