Update jd_superMarket.js

Fix:修复东东超市环境变量 SUPERMARKET_LOTTERY 未被正确读取的BUG.
This commit is contained in:
0xff1
2020-11-22 16:42:13 +08:00
committed by GitHub
parent 2a4098e9b5
commit de40ccab36

View File

@@ -112,8 +112,8 @@ function showMsg() {
async function drawLottery() {
console.log(`\n注意⚠:京小超抽奖已改版,花费500蓝币抽奖一次,现在脚本默认已关闭抽奖功能\n`);
drawLotteryFlag = $.getdata('jdSuperMarketLottery') ? $.getdata('jdSuperMarketLottery') : drawLotteryFlag;
if ($.isNode() && process.env.jdSuperMarketLottery) {
drawLotteryFlag = process.env.jdSuperMarketLottery;
if ($.isNode() && process.env.SUPERMARKET_LOTTERY) {
drawLotteryFlag = process.env.SUPERMARKET_LOTTERY;
}
if (`${drawLotteryFlag}` === 'true') {
const smtg_lotteryIndexRes = await smtg_lotteryIndex();