From 8b2a52363fc59e13129112e953c0bc45bf585e76 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Tue, 10 Nov 2020 17:49:29 +0800 Subject: [PATCH] update --- backUp/box.dat | 1 - jd_818.js | 7 +++---- jd_xtg.js | 10 +++------- 3 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 backUp/box.dat diff --git a/backUp/box.dat b/backUp/box.dat deleted file mode 100644 index a7d5bbb..0000000 --- a/backUp/box.dat +++ /dev/null @@ -1 +0,0 @@ -{"xmSportsToken":"NQVBQFJyQktGHlp6QkpbRl5LRl5qek4uXAQEBAAAAAGO7kpHjD12b7XMcMKDSBdSnFqUjo0nKgND2uVe2RU10bVRzihKr9fi1iytA--qwNLIo345eRNP9QGAi7n3r0_yx1pRNSNJo90wQTheHJ0E94wjCWzCVsyqOpdMnnJig6M_nMddl5XR-KdonsCjn-zR_W8ErxueIr4O7QH4ZXUK6Kyrj5FHU_zqW5Zqd9__ALGFOaY1c6tC4A28YNdhF9pA"} \ No newline at end of file diff --git a/jd_818.js b/jd_818.js index 0409feb..c3d0634 100644 --- a/jd_818.js +++ b/jd_818.js @@ -49,7 +49,7 @@ if ($.isNode()) { } const JD_API_HOST = 'https://rdcseason.m.jd.com/api/'; -const activeEndTime = '2020/11/13 01:00:00'; +const activeEndTime = '2020/11/13 01:00:00+08:00'; const addUrl = 'http://jd.turinglabs.net/helpcode/create/'; const printUrl = `http://jd.turinglabs.net/helpcode/print/20/`; let helpCode = [] @@ -74,8 +74,6 @@ let helpCode = [] if ($.isNode()) await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); continue } - message = ''; - subTitle = ''; await JD818(); // await getHelp(); // await doHelp(); @@ -906,7 +904,8 @@ function TotalBean() { }) } async function showMsg() { - if (Date.now() > new Date(activeEndTime).getTime()) { + let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; + if (nowTime > new Date(activeEndTime).getTime()) { $.msg($.name, '活动已结束', `该活动累计获得京豆:${$.jbeanCount}个\niOS用户请删除此脚本\ngithub action用户请删除.github/workflows/jd_818.yml文件\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"}); if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `请删除此脚本\ngithub action用户请删除.github/workflows/jd_818.yml文件\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\n https://github.com/lxk0301/jd_scripts`) } else { diff --git a/jd_xtg.js b/jd_xtg.js index 77449ad..4c29dfc 100644 --- a/jd_xtg.js +++ b/jd_xtg.js @@ -25,7 +25,7 @@ 京东星推官 = type=cron,cronexp=2 0 * * *,wake-system=1,timeout=320,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_xtg.js */ const $ = new Env('京东星推官'); -const activeEndTime = '2020/11/12 23:59:59';//活动结束时间 +const activeEndTime = '2020/11/12 23:59:59+08:00';//活动结束时间 const notify = $.isNode() ? require('./sendNotify') : ''; //Node.js用户请在jdCookie.js处填写京东ck; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; @@ -147,17 +147,13 @@ async function showMsg() { console.log(`\n做任务之前京豆总计:${$.beanCount}`) console.log(`做完任务后京豆总计:${$.jdNum}`); console.log(`活动活动京豆数量:${$.jdNum - $.beanCount}`); - let nowTime = Date.now(); - const zone = new Date().getTimezoneOffset(); - if (zone === 0) { - nowTime += 28800000;//UTC-0时区加上8个小时 - } + let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; if (nowTime > new Date(activeEndTime).getTime()) { $.msg($.name, '活动已结束', `请删除或禁用此脚本\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"}); if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `请删除此脚本\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`) } else { $.msg($.name, `账号${$.index} ${$.nickName || $.UserName}`, `做任务之前京豆总计:${$.beanCount}\n做完任务后京豆总计:${$.jdNum}\n${($.jdNum - $.beanCount) > 0 ? `获得京豆:${$.jdNum - $.beanCount}京豆 🐶(仅供参考)\n` : ''}京豆先到先得\n活动地址点击弹窗跳转后即可查看\n注:如未获得京豆就是已被分完`, {"open-url": "https://prodev.m.jd.com/mall/active/3gSzKSnvrrhYushciUpzHcDnkYE3/index.html"}) - if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}`, `账号${$.index} ${$.nickName || $.UserName}\n做任务之前京豆总计:${$.beanCount}\n做完任务后京豆总计:${$.jdNum}\n${($.jdNum - $.beanCount) > 0 ? `获得京豆:${$.jdNum - $.beanCount}京豆 🐶(仅供参考)\n` : ''}京豆先到先得\n注:如未获得京豆就是已被分完\n活动地址:https://prodev.m.jd.com/mall/active/3gSzKSnvrrhYushciUpzHcDnkYE3/index.html`) + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}`, `账号${$.index} ${$.nickName || $.UserName}\n做任务之前京豆总计:${$.beanCount}\n做完任务后京豆总计:${$.jdNum}\n${($.jdNum - $.beanCount) > 0 ? `获得京豆:${$.jdNum - $.beanCount}京豆 🐶(仅供参考)\n` : ''}京豆先到先得\n注:如未获得京豆就是已被分完\n活动结束时间:2020年11月12日 23:59:59\n活动地址:https://prodev.m.jd.com/mall/active/3gSzKSnvrrhYushciUpzHcDnkYE3/index.html`) } } async function JD_XTG() {