京喜工厂手机上面运行每天在22点运行的时候通知,暂时去掉偷好友电力。

This commit is contained in:
lxk0301
2020-12-01 17:32:17 +08:00
parent d3340b3704
commit 2133ec1b88
3 changed files with 21 additions and 13 deletions

View File

@@ -203,7 +203,7 @@ async function algorithm() {
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n当前总电量为:${$.batteryValue * 1}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].totalScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `当前总电量为:${$.batteryValue * 1}\n【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].totalScore}\n请速去活动页面查看`);
} else {
console.log(`\n目前电量${$.batteryValue * 1},不满足兑换\n`)
console.log(`\n目前电量${$.batteryValue * 1},不满足兑换 ${$.canMakeList[0].name}所需的 ${$.canMakeList[0].fullScore}电量\n`)
}
}
}
@@ -511,10 +511,12 @@ function jdfactory_getProductList(flag = false) {
if (data.data.bizCode === 0) {
$.canMakeList = data.data.result.canMakeList;//当前可选商品列表 sellOut:1为已抢光0为目前可选择
$.canMakeList.sort(sortCouponCount);
console.log(`商品名称 可选状态 剩余量`)
for (let item of $.canMakeList) {
console.log(`${item.name.slice(-4)} ${item.sellOut === 1 ? '已抢光':'可 选'} ${item.couponCount}`);
}
if (!flag) {
console.log(`商品名称 可选状态 剩余量`)
for (let item of $.canMakeList) {
console.log(`${item.name.slice(-4)} ${item.sellOut === 1 ? '已抢光':'可选'} ${item.couponCount}`);
if (item.name.indexOf(wantProduct) > -1 && item.couponCount > 0 && item.sellOut === 0) {
await jdfactory_makeProduct(item.skuId);
break