Skip to content

Commit

Permalink
user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
air committed Sep 6, 2021
1 parent d6a306e commit 9925f58
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules/
!.gitignore
/function/user.js
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# jd_task

## 之前文件名_改-是为了避免xx面板集成了这个库,跟作者朋友使用的脚本重名,不得不改名 目前看到有其他脚本库自己改名回去,为避免上述的事情发生,将重新改名
## function目录是脚本引用的必要文件夹,请连同function文件一起放到srcrips目录,一起更新


Expand All @@ -8,7 +8,7 @@

JdMain为你想设置的主号数,假如你docker挂了10个号,前面2个号是你自己的主要账户,后面8个号都是代挂,那么这10个号都会去助力前面2个主要账号

如果,你想单独设置某一个任务的助力次数,假如这个任务的文件名叫jd-help-test.js,你想助力前面三个账号,那么就单独添加 export jd_help_test = 3(-要替换成_)
如果,你想单独设置某一个任务的助力次数,假如这个任务的文件名叫jd_help_test.js,你想助力前面三个账号,那么就单独添加 export jd_help_test = 3

如果都没添加,那么会根据脚本中的min参数来设置主要助力个数

Expand All @@ -28,3 +28,6 @@ export jd_help_grapbean = 3
### 跳过当前账号: filename_except

export jd_help_test_except = 'jd_1,jd_2'

### 自定义配置: user.js
module.exports = {'key1':'value1','key2':'value2'}
7 changes: 4 additions & 3 deletions function/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ let notify = require('./sendNotify');
let mainEval = require("./eval");
let assert = require('assert');
let jxAlgo = require("./jxAlgo");
let config = {}
let config = require("./config");
let user={}
try {
config = require("./config");
user = require("./user")
} catch (e) {}
class env {
constructor(name) {
this.config = { ...config,
this.config = { ...user,
...process.env
};
this.name = name;
Expand Down
4 changes: 4 additions & 0 deletions jx-help-factory.js → jd_aid_factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ $.setOptions({
'referer': 'https://st.jingxi.com/pingou/dream_factory/divide.html?activeId=laD7IwPwDF1-Te-MvbW9Iw==&_close=1&jxsid=16232028831911667857',
}
});
$.readme = `
44 */6 * * * task ${$.runfile}
exprot ${$.runfile}=2 #如需增加被助力账号,在这边修改人数
`
eval(common.eval.mainEval($));
async function prepare() {
let deramUrl = 'https://st.jingxi.com/pingou/dream_factory/index.html?ptag=7155.9.46'
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 6 additions & 1 deletion jd-reward-joy.js → jd_exchange_joy.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
let common = require("./function/common");
let $ = new common.env('宠汪汪兑换京豆');
let fs = require("fs");
let min = 2,
help = $.config[$.filename(__filename)] || Math.min(min, $.config.JdMain) || min;
$.setOptions({
headers: {
'content-type': 'application/json',
'user-agent': 'jdapp;iPhone;9.4.6;14.2;965af808880443e4c1306a54afdd5d5ae771de46;network/wifi;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone8,4;addressid/;supportBestPay/0;appBuild/167618;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
'referer': 'https://happy.m.jd.com/babelDiy/',
}
});
$.readme = `
0 */8 * * * task ${$.runfile}
`
eval(common.eval.mainEval($));
async function prepare() {
$.thread = 1;
Expand Down Expand Up @@ -60,7 +65,7 @@ async function main(id) {
log = "刷新验证"
break;
default:
log = "未知状态"
log = $.source.errorCode
break
}
console.log(id.user, log, i.giftValue, $.source.currentTime)
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions jd-task-invokeKey.js → jd_work_invokeKey.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
let common = require("./function/common");
let $ = new common.env('京东invokeKey获取替换');
let fs = require("fs");
let min = 2,
help = $.config[$.filename(__filename)] || Math.min(min, $.config.JdMain) || min;
$.setOptions({
headers: {
'content-type': 'application/json',
'user-agent': 'jdapp;iPhone;9.4.6;14.2;965af808880443e4c1306a54afdd5d5ae771de46;network/wifi;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone8,4;addressid/;supportBestPay/0;appBuild/167618;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
'referer': 'https://happy.m.jd.com/babelDiy/',
}
});
$.readme = `
50 7,15,23 * * * task ${$.runfile}
`
eval(common.eval.mainEval($));
async function prepare() {
invokeKey = ''
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions jd-task-price.js → jd_work_price.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ $.setOptions({
'referer': 'https://msitepp-fm.jd.com/rest/priceprophone/priceProPhoneMenu?sid=0b5a9d5564059f36ed16a8967c37e24w',
}
});
$.readme = `
48 */8 * * * task ${$.runfile}
exprot ${$.runfile}=1 #输出购买订单保价内容,没什么用
`
eval(common.eval.mainEval($));
async function prepare() {}
async function main(id) {
Expand Down
4 changes: 4 additions & 0 deletions jd-task-unfollowShop.js → jd_work_unfollowShop.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ $.setOptions({
'referer': 'https://happy.m.jd.com/babelDiy/Zeus/3ugedFa7yA6NhxLN5gw2L3PF9sQC/index.html?asid=287215626&un_area=12_904_905_57901&lng=117.612969135975&lat=23.94014745198865',
}
});
$.readme = `
42 23 * * * task ${$.runfile}
exprot ${$.runfile}=2 #默认执行2次取关API,共20个店铺
`
eval(common.eval.mainEval($));
async function prepare() {
$.n = $.config[$.runfile] ? Math.ceil($.config[$.runfile]) : 2
Expand Down
6 changes: 3 additions & 3 deletions jd-task-validate.js → jd_work_validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ $.setOptions({
}
});
$.readme = `
58 7,15,23 * * * task jd-task-validate
exprot jd_task_validate=5 #限制跑验证码账户个数
58 7,15,23 * * * task ${$.runfile}
exprot ${$.runfile}=5 #限制跑验证码账户个数
export JDJR_SERVER=ip #如获取不到验证码,本地先获取iv.jd.com的ip,再自行添加环境变量
`
`
eval(common.eval.mainEval($));
async function prepare() {
$.thread = 1;
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions jx-help-cashback.js → jx_aid_cashback.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ $.setOptions({
'referer': 'https://happy.m.jd.com/babelDiy/Zeus/3ugedFa7yA6NhxLN5gw2L3PF9sQC/index.html?asid=287215626&un_area=12_904_905_57901&lng=117.612969135975&lat=23.94014745198865',
}
});
$.readme = `
在京喜下单,如订单有购物返现,脚本会自动查询返现groupid并予以助力,目前每个账号每天能助力3次
44 */6 * * * task ${$.runfile}
exprot ${$.runfile}=2 #如需增加被助力账号,在这边修改人数
`
eval(common.eval.mainEval($));
async function prepare() {
let url = `https://wq.jd.com/bases/orderlist/list?order_type=3&start_page=1&last_page=0&page_size=10&callersource=newbiz&t=${$.timestamp}&traceid=&g_ty=ls&g_tk=606717070`
Expand Down

0 comments on commit 9925f58

Please sign in to comment.