()
| 389 | |
| 390 | //通知 |
| 391 | function msgShow() { |
| 392 | // $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【收取蓝币】${$.coincount ? `${$.coincount}个` : $.coinerr }${coinToBeans ? `\n【兑换京豆】${ $.beanscount ? `${$.beanscount}个` : $.beanerr}` : ""}`); |
| 393 | return new Promise(async resolve => { |
| 394 | $.log(`\n【京东账号${$.index}】${$.nickName || $.UserName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功` : $.beanerr}` : "您设置的是不兑换奖品"}\n`); |
| 395 | if ($.isNode() && process.env.MARKET_REWARD_NOTIFY) { |
| 396 | $.ctrTemp = `${process.env.MARKET_REWARD_NOTIFY}` === 'false'; |
| 397 | } else if ($.getdata('jdSuperMarketRewardNotify')) { |
| 398 | $.ctrTemp = $.getdata('jdSuperMarketRewardNotify') === 'false'; |
| 399 | } else { |
| 400 | $.ctrTemp = `${jdNotify}` === 'false'; |
| 401 | } |
| 402 | //默认只在兑换奖品成功后弹窗提醒。情况情况加,只打印日志,不弹窗 |
| 403 | if ($.beanscount && $.ctrTemp) { |
| 404 | $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n${coinToBeans ? `【兑换${$.title}】${ $.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}`); |
| 405 | allMessage += `【京东账号${$.index}】${$.nickName || $.UserName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}${$.index !== cookiesArr.length ? '\n\n' : ''}` |
| 406 | // if ($.isNode()) { |
| 407 | // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}`) |
| 408 | // } |
| 409 | } |
| 410 | resolve() |
| 411 | }) |
| 412 | } |
| 413 | function TotalBean() { |
| 414 | return new Promise(async resolve => { |
| 415 | const options = { |
no test coverage detected