jd_bean_sign.js脚本目前Bark APP推送通知消息对推送内容长度有限制,会导致此脚本推送失败,故使用了BARK推送的,此脚本会默认改成推送简洁内容

This commit is contained in:
lxk0301
2020-11-26 13:49:54 +08:00
parent e63c4791b1
commit 7d06cc94a0

View File

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