-
Notifications
You must be signed in to change notification settings - Fork 1k
/
jd_kuaidi.ts
executable file
·50 lines (44 loc) · 1.23 KB
/
jd_kuaidi.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* 微信快递小程序签到
* cron: 8 10 * * *
*/
import {User, JDHelloWorld} from "./TS_JDHelloWorld"
class Jd_wechat_sign extends JDHelloWorld {
user: User
constructor() {
super("微信签到");
}
async init() {
await this.run(this)
}
async main(user: User) {
try {
let uuid: string = ''
for (let i = 0; i < 32; i++) {
uuid += this.getRandomNumberByRange(0, 2)
? this.getRandomNumString(1)
: this.getRandomWord().toLowerCase()
}
this.user = user
let res: any = await this.post('https://lop-proxy.jd.com/jiFenApi/signInAndGetReward', '[{"userNo":"$cooMrdGatewayUid$"}]', {
'Host': 'lop-proxy.jd.com',
'AppParams': '{"appid":158,"ticket_type":"m"}',
'uuid': uuid,
'LOP-DN': 'jingcai.jd.com',
'User-Agent': this.user.UserAgent,
'Origin': 'https://jingcai-h5.jd.com',
'Referer': 'https://jingcai-h5.jd.com/',
'Cookie': this.user.cookie
})
this.o2s(res)
if (res.success) {
console.log('签到成功', JSON.parse(res.content[0].param))
} else {
console.log(res.msg)
}
} catch (e) {
console.log(e.message)
}
}
}
new Jd_wechat_sign().init().then()