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

This commit is contained in:
顾风
2021-01-22 19:18:35 +08:00
parent 12b43d418f
commit b22b894f8e
2 changed files with 2 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ if ($.isNode()) {
cookiesArr.push(jdCookieNode[item])
})
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
if (process.env.JDFACTORY_FORBID_ACCOUNT) process.env.JDFACTORY_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);