对于已过期活动的脚本,添加通知提醒
This commit is contained in:
@@ -83,8 +83,14 @@ const JD_API_HOST = 'https://api.m.jd.com/api';
|
||||
})
|
||||
|
||||
function showMsg() {
|
||||
return new Promise(resolve => {
|
||||
$.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
|
||||
return new Promise(async resolve => {
|
||||
let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
|
||||
if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) {
|
||||
$.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"});
|
||||
if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`)
|
||||
} else {
|
||||
$.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user