jd_bean_sign.js脚本目前Bark APP推送通知消息对推送内容长度有限制,会导致此脚本推送失败,故使用了BARK推送的,此脚本会默认改成推送简洁内容
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
京豆签到,自用,可N个京东账号,IOS软件用户请使用 https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js
|
京豆签到,自用,可N个京东账号,IOS软件用户请使用 https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js
|
||||||
Node.JS专用
|
Node.JS专用
|
||||||
更新时间:2020-11-17
|
更新时间:2020-11-26
|
||||||
从 github @ruicky改写而来
|
从 github @ruicky改写而来
|
||||||
version v0.0.1
|
version v0.0.1
|
||||||
create by ruicky
|
create by ruicky
|
||||||
@@ -42,7 +42,7 @@ if ($.isNode()) {
|
|||||||
$.nickName = '';
|
$.nickName = '';
|
||||||
await TotalBean();
|
await TotalBean();
|
||||||
console.log(`*****************开始京东账号${$.index} ${$.nickName || $.UserName}京豆签到*******************\n`);
|
console.log(`*****************开始京东账号${$.index} ${$.nickName || $.UserName}京豆签到*******************\n`);
|
||||||
console.log(`⚠️⚠️⚠️⚠️目前Bark APP推送通知消息失败的,请换用其他通知方式,Bark对推送内容长度有限制 ⚠️⚠️⚠️⚠️\n`)
|
console.log(`⚠️⚠️⚠️⚠️目前Bark APP推送通知消息对推送内容长度有限制,如使用此推送方式脚本会默认转换成简洁内容推送 ⚠️⚠️⚠️⚠️\n`)
|
||||||
await changeFile(content);
|
await changeFile(content);
|
||||||
await execSign();
|
await execSign();
|
||||||
}
|
}
|
||||||
@@ -71,6 +71,7 @@ async function execSign() {
|
|||||||
const barkContentStart = notifyContent.indexOf('【签到概览】')
|
const barkContentStart = notifyContent.indexOf('【签到概览】')
|
||||||
const barkContentEnd = notifyContent.length;
|
const barkContentEnd = notifyContent.length;
|
||||||
if (process.env.JD_BEAN_SIGN_STOP_NOTIFY === 'true') return
|
if (process.env.JD_BEAN_SIGN_STOP_NOTIFY === 'true') return
|
||||||
|
if (notify.BARK_PUSH) process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE = 'true';
|
||||||
if (process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE === 'true') {
|
if (process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE === 'true') {
|
||||||
if (barkContentStart > -1 && barkContentEnd > -1) {
|
if (barkContentStart > -1 && barkContentEnd > -1) {
|
||||||
BarkContent = notifyContent.substring(barkContentStart, barkContentEnd);
|
BarkContent = notifyContent.substring(barkContentStart, barkContentEnd);
|
||||||
|
Reference in New Issue
Block a user