forked from wliustc/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jd_618_Red.js
2751 lines (2719 loc) · 115 KB
/
jd_618_Red.js
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
618红包助力
脚本锁佣建议用新的京粉号
https://u.jd.com/xxxxxxx
返利变量:CODE618,若需要返利给自己,请自己修改环境变量[CODE618]
xxxxxxx换成自己的返利 就是链接后面那7位字母
export CODE618="xxxxxxx"
尽量使用代理访问,不然大概率 垃圾卷
DL池搭建地址:https://t.me/autoProxyPool
js最简使用方式
安装依赖global-agent
然后在你的要使用代理的js中加入
// require("global-agent/bootstrap");
// global.GLOBAL_AGENT.HTTP_PROXY="http:// DL池docker地址:8080";
30 0,10,20 * * * jd_618_Red.js 618红包助力
*/
const $ = new Env('618红包助力');
const jdCookieNode = $.isNode() ? require("./jdCookie") : "",
jsdom = require("jsdom");
$.CryptoJS = require("crypto-js");
let cookiesArr = [],
cookie = "";
if ($.isNode()) {
Object.keys(jdCookieNode).forEach(iIiliiII => {
cookiesArr.push(jdCookieNode[iIiliiII]);
});
if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {};
} else cookiesArr = [$.getdata("CookieJD"), $.getdata("CookieJD2"), ...jsonParse($.getdata("CookiesJD") || "[]").map(Ill1I1iI => Ill1I1iI.cookie)].filter(llI111I => !!llI111I);
let krflCode = null;
$.isNode() && process.env.CODE618 && (krflCode = process.env.CODE618);
let rebateCodes = "",
rebatePin = "",
redTimes = 0,
unionActId = "31162";
if (!rebatePin) rebatePin = "";
rebatePin = $.isNode() ? process.env.JD_618_rebatePin ? process.env.JD_618_rebatePin : "" + rebatePin : $.getdata("JD_618_rebatePin") ? $.getdata("JD_618_rebatePin") : "" + rebatePin;
redTimes = $.isNode() ? process.env.JD_618_redTimes ? process.env.JD_618_redTimes : "" + redTimes : $.getdata("JD_618_redTimes") ? $.getdata("JD_618_redTimes") : "" + redTimes;
let IlIliIi = rebatePin && rebatePin.split(",") || [];
rebateCode = rebateCodes + "";
$.time("yyyy-MM-dd HH:mm:ss");
message = "";
newCookie = "";
resMsg = "";
$.uiUpdateTime = "";
$.endFlag = false;
$.runEnd = false;
let lIIIIilI = {};
$.getH5st_WQ_Arr = {};
$.runArr = {};
let liIlI1i1 = null;
const l1lIIIi1 = "2023/06/29 00:00:00+08:00";
let I1l1I1Ii = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000;
$.UVCookieArr = {};
lr = {};
$.UVCookie = "";
let Ii1iIilI = "";
$.time("yyyy-MM-dd");
l1lill1l();
!(async () => {
if (!cookiesArr[0]) {
$.msg($.name, "【提示】请先获取cookie\n直接使用NobyDa的京东签到获取", "https://bean.m.jd.com/", {
"open-url": "https://bean.m.jd.com/"
});
return;
}
I1l1I1Ii > new Date(l1lIIIi1).getTime() && ($.msg($.name, "活动已结束", "请删除此脚本"), $.setdata("", "JD_230618_Reds"), $.setdata("", "JD_230618_Red"), $.setdata("", "JD_230618_Red_pin"));
$.shareCodeArr = {};
$.shareCodePinArr = $.getdata("JD_230618_Red_pin") || {};
$.shareCode = "";
$.again = false;
authorCodeList = ["Oqk1iQg"]
await I1illlIi();
for (let Iii11Iii = 0; Iii11Iii < cookiesArr.length && !$.runEnd; Iii11Iii++) {
if ($.endFlag) break;
cookie = cookiesArr[Iii11Iii];
if (cookie) {
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
$.index = Iii11Iii + 1;
if ($.runArr[$.UserName]) continue;
console.log("\n\n******开始【京东账号" + $.index + "】" + ($.nickName || $.UserName) + "*********\n");
let i111iill = 1;
!cookie.includes("app_open") && (i111iill = 2);
await IIii1i1l(i111iill);
await ii1i1iII();
if ($.endFlag || $.end) break;
}
$.setdata($.shareCodePinArr, "JD_230618_Red_pin");
}
$.setdata($.shareCodePinArr, "JD_230618_Red_pin");
if (message) {
$.msg($.name, "", message + "\nhttps://u.jd.com/" + rebateCode + "\n\n跳转到app 可查看助力情况");
if ($.isNode()) {}
}
})().catch(il1lilli => $.logErr(il1lilli)).finally(() => {
if (liIlI1i1) liIlI1i1.close();
$.done();
});
async function ii1i1iII(I1IllI1i = 0) {
try {
krrebateCode = krflCode ? krflCode : authorCodeList[random(0, authorCodeList.length)];
rebateCode = krrebateCode;
krflCode != null && console.log("已填写变量:" + rebateCode);
$.UVCookie = $.UVCookieArr[$.UserName] || "";
if (!$.UVCookie) {
l1lill1l();
}
resMsg = "";
let I1l111I1 = false,
I1Ii1I1l = 0,
ll111i1i = 0,
I1liII1i = 0;
$.shareFlag = true;
do {
if (ll111i1i > 2) I1Ii1I1l = 0;
$.flag = 0;
newCookie = "";
$.url1 = "";
await lIii11lI();
if (!$.url1) {
console.log("获取url1失败");
$.end = true;
break;
}
$.url2 = "";
$.UVCookie = Ii1iIilI.getUVCookie("", "", $.url1, $.UVCookie);
$.UVCookieArr[$.UserName] = $.UVCookie + "";
await lii1IIii();
if (!/unionActId=\d+/.test($.url2) && !new RegExp("&d=" + rebateCode).test($.url2)) {}
if (!$.url2) $.url2 = "https://prodev.m.jd.com/mall/active/3nNmntNrufZjkZF1XJJKknDuCbaQ/index.html?unionActId=" + unionActId + "&d=" + rebateCode + "&cu=true&utm_source=kong&utm_medium=jingfen";
$.actId = $.url2.match(/mall\/active\/([^\/]+)\/index\.html/) && $.url2.match(/mall\/active\/([^\/]+)\/index\.html/)[1] || "3nNmntNrufZjkZF1XJJKknDuCbaQ";
$.UVCookie = Ii1iIilI.getUVCookie("", "", $.url2, $.UVCookie);
$.UVCookieArr[$.UserName] = $.UVCookie + "";
$.eid = "";
!$.eid && ($.eid = -1);
if (I1IllI1i == 0) {
let Iiii1i1i = 0,
I11iII1 = true,
I1lIIIil = 0;
if (Object.getOwnPropertyNames(lIIIIilI).length > I1Ii1I1l && $.shareFlag) for (let I111i1Il in lIIIIilI || {}) {
if (I111i1Il == $.UserName) {
$.flag = 1;
continue;
}
if (Iiii1i1i == I1Ii1I1l) {
$.flag = 0;
$.shareCode = lIIIIilI[I111i1Il] || "";
if ($.shareCodePinArr[I111i1Il] && $.shareCodePinArr[I111i1Il].includes($.UserName)) {
I1lIIIil++;
continue;
}
if ($.shareCode.count >= $.shareCodeArr.shareCount) {
I1lIIIil++;
continue;
}
$.getlj = false;
if ($.shareCode) console.log("助力[" + I111i1Il + "]");
let IIiil111 = await l1ii11I1($.shareCode.code, 1);
if (/重复助力/.test(IIiil111)) {
if (!$.shareCodePinArr[I111i1Il]) $.shareCodePinArr[I111i1Il] = [];
$.shareCodePinArr[I111i1Il].push($.UserName);
I1Ii1I1l--;
I1liII1i--;
} else {
if (/助力/.test(IIiil111) && /上限/.test(IIiil111)) $.shareFlag = false;else {
if (!/领取上限/.test(IIiil111) && $.getlj == true) {
if (!$.shareCodePinArr[I111i1Il]) $.shareCodePinArr[I111i1Il] = [];
!$.shareCodePinArr[I111i1Il].includes($.UserName) && $.shareCodePinArr[I111i1Il].push($.UserName);
I1Ii1I1l--;
} else I11iII1 = false;
}
}
}
Iiii1i1i++;
}
I11iII1 && I1lIIIil == Object.getOwnPropertyNames(lIIIIilI).length && (I1l111I1 = true);
if (Iiii1i1i == 0) {
$.getlj = false;
let lllilii = await l1ii11I1("", 1);
!/领取上限/.test(lllilii) && $.getlj == true && I1Ii1I1l--;
}
if ($.endFlag) break;
} else {
let I1iiIIII = await l1iii11l();
if (!$.endFlag && I1iiIIII && $.again == false) await i11IIiI();
if ($.again == false) break;
}
$.again == true && ll111i1i < 1 && (ll111i1i++, $.again = false);
I1Ii1I1l++;
I1liII1i++;
$.flag == 1 && (await $.wait(parseInt(Math.random() * 500 + 100, 10)));
if (redTimes > 0 && redTimes <= I1liII1i) break;
} while ($.flag == 1 && I1Ii1I1l < 5);
if ($.endFlag) return;
resMsg && (message += "【京东账号" + $.index + "】\n" + resMsg);
I1l111I1 && (console.log("\n获取新的助力信息"), await I1illlIi(1));
await $.wait(parseInt(Math.random() * 500 + 200, 10));
} catch (iI1IliI1) {
console.log(iI1IliI1);
}
}
async function I1illlIi(II1i1Ii1 = 0) {
try {
let IiliIli = 2;
if (II1i1Ii1 == 1) IiliIli = 1;
let lI1l11II = 0;
for (let iIIIi1i1 in $.shareCodeArr || {}) {
if (iIIIi1i1 === "flag" || iIIIi1i1 === "updateTime" || iIIIi1i1 === "shareCount") continue;
if ($.shareCodeArr[iIIIi1i1] && $.shareCodeArr.shareCount && $.shareCodeArr[iIIIi1i1].count < $.shareCodeArr.shareCount) lI1l11II++;
}
for (let iii1iiil = 0; iii1iiil < cookiesArr.length && !$.runEnd; iii1iiil++) {
cookie = cookiesArr[iii1iiil];
if (cookie) {
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
if (IlIliIi.length > 0 && IlIliIi.indexOf($.UserName) == -1 || $.shareCodeArr[$.UserName]) continue;
$.index = iii1iiil + 1;
await IIii1i1l();
await ii1i1iII(1);
let lliIlIli = 0;
for (let lIii1li in $.shareCodeArr || {}) {
if (lIii1li === "flag" || lIii1li === "updateTime" || lIii1li === "shareCount") continue;
if ($.shareCodeArr[lIii1li] && $.shareCodeArr.shareCount && $.shareCodeArr[lIii1li].count < $.shareCodeArr.shareCount) lliIlIli++;
}
if ($.endFlag || lliIlIli - lI1l11II >= IiliIli || $.end) break;
}
}
} catch (l1IIlIi) {
console.log(l1IIlIi);
}
if (Object.getOwnPropertyNames($.shareCodeArr).length > 0) {
for (let l1l1ii1l in $.shareCodeArr || {}) {
if (l1l1ii1l === "flag" || l1l1ii1l === "updateTime" || l1l1ii1l === "shareCount") continue;
if ($.shareCodeArr[l1l1ii1l]) lIIIIilI[l1l1ii1l] = $.shareCodeArr[l1l1ii1l];
}
}
}
function l1ii11I1(lli111II = "", iilIlII1 = 1) {
return new Promise(async iIiiIi => {
$.UVCookie = Ii1iIilI.getUVCookie("", "", $.url2, $.UVCookie);
$.UVCookieArr[$.UserName] = $.UVCookie + "";
let lIIi1ill = "",
IIIl1Il1 = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000,
iliII111 = 1;
if ($.time("H", IIIl1Il1) == "20") {
iliII111 = 4;
}
const iiiIl1ii = {
"platform": iliII111,
"unionActId": unionActId,
"actId": $.actId,
"d": rebateCode,
"unionShareId": lli111II,
"type": iilIlII1,
"eid": $.eid
},
lli1Ill = {
"appid": "u",
"body": iiiIl1ii,
"client": "apple",
"clientVersion": "8.3.6",
"functionId": "getCoupons"
};
lIIi1ill = await lil1li11("6a98d", lli1Ill);
lIIi1ill = encodeURIComponent(lIIi1ill);
let ilIliIlI = "",
lliIl1iI = {
"url": "https://api.m.jd.com/api?functionId=getCoupons&appid=u&_=" + IIIl1Il1 + "&loginType=2&body=" + encodeURIComponent($.toStr(iiiIl1ii)) + "&client=apple&clientVersion=8.3.6&h5st=" + lIIi1ill,
"headers": {
"accept": "*/*",
"Accept-Language": "zh-cn",
"Accept-Encoding": "gzip, deflate, br",
"Cookie": "" + $.UVCookie + newCookie + " " + cookie,
"origin": "https://prodev.m.jd.com",
"Referer": "https://prodev.m.jd.com/mall/active/3nNmntNrufZjkZF1XJJKknDuCbaQ/index.html",
"User-Agent": $.UA
}
};
if ($.url2) lliIl1iI.headers.Referer = $.url2;
$.get(lliIl1iI, async (li1ll1I, llI1iIIi, iiIi1iII) => {
try {
if (li1ll1I) {
console.log("" + $.toStr(li1ll1I));
console.log($.name + " API请求失败,请检查网路重试");
} else {
let llIlllIl = $.toObj(iiIi1iII, iiIi1iII);
if (typeof llIlllIl == "object") {
llIlllIl.msg && (ilIliIlI = llIlllIl.msg, console.log(llIlllIl.msg));
if (llIlllIl.msg.indexOf("不展示弹层") > -1 && iilIlII1 == 1) $.again = true;
if (llIlllIl.msg.indexOf("领取上限") === -1 && llIlllIl.msg.indexOf("登录") === -1) {
if (iilIlII1 == 1) $.flag = 1;
}
if (llIlllIl.msg.indexOf("活动已结束") > -1 || llIlllIl.msg.indexOf("活动未开始") > -1) {
$.endFlag = true;
return;
}
lli111II && typeof llIlllIl.data !== "undefined" && typeof llIlllIl.data.joinNum !== "undefined" && console.log("当前" + llIlllIl.data.joinSuffix + ":" + llIlllIl.data.joinNum);
if (llIlllIl.code == 0 && llIlllIl.data) {
if (iilIlII1 == 1) $.shareCode.count++;
let IliiiI11 = "";
for (let I1IIii1i of llIlllIl.data.couponList) {
if (I1IIii1i.type == 1) {
$.getlj = true;
IliiiI11 += (IliiiI11 ? "\n" : "") + "获得[红包]🧧" + I1IIii1i.discount + "元 使用时间:" + $.time("yyyy-MM-dd", I1IIii1i.beginTime) + " " + $.time("yyyy-MM-dd", I1IIii1i.endTime);
} else {
if (I1IIii1i.type == 3) {
$.getlj = true;
IliiiI11 += (IliiiI11 ? "\n" : "") + "获得[优惠券]🎟️满" + I1IIii1i.quota + "减" + I1IIii1i.discount + " 使用时间:" + $.time("yyyy-MM-dd", I1IIii1i.beginTime) + " " + $.time("yyyy-MM-dd", I1IIii1i.endTime);
} else {
if (I1IIii1i.type == 6) {
$.getlj = true;
IliiiI11 += (IliiiI11 ? "\n" : "") + "获得[打折券]]🎫满" + I1IIii1i.quota + "打" + I1IIii1i.discount * 10 + "折 使用时间:" + $.time("yyyy-MM-dd", I1IIii1i.beginTime) + " " + $.time("yyyy-MM-dd", I1IIii1i.endTime);
} else {
$.getlj = true;
IliiiI11 += (IliiiI11 ? "\n" : "") + "获得[未知]🎉" + (I1IIii1i.quota || "") + " " + I1IIii1i.discount + " 使用时间:" + $.time("yyyy-MM-dd", I1IIii1i.beginTime) + " " + $.time("yyyy-MM-dd", I1IIii1i.endTime);
console.log(I1IIii1i);
}
}
}
}
IliiiI11 && (resMsg += IliiiI11 + "\n", console.log(IliiiI11));
}
if (iilIlII1 == 1 && typeof llIlllIl.data !== "undefined" && typeof llIlllIl.data.groupData !== "undefined" && typeof llIlllIl.data.groupData.groupInfo !== "undefined") {
for (let ilililiI of llIlllIl.data.groupData.groupInfo || []) {
ilililiI.status == 2 && (console.log("助力满可以领取" + ilililiI.info + "元红包🧧"), await $.wait(parseInt(Math.random() * 2000 + 2000, 10)), await l1ii11I1("", 2));
}
}
} else console.log(iiIi1iII);
}
} catch (iill1I1i) {
$.logErr(iill1I1i, llI1iIIi);
} finally {
iIiiIi(ilIliIlI);
}
});
});
}
function l1iii11l(li1lli1l = "") {
let lII11ii1 = true;
return new Promise(I1IilllI => {
$.UVCookie = Ii1iIilI.getUVCookie("", "", $.url2, $.UVCookie);
$.UVCookieArr[$.UserName] = $.UVCookie + "";
let I1l1Il11 = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000,
lIli1i1l = 1;
$.time("H", I1l1Il11) == "20" && (lIli1i1l = 4);
let iIIIIIIl = {
"url": "https://api.m.jd.com/api?functionId=showCoupon&appid=u&_=" + Date.now() + "&loginType=2&body={%22actId%22:%22" + $.actId + "%22,%22unionActId%22:%22" + unionActId + "%22,%22unpl%22:%22" + $.unpl + "%22,%22platform%22:" + lIli1i1l + ",%22unionShareId%22:%22%22," + ($.uiUpdateTime ? "%22uiUpdateTime%22:" + $.uiUpdateTime + "," : "") + "%22d%22:%22" + rebateCode + "%22,%22eid%22:%22" + $.eid + "%22}&client=iPhone&clientVersion=&osVersion=iOS&screen=414*896&d_brand=iPhone&d_model=iPhone&lang=zh-cn&sdkVersion=&openudid=",
"headers": {
"accept": "*/*",
"Accept-Language": "zh-cn",
"Accept-Encoding": "gzip, deflate, br",
"Cookie": "" + $.UVCookie + newCookie + " " + cookie,
"origin": "https://prodev.m.jd.com",
"Referer": "https://prodev.m.jd.com/mall/active/3nNmntNrufZjkZF1XJJKknDuCbaQ/index.html",
"User-Agent": $.UA
}
};
if ($.url2) iIIIIIIl.headers.Referer = $.url2;
$.get(iIIIIIIl, async (ilIii1Ii, liI1Il1i, Ilii1i1l) => {
try {
if (ilIii1Ii) {
console.log("" + $.toStr(ilIii1Ii));
console.log($.name + " API请求失败,请检查网路重试");
} else {
let iII1Iiii = $.toObj(Ilii1i1l, Ilii1i1l);
if (typeof iII1Iiii == "object") {
if (iII1Iiii.msg) console.log(iII1Iiii.msg);
if (iII1Iiii.msg.indexOf("不展示弹层") > -1) $.again = true;
if (iII1Iiii.msg.indexOf("领取上限") > -1) $.runArr[$.UserName] = true;
iII1Iiii.msg.indexOf("上限") === -1 && iII1Iiii.msg.indexOf("登录") === -1 && ($.flag = 1);
if (iII1Iiii.msg.indexOf("活动已结束") > -1 || iII1Iiii.msg.indexOf("活动未开始") > -1) {
$.endFlag = true;
return;
}
if (iII1Iiii.data.uiUpdateTime) $.uiUpdateTime = iII1Iiii.data.uiUpdateTime;
if (typeof iII1Iiii.data !== "undefined" && typeof iII1Iiii.data.groupData !== "undefined" && typeof iII1Iiii.data.groupData.joinNum !== "undefined") {
$.joinNum = iII1Iiii.data.groupData.joinNum;
$.shareCount = 0;
for (let lI1IliIi of iII1Iiii.data.groupData.groupInfo) {
if ($.shareCount < lI1IliIi.num) $.shareCount = lI1IliIi.num;
}
$.shareCodeArr[$.UserName] && ($.shareCodeArr[$.UserName].count = $.shareCount);
$.shareCodeArr.shareCount = $.shareCount;
if ($.shareCount <= $.joinNum) {
if (!$.shareCodeArr[$.UserName]) $.shareCodeArr[$.UserName] = {};
$.shareCodeArr[$.UserName].count = $.joinNum;
lII11ii1 = false;
}
console.log("【账号" + $.index + "】" + ($.nickName || $.UserName) + " " + $.joinNum + "/" + $.shareCount + "人");
}
iII1Iiii.msg.indexOf("活动已结束") > -1 && (lII11ii1 = false);
if (typeof iII1Iiii.data !== "undefined" && typeof iII1Iiii.data.groupData !== "undefined" && typeof iII1Iiii.data.groupData.groupInfo !== "undefined") {
for (let IlllIiIi of iII1Iiii.data.groupData.groupInfo || []) {
IlllIiIi.status == 2 && (console.log("助力满可以领取" + IlllIiIi.info + "元红包🧧"), await $.wait(parseInt(Math.random() * 2000 + 2000, 10)), await l1ii11I1("", 2));
}
}
} else console.log(Ilii1i1l);
}
} catch (liil1il) {
$.logErr(liil1il, liI1Il1i);
} finally {
I1IilllI(lII11ii1);
}
});
});
}
function i11IIiI() {
if ($.shareCodeArr[$.UserName]) {
console.log("【账号" + $.index + "】缓存分享码:" + $.shareCodeArr[$.UserName].code.replace(/.+(.{3})/, "***$1"));
return;
}
return new Promise(ii11IiIl => {
let i1IIIiil = {
"url": "https://api.m.jd.com/api?functionId=shareUnionCoupon&appid=u&_=" + Date.now() + "&loginType=2&body={%22unionActId%22:%22" + unionActId + "%22,%22actId%22:%22" + $.actId + "%22,%22platform%22:4,%22unionShareId%22:%22%22,%22d%22:%22" + rebateCode + "%22,%22supportPic%22:2,%22supportLuckyCode%22:0,%22eid%22:%22" + $.eid + "%22}&client=iPhone&clientVersion=&osVersion=iOS&screen=414*896&d_brand=iPhone&d_model=iPhone&lang=zh-cn&sdkVersion=&openudid=",
"headers": {
"accept": "*/*",
"Accept-Language": "zh-cn",
"Accept-Encoding": "gzip, deflate, br",
"Cookie": "" + $.UVCookie + newCookie + " " + cookie,
"origin": "https://prodev.m.jd.com",
"Referer": "https://prodev.m.jd.com/mall/active/3nNmntNrufZjkZF1XJJKknDuCbaQ/index.html",
"User-Agent": $.UA
}
};
$.get(i1IIIiil, async (l1il111, IlIIIIiI, i1lIlIil) => {
try {
if (l1il111) {
console.log("" + $.toStr(l1il111));
console.log($.name + " API请求失败,请检查网路重试");
} else {
let Iliii111 = $.toObj(i1lIlIil, i1lIlIil);
if (typeof Iliii111 == "object") {
if (Iliii111.code == 0 && Iliii111.data && Iliii111.data.shareUrl) {
let ll11I1lI = Iliii111.data.shareUrl.match(/\?s=([^&]+)/) && Iliii111.data.shareUrl.match(/\?s=([^&]+)/)[1] || "";
if (ll11I1lI) {
console.log("【账号" + $.index + "】分享码:" + ll11I1lI.replace(/.+(.{3})/, "***$1"));
$.shareCodeArr[$.UserName] = {
"code": ll11I1lI,
"count": $.joinNum
};
}
}
} else console.log(i1lIlIil);
}
} catch (ilIiiil1) {
$.logErr(ilIiiil1, IlIIIIiI);
} finally {
ii11IiIl();
}
});
});
}
function lii1IIii() {
return new Promise(II1l1iii => {
const Ill1l1ll = {
"url": $.url1,
"followRedirect": false,
"headers": {
"Cookie": "" + $.UVCookie + newCookie + " " + cookie,
"User-Agent": $.UA
}
};
$.get(Ill1l1ll, async (I1l1iIII, i1llIill, lIllIii1) => {
try {
i11iIIii(i1llIill);
$.url2 = i1llIill && i1llIill.headers && (i1llIill.headers.location || i1llIill.headers.Location || "") || "";
$.url2 = decodeURIComponent($.url2);
$.url2 = $.url2.match(/(https:\/\/prodev[\.m]{0,}\.jd\.com\/mall[^'"]+)/) && $.url2.match(/(https:\/\/prodev[\.m]{0,}\.jd\.com\/mall[^'"]+)/)[1] || "";
} catch (iiIi1i1l) {
$.logErr(iiIi1i1l, i1llIill);
} finally {
II1l1iii(lIllIii1);
}
});
});
}
function lIii11lI() {
return new Promise(Iilii1iI => {
const Iil1li = {
"url": "https://u.jd.com/" + rebateCode + ($.shareCode && "?s=" + $.shareCode || ""),
"followRedirect": false,
"headers": {
"Cookie": "" + $.UVCookie + newCookie + " " + cookie,
"User-Agent": $.UA
}
};
$.get(Iil1li, async (Ili1IllI, Il1liiIi, IIilIIIl) => {
try {
i11iIIii(Il1liiIi);
$.url1 = IIilIIIl && IIilIIIl.match(/(https:\/\/u\.jd\.com\/jda[^']+)/) && IIilIIIl.match(/(https:\/\/u\.jd\.com\/jda[^']+)/)[1] || "";
} catch (Ili1Iii) {
$.logErr(Ili1Iii, Il1liiIi);
} finally {
Iilii1iI(IIilIIIl);
}
});
});
}
function random(iIllii11, iIiIIllI) {
return Math.floor(Math.random() * (iIiIIllI - iIllii11)) + iIllii11;
}
function l1IlIi1(lll1iIIi) {
return new Promise(llll11 => {
const l11ll1I = {
"url": "https://gia.jd.com/fcf.html?a=" + lll1iIIi.a,
"body": "d=" + lll1iIIi.d,
"headers": {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
"User-Agent": $.UA
}
};
$.post(l11ll1I, async (liI111ii, lill1II1, llIi1li) => {
try {
if (liI111ii) {
throw new Error(liI111ii);
} else llIi1li.indexOf("*_*") > 0 ? (llIi1li = llIi1li.split("*_*", 2), llIi1li = JSON.parse(llIi1li[1]), $.eid = llIi1li.eid) : console.log("京东api返回数据为空,请检查自身原因");
} catch (l1IIIli1) {
$.logErr(l1IIIli1, lill1II1);
} finally {
llll11(llIi1li);
}
});
});
}
function i11iIIii(I1i1ill1) {
let IlIIIiIi = I1i1ill1 && I1i1ill1.headers && (I1i1ill1.headers["set-cookie"] || I1i1ill1.headers["Set-Cookie"] || "") || "",
i111i1I1 = "";
if (IlIIIiIi) {
if (typeof IlIIIiIi != "object") i111i1I1 = IlIIIiIi.split(",");else i111i1I1 = IlIIIiIi;
for (let Il1iil1 of i111i1I1) {
let i111l1 = Il1iil1.split(";")[0].trim();
if (i111l1.split("=")[1]) {
i111l1.split("=")[0] == "unpl" && i111l1.split("=")[1] && ($.unpl = i111l1.split("=")[1]);
if (newCookie.indexOf(i111l1.split("=")[1]) == -1) newCookie += i111l1.replace(/ /g, "") + "; ";
}
}
}
}
function IIii1i1l(IlilIIi = 1) {
IlilIIi = 1;
if (IlilIIi == 2) $.UA = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1";else {
let i11iil1I = $.CryptoJS.SHA1($.UserName + "reds").toString();
$.UA = "jdapp;iPhone;10.1.4;14.3;" + i11iil1I + ";M/5.0;network/wifi;ADID/;model/iPhone12,1;addressid/;appBuild/167814;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1";
}
}
function Ill1i1iI(I1iilliI) {
if (typeof I1iilliI == "string") try {
return JSON.parse(I1iilliI);
} catch (llilIlil) {
return console.log(llilIlil), $.msg($.name, "", "请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie"), [];
}
}
async function lll1i1iI(IlilIil) {
return new Promise(iI11IIIi => setTimeout(iI11IIIi, IlilIil));
}
async function l1I1iIil() {
try {
const {
JSDOM: II11iiIi
} = jsdom;
let i1lil1Il = {
"url": "https://prodev.m.jd.com/mall/active/3nNmntNrufZjkZF1XJJKknDuCbaQ/index.html?unionActId=" + unionActId + "&d=" + rebateCode + "&cu=true&utm_source=kong&utm_medium=jingfen",
"referrer": "https://u.jd.com/",
"userAgent": "jdapp;iPhone;10.1.4;14.3;;M/5.0;network/wifi;ADID/;model/iPhone12,1;addressid/;appBuild/167814;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
"runScripts": "dangerously",
"resources": new jsdom.ResourceLoader({
"userAgent": "jdapp;iPhone;10.1.4;14.3;;M/5.0;network/wifi;ADID/;model/iPhone12,1;addressid/;appBuild/167814;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
"referrer": "https://u.jd.com/"
}),
"includeNodeLocations": true,
"storageQuota": 10000000,
"pretendToBeVisual": true,
"virtualConsole": new jsdom.VirtualConsole()
};
const llliliIi = new II11iiIi("<body>\n <script src=\"https://static.360buyimg.com/siteppStatic/script/mescroll/map.js\"></script>\n <script src=\"https://storage.360buyimg.com/webcontainer/js_security_v3.js\"></script>\n <script src=\"https://static.360buyimg.com/siteppStatic/script/utils.js\"></script>\n </body>", i1lil1Il);
await lll1i1iI(1000);
liIlI1i1 = llliliIi.window;
} catch (II11iiil) {
console.log(II11iiil);
}
}
async function lil1li11(lIiI1lIl, l1111l1i) {
if (!$.getH5st_WQ_Arr[$.UserName]) $.getH5st_WQ_Arr[$.UserName] = {};
let iIiI1ilI = $.getH5st_WQ_Arr[$.UserName];
if (!liIlI1i1) {
await l1I1iIil();
}
return liIlI1i1.localStorage.setItem("WQ__dy_tk_s_" + lIiI1lIl, iIiI1ilI["WQ__dy_tk_s_" + lIiI1lIl] || ""), liIlI1i1.localStorage.setItem("WQ__dy_algo_s_" + lIiI1lIl, iIiI1ilI["WQ__dy_algo_s_" + lIiI1lIl] || ""), liIlI1i1.localStorage.setItem("WQ_qe_" + lIiI1lIl, iIiI1ilI["WQ_qe_" + lIiI1lIl] || ""), new Promise(async I111i1il => {
let l1il1i1I = "";
try {
if (typeof liIlI1i1.signWaap === "function") l1il1i1I = await liIlI1i1.signWaap(lIiI1lIl, l1111l1i);else {
let Ii111ilI = 0;
timer = setInterval(async () => {
Ii111ilI++;
typeof liIlI1i1.signWaap === "function" && (clearInterval(timer), timer = null, l1il1i1I = await liIlI1i1.signWaap(lIiI1lIl, l1111l1i));
Ii111ilI >= 100 && clearInterval(timer);
}, 100);
}
} catch (I11IllI1) {
console.log(I11IllI1);
} finally {
if (l1il1i1I) {
iIiI1ilI["WQ__dy_tk_s_" + lIiI1lIl] = liIlI1i1.localStorage.getItem("WQ__dy_tk_s_" + lIiI1lIl);
iIiI1ilI["WQ__dy_algo_s_" + lIiI1lIl] = liIlI1i1.localStorage.getItem("WQ__dy_algo_s_" + lIiI1lIl);
iIiI1ilI["WQ_qe_" + lIiI1lIl] = liIlI1i1.localStorage.getItem("WQ_qe_" + lIiI1lIl);
}
I111i1il(l1il1i1I);
}
});
}
function l1lill1l() {
class l1iiI1I {
constructor() {
this.UVCookie = "";
this.ltr = 0;
this.mr = [1, 0];
this.document = {
"cookie": "",
"cookies": "__jdc=123;",
"domain": "prodev.m.jd.com",
"referrer": "https://u.jd.com/",
"location": {
"href": "https://prodev.m.jd.com/mall/active/3nNmntNrufZjkZF1XJJKknDuCbaQ/index.html",
"hrefs": "https://prodev.m.jd.com/mall/active/3nNmntNrufZjkZF1XJJKknDuCbaQ/index.html"
}
};
this.navigator = {
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",
"userAgents": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"
};
this.window = {};
}
["getUVCookie"](IIIlI1lI = "", IiilIIl1 = "", IIliiIIl = "", iII1l1I = "") {
try {
this.document.location.href = this.document.location.hrefs + "";
this.document.cookie = this.document.cookies + "";
if (IIliiIIl) this.document.location.href = IIliiIIl;
if (iII1l1I) this.document.cookie = iII1l1I;
this.UVCookie = "";
this.navigator.userAgent = this.navigator.userAgents + "";
this.ltr = 1011 + Math.round(31 * Math.random());
if (IIIlI1lI) this.navigator.userAgent = IIIlI1lI;
return this.lr = {
"ckJda": "__jda",
"ckJdb": "__jdb",
"ckJdv": "__jdv",
"ckJdc": "__jdc",
"refUrl": "https://u.jd.com/"
}, this.q(), this.s(IiilIIl1), this.UVCookie;
} catch (ii1ll1I) {
console.log(ii1ll1I);
}
}
["s"](i1i1I1Il = "") {
var IiI1111i,
il1iIiIi,
Il1iIii1,
l1l1IlIi,
IIilI1l = (this.getCookie(this.lr.ckJda) || "").split("."),
IIill1lI = (this.getCookie(this.lr.ckJdb) || "").split("."),
lIlI1I1 = (this.getCookie(this.lr.ckJdv) || "").split("|"),
Iil1ilI = this.getCookie(this.lr.ckJdc) || "",
llliIIli = parseInt((new Date().getTime() - this.ltr) / 1000),
IIii1IIi = 0,
IIlIlll1 = 1,
lIIill11 = "direct",
iI1iiIl = "-",
iiIlil = "none",
I1lli11i = "-";
if (IIilI1l.length > 3) for (var I1IilIi1 = 2; I1IilIi1 < 5 && I1IilIi1 < IIilI1l.length; I1IilIi1++) {
var iiliiil = IIilI1l[I1IilIi1];
iiliiil.length > 10 && (IIilI1l[I1IilIi1] = iiliiil.substr(0, 10));
}
IIilI1l.length > 5 ? (Il1iIii1 = IIilI1l[0], l1l1IlIi = IIilI1l[1], IiI1111i = parseInt(IIilI1l[2], 10), il1iIiIi = parseInt(IIilI1l[3], 10), llliIIli = parseInt(IIilI1l[4], 10), IIlIlll1 = parseInt(IIilI1l[5], 10) || IIlIlll1) : (l1l1IlIi = this.genUuid(), IiI1111i = llliIIli, il1iIiIi = llliIIli);
this.lr.uuid = l1l1IlIi;
IIill1lI.length > 3 && (Il1iIii1 || (Il1iIii1 = IIill1lI[0]), IIii1IIi = parseInt(IIill1lI[1], 10) || 0);
lIlI1I1.length > 4 && (Il1iIii1 || (Il1iIii1 = lIlI1I1[0]), lIIill11 = lIlI1I1[1], iI1iiIl = lIlI1I1[2], iiIlil = lIlI1I1[3], I1lli11i = lIlI1I1[4]);
Iil1ilI && "" !== Iil1ilI && (Il1iIii1 || (Il1iIii1 = Iil1ilI));
var liIliil,
IlIlliiI = [],
l1I1iIil = IIill1lI.length < 4,
I1iI1lII = this.getParameter("utm_source"),
Il1I1i1i = false;
if (I1iI1lII) {
var lIl1ii1 = this.getParameter("utm_campaign"),
IilIiIi = this.getParameter("utm_medium"),
li1IIiI1 = this.getParameter("utm_term");
IlIlliiI.push(I1iI1lII || lIIill11);
IlIlliiI.push(lIl1ii1 || iI1iiIl);
IlIlliiI.push(IilIiIi || iiIlil);
IlIlliiI.push(li1IIiI1 || I1lli11i);
I1lli11i = IlIlliiI[3];
Il1I1i1i = !0;
} else {
var lilliIIl,
l11lili = this.lr.refUrl && this.lr.refUrl.split("/")[2],
lIiiIiii = false;
if (l11lili && l11lili.indexOf(this.lr.ckDomain) < 0) {
for (lilliIIl = this.lr.seo, I1IilIi1 = 0; I1IilIi1 < lilliIIl.length; I1IilIi1++) {
var iIilII1i = lilliIIl[I1IilIi1].split(":");
if (l11lili.indexOf(iIilII1i[0].toLowerCase()) > -1 && this.lr.refUrl.indexOf((iIilII1i[1] + "=").toLowerCase()) > -1) {
var iIl1Il11 = this.getParameter(iIilII1i[1], this.lr.refUrl);
/[^\x00-\xff]/.test(iIl1Il11) && (iIl1Il11 = encodeURIComponent(iIl1Il11));
IlIlliiI.push(iIilII1i[0]);
IlIlliiI.push("-");
IlIlliiI.push("organic");
IlIlliiI.push(iIl1Il11 || "not set");
I1lli11i = IlIlliiI[3];
lIiiIiii = !0;
break;
}
}
lIiiIiii || (l11lili.indexOf("zol.com.cn") > -1 ? (IlIlliiI.push("zol.com.cn"), IlIlliiI.push("-"), IlIlliiI.push("cpc"), IlIlliiI.push("not set")) : (IlIlliiI.push(l11lili), IlIlliiI.push("-"), IlIlliiI.push("referral"), IlIlliiI.push("-")));
}
}
liIliil = IlIlliiI.length > 0 && (IlIlliiI[0] !== lIIill11 || IlIlliiI[1] !== iI1iiIl || IlIlliiI[2] !== iiIlil) && "referral" !== IlIlliiI[2];
l1I1iIil || !l1I1iIil && liIliil ? (lIIill11 = IlIlliiI[0] || lIIill11, iI1iiIl = IlIlliiI[1] || iI1iiIl, iiIlil = IlIlliiI[2] || iiIlil, I1lli11i = IlIlliiI[3] || I1lli11i, IIilI1l.length > 5 ? (IiI1111i = parseInt(IIilI1l[2], 10), il1iIiIi = parseInt(IIilI1l[4], 10), llliIIli = parseInt((new Date().getTime() - this.ltr) / 1000), IIlIlll1++, IIii1IIi = 1) : (IIlIlll1 = 1, IIii1IIi = 1)) : IIii1IIi++;
var IIl1lI1I = this.getPageParamFromSdk();
if (IIl1lI1I && IIl1lI1I.vts) {
var ilIlI1II = 1 * IIl1lI1I.vts,
Ill1lll = 1 * IIl1lI1I.seq;
(ilIlI1II > IIlIlll1 || ilIlI1II === IIlIlll1 && Ill1lll >= IIii1IIi) && (IIlIlll1 = ilIlI1II, IIii1IIi = Ill1lll + 1);
}
if (Il1iIii1 || (Il1iIii1 = this.genHash(this.lr.ckDomain)), this.setCookie(this.lr.ckJda, [Il1iIii1, l1l1IlIi, IiI1111i, il1iIiIi, llliIIli, IIlIlll1 || 1].join("."), this.lr.ckDomain, this.lr.ckJdaExp), this.setCookie(this.lr.ckJdb, [Il1iIii1, IIii1IIi, l1l1IlIi + "|" + IIlIlll1, llliIIli].join("."), this.lr.ckDomain, this.lr.ckJdbExp), Il1I1i1i || liIliil || lIlI1I1.length < 5) {
var II1ii11i = [Il1iIii1, lIIill11 || "direct", iI1iiIl || "-", iiIlil || "none", I1lli11i || "-", new Date().getTime() - this.ltr].join("|");
this.setJdv(II1ii11i = encodeURIComponent(II1ii11i), Il1iIii1);
}
this.setCookie(this.lr.ckJdc, Il1iIii1, this.lr.ckDomain);
}
["q"]() {
this.lr.rpDomain = this.lr.rpDomain || "uranus.jd.com";
this.lr.logUrl = "//" + this.lr.rpDomain + "/log/m";
this.lr.logType = {
"pv": "1",
"pf": "2",
"cl": "3",
"od": "4",
"pd": "5",
"hm": "6",
"magic": "000001"
};
this.lr.useTmpCookie ? (this.lr.ckJda = "__tra", this.lr.ckJdb = "__trb", this.lr.ckJdc = "__trc", this.lr.ckJdu = "__tru") : (this.lr.ckJda = "__jda", this.lr.ckJdb = "__jdb", this.lr.ckJdc = "__jdc", this.lr.ckJdu = "__jdu");
this.lr.ckJdv = "__jdv";
this.lr.ckWxAppCk = "__jdwxapp";
this.lr.ckRefCls = "__jd_ref_cls";
this.lr.ckJdaExp = 15552000000;
this.lr.ckJdbExp = 1800000;
this.lr.ckJduExp = 15552000000;
this.lr.ckJdvExp = 1296000000;
this.lr.ckJdvEmbeddedExp = 86400000;
this.lr.ckWxAppCkExp = 15552000000;
this.lr.mtSubsiteExp = 31536000000;
this.lr.ckDomain = (this.document.domain.match(/[^.]+\.(com.cn|net.cn|org.cn|gov.cn|edu.cn)$/) || [""])[0] || this.document.domain.replace(/.*?([^.]+\.[^.]+)$/, "$1");
this.lr.title = this.document.title;
this.lr.refUrl = this.document.referrer;
this.lr.seo = ["i.easou.com:q", "m.baidu.com:word", "m.sm.cn:q", "m.so.com:q", "wap.sogou.com:keyword", "m.sogou.com:keyword", "wap.sogo.com:keyword", "m.sogo.com:keyword", "page.roboo.com:q", "ask.com:q", "baidu:word", "baidu:wd", "bing:q", "easou:q", "google:q", "roboo:word", "roboo:q", "sm.cn:q", "so.com:q", "sogou:keyword", "sogou:query", "sogo.com:keyword", "sogo.com:query", "yahoo:p", "yandex:text", "yicha:key"];
}
["setCookie"](llllii1I, Iii1IIiI, l1l1lii, iIii) {
if (llllii1I) {
var I11liIIi = "";
if (iIii) {
var li1I111 = new Date();
li1I111.setTime(li1I111.getTime() - this.ltr + iIii);
I11liIIi = ";expires=" + li1I111.toGMTString();
}
this.UVCookie += llllii1I + "=" + Iii1IIiI + "; ";
}
}
["setJdv"](lI1l1iiI, llilIiI, i11III1l) {
var lI1lIIi1 = "";
lI1lIIi1 = this.isPrey(10) && (!lI1l1iiI || lI1l1iiI.length > 400) ? llilIiI + "|direct|-|none|-|" + (new Date().getTime() - this.ltr) : lI1l1iiI;
var Ii1l1IIl = i11III1l || this.isEmbedded() ? this.lr.ckJdvEmbeddedExp : this.lr.ckJdvExp;
this.setCookie(this.lr.ckJdv || "__jdv", lI1lIIi1, this.lr.ckDomain, Ii1l1IIl);
}
["getCookie"](IiiI1Il1, l11il1il) {
var lI11iilI = this.document.cookie.match(new RegExp("(^| )" + IiiI1Il1 + "=([^;]*)(;|$)"));
return null !== lI11iilI ? l11il1il ? lI11iilI[2] : this.urlDecode(lI11iilI[2]) : "";
}
["genUuid"]() {
return new Date().getTime() - this.ltr + "" + parseInt(2147483647 * Math.random());
}
["getParameter"](i1i11I, liiIl1l1) {
var ll11111l = liiIl1l1 || this.document.location.href,
Iiil1lII = new RegExp("(?:^|&|[?]|[/])" + i1i11I + "=([^&]*)").exec(ll11111l);
return Iiil1lII ? this.urlDecode(Iiil1lII[1]) : null;
}
["urlDecode"](iiii1ii) {
try {
return decodeURIComponent(iiii1ii);
} catch (IIiil1) {
return iiii1ii;
}
}
["genHash"](iIlIll1i) {
var lIi1II11,
i11lii1l = 1,
ll1I11i1 = 0;
if (iIlIll1i) for (i11lii1l = 0, lIi1II11 = iIlIll1i.length - 1; lIi1II11 >= 0; lIi1II11--) {
i11lii1l = 0 !== (ll1I11i1 = 266338304 & (i11lii1l = (i11lii1l << 6 & 268435455) + (ll1I11i1 = iIlIll1i.charCodeAt(lIi1II11)) + (ll1I11i1 << 14))) ? i11lii1l ^ ll1I11i1 >> 21 : i11lii1l;
}
return i11lii1l;
}
["isPrey"](ill1lil) {
if (ill1lil >= 100) return !0;
var iil11lIl = this.lr.uuid,
Ill11l1l = iil11lIl.substr(iil11lIl.length - 2);
return !!Ill11l1l && 1 * Ill11l1l < ill1lil;
}
["isEmbedded"]() {
var iIl11l1i = this.navigator.userAgent || "";
return /^(jdapp|jdltapp|jdpingou);/.test(iIl11l1i) || this.isJdLog();
}
["isJdLog"]() {
return (this.navigator.userAgent || "").indexOf(";jdlog;") > -1;
}
["getPageParamFromSdk"]() {
var Ii1iii1I, IIIl1III;
try {
this.window.JDMAUnifyBridge && this.window.JDMAUnifyBridge.JDMAGetMPageParam ? IIIl1III = JDMAUnifyBridge.JDMAGetMPageParam() : this.window.JDMAGetMPageParam ? IIIl1III = JDMAGetMPageParam() : this.window.webkit && this.window.webkit.messageHandlers && this.window.webkit.messageHandlers.JDMASetMPageParam && (IIIl1III = this.window.prompt("JDMAGetMPageParam", ""));
IIIl1III && (Ii1iii1I = JSON.parse(IIIl1III));
} catch (iilliIlI) {}
return Ii1iii1I;
}
["time"](l1I1lII1, i1Iili11 = null) {
const ll1liiii = i1Iili11 ? new Date(i1Iili11) : new Date();
let I1i1II1i = {
"M+": ll1liiii.getMonth() + 1,
"d+": ll1liiii.getDate(),
"H+": ll1liiii.getHours(),
"m+": ll1liiii.getMinutes(),
"s+": ll1liiii.getSeconds(),
"q+": Math.floor((ll1liiii.getMonth() + 3) / 3),
"S": ll1liiii.getMilliseconds()
};
/(y+)/.test(l1I1lII1) && (l1I1lII1 = l1I1lII1.replace(RegExp.$1, (ll1liiii.getFullYear() + "").substr(4 - RegExp.$1.length)));
for (let i11llI11 in I1i1II1i) new RegExp("(" + i11llI11 + ")").test(l1I1lII1) && (l1I1lII1 = l1I1lII1.replace(RegExp.$1, 1 == RegExp.$1.length ? I1i1II1i[i11llI11] : ("00" + I1i1II1i[i11llI11]).substr(("" + I1i1II1i[i11llI11]).length)));
return l1I1lII1;
}
}
Ii1iIilI = new l1iiI1I();
}
function randomString(ll1i1I1i) {
ll1i1I1i = ll1i1I1i || 32;
let lIliiiIi = "abcdef0123456789",
lllllI = lIliiiIi.length,
I1ll11I1 = "";
for (i = 0; i < ll1i1I1i; i++) I1ll11I1 += lIliiiIi.charAt(Math.floor(Math.random() * lllllI));
return I1ll11I1;
}
const navigator = {
userAgent: `jdapp;iPhone;10.1.4;14.3;${$.CryptoJS.SHA1(randomString(40)).toString()};M/5.0;network/wifi;ADID/;model/iPhone12,1;addressid/;appBuild/167814;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`,
plugins: { length: 0 },
language: "zh-CN",
};
const screen = {
availHeight: 812,
availWidth: 375,
colorDepth: 24,
height: 812,
width: 375,
pixelDepth: 24,
};
const window = {};
const document = {
location: {
ancestorOrigins: {},
href: "https://prodev.m.jd.com/mall/active/3nNmntNrufZjkZF1XJJKknDuCbaQ/index.html",
origin: "https://prodev.m.jd.com",
protocol: "https:",
host: "prodev.m.jd.com",
hostname: "prodev.m.jd.com",
port: "",
pathname: "/mall/active/3nNmntNrufZjkZF1XJJKknDuCbaQ/index.html",
search: "",
hash: "",
},
};
var start_time = new Date().getTime(),
_jdfp_canvas_md5 = "",
_jdfp_webgl_md5 = "",
_fingerprint_step = 1,
_JdEid = "",
_eidFlag = !1,
risk_jd_local_fingerprint = "",
_jd_e_joint_;
function generateUuid() {
var t = Math
for (
var g = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split(""),
m = 0,
a = g.length;
m < a;
m++
)
switch (g[m]) {
case "x":
g[m] = t.floor(16 * t.random()).toString(16);
break;
case "y":
g[m] = (t.floor(4 * t.random()) + 8).toString(16);
}
return g.join("");
}
function t(a) {
if (null == a || void 0 == a || "" == a) return "NA";
if (null == a || void 0 == a || "" == a) var b = "";
else {
b = [];
for (var c = 0; c < 8 * a.length; c += 8)
b[c >> 5] |= (a.charCodeAt(c / 8) & 255) << c % 32;
}
a = 8 * a.length;
b[a >> 5] |= 128 << a % 32;
b[(((a + 64) >>> 9) << 4) + 14] = a;
a = 1732584193;
c = -271733879;
for (var l = -1732584194, h = 271733878, q = 0; q < b.length; q += 16) {
var z = a,
C = c,
D = l,
B = h;
a = v(a, c, l, h, b[q + 0], 7, -680876936);
h = v(h, a, c, l, b[q + 1], 12, -389564586);
l = v(l, h, a, c, b[q + 2], 17, 606105819);
c = v(c, l, h, a, b[q + 3], 22, -1044525330);
a = v(a, c, l, h, b[q + 4], 7, -176418897);
h = v(h, a, c, l, b[q + 5], 12, 1200080426);
l = v(l, h, a, c, b[q + 6], 17, -1473231341);
c = v(c, l, h, a, b[q + 7], 22, -45705983);
a = v(a, c, l, h, b[q + 8], 7, 1770035416);
h = v(h, a, c, l, b[q + 9], 12, -1958414417);
l = v(l, h, a, c, b[q + 10], 17, -42063);
c = v(c, l, h, a, b[q + 11], 22, -1990404162);
a = v(a, c, l, h, b[q + 12], 7, 1804603682);
h = v(h, a, c, l, b[q + 13], 12, -40341101);
l = v(l, h, a, c, b[q + 14], 17, -1502002290);
c = v(c, l, h, a, b[q + 15], 22, 1236535329);
a = x(a, c, l, h, b[q + 1], 5, -165796510);
h = x(h, a, c, l, b[q + 6], 9, -1069501632);
l = x(l, h, a, c, b[q + 11], 14, 643717713);
c = x(c, l, h, a, b[q + 0], 20, -373897302);
a = x(a, c, l, h, b[q + 5], 5, -701558691);
h = x(h, a, c, l, b[q + 10], 9, 38016083);
l = x(l, h, a, c, b[q + 15], 14, -660478335);
c = x(c, l, h, a, b[q + 4], 20, -405537848);
a = x(a, c, l, h, b[q + 9], 5, 568446438);
h = x(h, a, c, l, b[q + 14], 9, -1019803690);
l = x(l, h, a, c, b[q + 3], 14, -187363961);
c = x(c, l, h, a, b[q + 8], 20, 1163531501);
a = x(a, c, l, h, b[q + 13], 5, -1444681467);
h = x(h, a, c, l, b[q + 2], 9, -51403784);
l = x(l, h, a, c, b[q + 7], 14, 1735328473);
c = x(c, l, h, a, b[q + 12], 20, -1926607734);
a = u(c ^ l ^ h, a, c, b[q + 5], 4, -378558);
h = u(a ^ c ^ l, h, a, b[q + 8], 11, -2022574463);
l = u(h ^ a ^ c, l, h, b[q + 11], 16, 1839030562);
c = u(l ^ h ^ a, c, l, b[q + 14], 23, -35309556);
a = u(c ^ l ^ h, a, c, b[q + 1], 4, -1530992060);
h = u(a ^ c ^ l, h, a, b[q + 4], 11, 1272893353);
l = u(h ^ a ^ c, l, h, b[q + 7], 16, -155497632);
c = u(l ^ h ^ a, c, l, b[q + 10], 23, -1094730640);
a = u(c ^ l ^ h, a, c, b[q + 13], 4, 681279174);
h = u(a ^ c ^ l, h, a, b[q + 0], 11, -358537222);
l = u(h ^ a ^ c, l, h, b[q + 3], 16, -722521979);
c = u(l ^ h ^ a, c, l, b[q + 6], 23, 76029189);
a = u(c ^ l ^ h, a, c, b[q + 9], 4, -640364487);
h = u(a ^ c ^ l, h, a, b[q + 12], 11, -421815835);
l = u(h ^ a ^ c, l, h, b[q + 15], 16, 530742520);
c = u(l ^ h ^ a, c, l, b[q + 2], 23, -995338651);
a = w(a, c, l, h, b[q + 0], 6, -198630844);
h = w(h, a, c, l, b[q + 7], 10, 1126891415);
l = w(l, h, a, c, b[q + 14], 15, -1416354905);
c = w(c, l, h, a, b[q + 5], 21, -57434055);
a = w(a, c, l, h, b[q + 12], 6, 1700485571);
h = w(h, a, c, l, b[q + 3], 10, -1894986606);
l = w(l, h, a, c, b[q + 10], 15, -1051523);
c = w(c, l, h, a, b[q + 1], 21, -2054922799);
a = w(a, c, l, h, b[q + 8], 6, 1873313359);
h = w(h, a, c, l, b[q + 15], 10, -30611744);
l = w(l, h, a, c, b[q + 6], 15, -1560198380);
c = w(c, l, h, a, b[q + 13], 21, 1309151649);
a = w(a, c, l, h, b[q + 4], 6, -145523070);
h = w(h, a, c, l, b[q + 11], 10, -1120210379);
l = w(l, h, a, c, b[q + 2], 15, 718787259);
c = w(c, l, h, a, b[q + 9], 21, -343485551);
a = A(a, z);
c = A(c, C);
l = A(l, D);