更新于 07-20 03:55

This commit is contained in:
root
2021-07-20 03:55:32 -04:00
parent 8314962a75
commit 6e2dbf35a6
14 changed files with 2226 additions and 295 deletions

View File

@@ -12,20 +12,22 @@ Last Modified time: 2020-12-26 22:58:02
============Quantumultx===============
[task_local]
#东东工厂
10 * * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_jdfactory.js, tag=东东工厂, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_factory.png, enabled=true
10 * * * * jd_jdfactory.js, tag=东东工厂, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_factory.png, enabled=true
================Loon==============
[Script]
cron "10 * * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_jdfactory.js,tag=东东工厂
cron "10 * * * *" script-path=jd_jdfactory.js,tag=东东工厂
===============Surge=================
东东工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_jdfactory.js
东东工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=3600,script-path=jd_jdfactory.js
============小火箭=========
东东工厂 = type=cron,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_jdfactory.js, cronexpr="10 * * * *", timeout=3600, enable=true
东东工厂 = type=cron,script-path=jd_jdfactory.js, cronexpr="10 * * * *", timeout=3600, enable=true
*/
const $ = new Env('东东工厂');
console.log('\n====================Hello World====================\n')
const notify = $.isNode() ? require('./sendNotify') : '';
//Node.js用户请在jdCookie.js处填写京东ck;
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
@@ -44,7 +46,7 @@ if ($.isNode()) {
}
let wantProduct = ``;//心仪商品名称
const JD_API_HOST = 'https://api.m.jd.com/client.action';
const inviteCodes = [];
const inviteCodes = [''];
!(async () => {
await requireConfig();
if (!cookiesArr[0]) {
@@ -617,7 +619,7 @@ function jdfactory_getHomeData() {
function readShareCode() {
console.log(`开始`)
return new Promise(async resolve => {
$.get({url: `http://share.turinglabs.net/api/v3/ddfactory/query/${randomCount}/`, timeout: 10000}, (err, resp, data) => {
$.get({url: `https://api.sharecode.ga/api/ddfactory/${randomCount}`, timeout: 10000}, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
@@ -650,12 +652,10 @@ function shareCodesFormat() {
const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1);
$.newShareCodes = inviteCodes[tempIndex].split('@');
}
/*
const readShareCodeRes = await readShareCode();
if (readShareCodeRes && readShareCodeRes.code === 200) {
$.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
}
*/
console.log(`${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
resolve();
})