update jd_fruit.js&jd_pet.js&jd_joy_reward.js ,云端多账号内容全集中到一次通知,注:部分推送方式可能会对内容有长度限制可能会导致推送失败或者推送内容不完整
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: lxk0301 https://github.com/lxk0301
|
||||
* @Date: 2020-08-16 18:54:16
|
||||
* @Last Modified by: lxk0301
|
||||
* @Last Modified time: 2021-2-26 21:22:37
|
||||
* @Last Modified time: 2021-2-27 21:22:37
|
||||
*/
|
||||
/*
|
||||
宠汪汪积分兑换奖品脚本, 目前脚本只兑换京豆,兑换京豆成功,才会发出通知提示,其他情况不通知。
|
||||
@@ -37,6 +37,7 @@ cron "0 0-16/8 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/maste
|
||||
});
|
||||
|
||||
const $ = new Env('宠汪汪积分兑换奖品');
|
||||
let allMessage = '';
|
||||
let joyRewardName = 20;//是否兑换京豆,默认开启兑换功能,其中20为兑换20京豆,500为兑换500京豆,0为不兑换京豆.数量有限先到先得
|
||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||
@@ -80,6 +81,9 @@ const JD_API_HOST = 'https://jdjoy.jd.com';
|
||||
// $.msg($.name, '兑换脚本暂不能使用', `请停止使用,等待后期更新\n如果新版本兑换您有兑换机会,请抓包兑换\n再把抓包数据发送telegram用户@LXK9301`);
|
||||
}
|
||||
}
|
||||
if ($.isNode() && allMessage && ctrTemp) {
|
||||
await notify.sendNotify(`${$.name}`, `${allMessage}`)
|
||||
}
|
||||
})()
|
||||
.catch((e) => {
|
||||
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
|
||||
@@ -145,7 +149,8 @@ async function joyReward() {
|
||||
if (ctrTemp) {
|
||||
$.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【${giftValue}京豆】兑换成功\n【宠物等级】${data.level}\n【积分详情】消耗积分 ${salePrice}, 剩余积分 ${data.coin - salePrice}`);
|
||||
if ($.isNode()) {
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【${giftValue}京豆】兑换成功\n【宠物等级】${data.level}\n【积分详情】消耗积分 ${salePrice}, 剩余积分 ${data.coin - salePrice}`);
|
||||
allMessage += `【京东账号${$.index}】 ${$.nickName}\n【${giftValue}京豆】兑换成功\n【宠物等级】${data.level}\n【积分详情】消耗积分 ${salePrice}, 剩余积分 ${data.coin - salePrice}${$.index !== cookiesArr.length ? '\n\n' : ''}`
|
||||
// await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【${giftValue}京豆】兑换成功\n【宠物等级】${data.level}\n【积分详情】消耗积分 ${salePrice}, 剩余积分 ${data.coin - salePrice}`);
|
||||
}
|
||||
}
|
||||
// if ($.isNode()) {
|
||||
|
Reference in New Issue
Block a user