调整部分脚本通知频率, 运行无京豆不进行通知
This commit is contained in:
@@ -135,10 +135,14 @@ async function jdWish() {
|
|||||||
function showMsg() {
|
function showMsg() {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
message += `本次获得${parseInt($.totalBeanNum) - $.nowBean}京豆,${parseInt($.totalNum) - $.nowNum}金币\n`
|
message += `本次获得${parseInt($.totalBeanNum) - $.nowBean}京豆,${parseInt($.totalNum) - $.nowNum}金币\n`
|
||||||
message += `累计获得${$.totalBeanNum}京豆,${$.totalNum}金币\n`
|
message += `累计获得${$.totalBeanNum}京豆,${$.totalNum}金币\n可兑换${$.totalNum / 10000}元无门槛红包`
|
||||||
|
if (parseInt($.totalBeanNum) - $.nowBean > 0) {
|
||||||
$.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
|
$.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
|
||||||
|
} else {
|
||||||
|
$.log(message)
|
||||||
|
}
|
||||||
// 云端大于10元无门槛红包时进行通知推送
|
// 云端大于10元无门槛红包时进行通知推送
|
||||||
if ($.isNode() && $.totalScore >= 10000) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${$.nickName}\n当前金币:${$.totalScore}个\n可兑换无门槛红包:${parseInt($.totalNum) / 1000}元\n`,)
|
if ($.isNode() && $.totalNum >= 100000) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${$.nickName}\n当前金币:${$.totalNum}个\n可兑换无门槛红包:${parseInt($.totalNum) / 10000}元\n`,)
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@@ -96,7 +96,7 @@ async function jd_necklace() {
|
|||||||
function showMsg() {
|
function showMsg() {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
|
let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
|
||||||
if (nowTimes.getHours() >= 20) {
|
if (nowTimes.getHours() >= 20 && $.totalScore >= 10000) {
|
||||||
$.msg($.name, '', `京东账号${$.index} ${$.nickName}\n当前${$.name}:${$.totalScore}个\n可兑换无门槛红包:${$.totalScore / 1000}元\n点击弹窗即可去兑换(注:此红包具有时效性)`, { 'open-url': openUrl});
|
$.msg($.name, '', `京东账号${$.index} ${$.nickName}\n当前${$.name}:${$.totalScore}个\n可兑换无门槛红包:${$.totalScore / 1000}元\n点击弹窗即可去兑换(注:此红包具有时效性)`, { 'open-url': openUrl});
|
||||||
}
|
}
|
||||||
// 云端大于10元无门槛红包时进行通知推送
|
// 云端大于10元无门槛红包时进行通知推送
|
||||||
|
@@ -262,7 +262,8 @@ function interact_template_getLotteryResult(taskId,timeout = 0) {
|
|||||||
function showMsg() {
|
function showMsg() {
|
||||||
message += `任务已完成,本次运行获得京豆${$.beans}`
|
message += `任务已完成,本次运行获得京豆${$.beans}`
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
$.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
|
if ($.beans) $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
|
||||||
|
$.log(`【京东账号${$.index}】${$.nickName}\n${message}`);
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user