forked from Toulu-debug/enen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjd_getShareCodes.ts
27 lines (23 loc) · 971 Bytes
/
jd_getShareCodes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* cron 0 20 * * 6
*/
import {requireConfig} from "./TS_USER_AGENTS";
import {bean, farm, pet, factory, sgmh, jxfactory, cash, health} from "./utils/shareCodesTool";
let cookie: string = '', UserName: string, index: number;
!(async () => {
let cookiesArr: any = await requireConfig();
for (let i = 0; i < cookiesArr.length; i++) {
cookie = cookiesArr[i];
UserName = decodeURIComponent(cookie.match(/pt_pin=([^;]*)/)![1])
index = i + 1;
console.log(`\n开始【京东账号${index}】${UserName}\n`);
console.log('种豆得豆:', await bean(cookie))
console.log('东东农场:', await farm(cookie))
console.log('京东健康:', await health(cookie))
console.log('东东萌宠:', await pet(cookie))
console.log('东东工厂:', await factory(cookie))
console.log('京喜工厂:', await jxfactory(cookie))
console.log('闪购盲盒:', await sgmh(cookie))
console.log('领现金呀:', await cash(cookie))
}
})()