新增环境变量 DREAMFACTORY_FORBID_ACCOUNT,用于控制哪个京东账号不运行京喜工厂脚本,1代表第一个京东账号不运行,多个使用&连接,例:1&3代表账号1和账号3不运行京喜工厂脚本,注:数字0,代表全部账号不运行京喜工厂脚本

This commit is contained in:
lxk0301
2021-01-22 18:27:35 +08:00
parent cfcf316008
commit 35eb7ae793
2 changed files with 4 additions and 4 deletions

View File

@ -46,8 +46,8 @@ if ($.isNode()) {
Object.keys(jdCookieNode).forEach((item) => {
cookiesArr.push(jdCookieNode[item])
})
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {
};
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
if (process.env.DREAMFACTORY_FORBID_ACCOUNT) process.env.DREAMFACTORY_FORBID_ACCOUNT.split('&').map((item, index) => Number(item) === 0 ? cookiesArr = [] : cookiesArr.splice(Number(item) - 1 - index, 1))
} else {
let cookiesData = $.getdata('CookiesJD') || "[]";
cookiesData = jsonParse(cookiesData);