-
Notifications
You must be signed in to change notification settings - Fork 0
/
qixi.html
913 lines (828 loc) · 24 KB
/
qixi.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
<title>七夕领好礼</title>
<style media="screen">
*{
padding: 0;
margin: 0;
font-family: Arial,Helvetica,sans-serif;
font-size: 14px;
color: #262626;
-webkit-user-select: none;
user-select: none;
-webkit-overflow-scrolling: touch;
}
body{
height: 100%;
width: 100%;
position: absolute;
background: #f5f5f5;
text-align: left;
-webkit-text-size-adjust: none;
}
a{
text-decoration: none;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
}
#wrapper{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
#page_bd{
background-color: #22104c;
background-image: url(https://ss3.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy/super/pic/item/d833c895d143ad4bf726cd918a025aafa40f0652.jpg);
background-size: 100% auto;
background-repeat: no-repeat;
min-height: 100%;
position: relative;
}
#lucky_nine_hd{
width: 100%;
position: relative;
height: 1rem;
}
.back{
background-image: url();
}
.back{
position: absolute;
width: 25px;
height: 25px;
left: 10px;
top: 10px;
background-size: 25px 25px;
}
.noTapColor{
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}
.share{
background-image: url();
}
.share{
position: absolute;
width: 25px;
height: 25px;
right: 10px;
top: 10px;
background-size: 25px 25px;
}
#lucky_nine_title{
height: 3.2rem;
background-image: url();
}
.rule-wrapper{
line-height: .55rem;
height: .55rem;
padding: 0 .8rem;
}
.rule-btn{
font-family: 微软雅黑;
color: #b5a1d6;
float: left;
font-size: 14px;
min-width: 53px;
}
/*抽奖样式*/
.prize-list-wrapper{
position: relative;
}
.prize-content{
background-image: url("https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/super/pic/item/b21bb051f81986187ede66d542ed2e738ad4e6c2.jpg");
}
.prize-content{
width: 90%;
margin: 0 auto;
background-size: 100% auto;
background-repeat: no-repeat;
position: relative;
}
.prize-padding{
padding-top: 90.5%;
}
.prize-bg{
position: absolute;
width: 86%;
height: 80%;
left: 7%;
top: 9%;
-webkit-border-radius: 10px;
border-radius: 10px;
}
.prize-ul{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.prize-li{
background-color: #d33dd8;
width: 31%;
height: 31%;
position: absolute;
-webkit-border-radius: 10px;
border-radius: 10px;
}
.prize-1{
top: 2.1%;
left: 2.1%;
}
.prize-2{
top: 2.1%;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
.prize-3{
top: 2.1%;
right: 2.1%;
}
.prize-4{
right: 2.1%;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.prize-5{
right: 2.1%;
bottom: 2.1%;
}
.prize-6{
bottom: 2.1%;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
.prize-7{
bottom: 2.1%;
left: 2.1%;
}
.prize-8{
top: 50%;
left: 2.1%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.prize-li-bg{
background-color: #f8d6fb;
position: relative;
height: 95%;
width: 100%;
-webkit-border-radius: 10px;
border-radius: 10px;
background-size: 100% auto;
background-repeat: no-repeat;
background-position: top left;
}
.prize-cur .prize-border{
display: block;
}
.prize-border{
border-radius: 10px;
border: 4px solid #f9f201;
height: 90%;
display: none;
}
.prize-li-bg span{
position: absolute;
font-size: 12px;
bottom: 2px;
text-align: center;
font-weight: 700;
width: 100%;
}
.prize-btn{
background-image: url("./images/9.jpg");
width: 31%;
height: 31%;
left: 50%;
top: 50%;
position: absolute;
background-size: 100% auto;
background-repeat: no-repeat;
-webkit-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.prize-count{
color: #fff;
position: absolute;
bottom: 0;
text-align: center;
width: 100%;
font-size: 12px;
height: .8rem;
line-height: .8rem;
}
.prize-count span{
color: #f9f201;
margin: 0 5px;
display: inline-block;
height: .8rem;
line-height: .8rem;
}
.bottom-wrapper{
margin-top: 10px;
padding: 0 .8rem;
height: 24px;
line-height: 24px;
}
.bottom-wrapper .roll-lamp-wrapper{
float: left;
height: 24px;
line-height: 24px;
border-radius: 3px;
width: 70%;
font-size: 12px;
}
.roll-lamp-wrapper{
padding-left: 17px;
position: relative;
}
.roll-lamp-wrapper::before{
left: 0;
top: 0;
content: "";
width: 15px;
height: 100%;
position: absolute;
background-image: url("https://ss3.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/super/pic/item/c8ea15ce36d3d5397c92b2c83287e950352ab00a.jpg");
background-repeat: no-repeat;
background-size: 100% auto;
background-position: center center;
}
.roll-lamp-wrapper ul{
display: -webkit-box;
}
.roll-lamp-wrapper ul li{
color: #c145f4;
height: 24px;
line-height: 24px;
font-size: 14px;
list-style-type: disc;
list-style-position: inside;
padding: 0 10px;
}
.bottom-wrapper .viewPrize{
float: right;
font-size: 14px;
}
.viewPrize{
font-family: 微软雅黑;
color: #b08fd5;
}
#page-foot .prize-copyright{
color: #a9a6b4;
font-size: 12px;
text-align: center;
display: block;
width: 100%;
height: 20px;
line-height: 20px;
padding-bottom: 30px;
padding-top: 5px;
}
/*分享样式*/
.bd-share-popup a, .bd-share-popup a:hover{
text-decoration: none;
outline: none;
}
.bd-share-popup-layer{
position: fixed;
z-index: 100000;
top: 0;
left: 0;
background-color: black;
opacity: 0.5;
width: 100%;
}
.bd-share-pop-content{
position: fixed;
left: 0;
top: 0;
z-index: 100001;
width: 100%;
}
.bd-share-pop-content table, .bd-share-pop-content tr, .bd-share-pop-content td{
width: 100%;
height: 100%;
}
.bd-share-pop-content td{
text-align: center;
vertical-align: middle;
}
.native td{
text-align: center;
vertical-align: bottom;
}
.native .bd-share-popup{
display: inline-block;
width: 100%;
}
.bd-share-popup{
display: inline-block;
width: 304px;
background: rgba(255, 255, 255, 0.9);
box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
}
.bd-share-popup, .bd-share-popup li{
list-style: none;
}
.bd-share{
text-align: center;
margin: 2px auto 0;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
position: relative;
background: #f8f8f8;
padding-bottom: 10px;
-webkit-opacity: 0.95;
opacity: 0.95;
}
.bd-share .bd-cl{
display: inline-block;
zoom:1;
}
.bd-share .bd-cl::after{
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.bd-share .media{
float: left;
display: inline-block;
width: 80px;
height: 63px;
padding: 17px 0 0;
}
.bd-share .media a{
display: block;
padding-top: 38px;
height: 25px;
font-size: 14px;
color: #555;
text-align: center;
background-image: url("./images/share_popupx.png");
background-repeat: no-repeat;
}
.bd-share .media .qqdenglu{
background-position: -77px 0;
}
.bd-share .media .sinaweibo{
background-position: 23px 0;
}
.bd-share .media .qqweibo{
background-position: -177px 0;
}
.bd-share .media .renren{
background-position: -376px 4px;
}
.bd-share .media .kaixin{
background-position: -177px -100px;
}
.bd-share .media .mail{
background-position: -277px -100px;
}
.bd-share-popup-footer{
padding: 10px 15px;
background-color: #f0f0f0;
box-shadow: 0px 2px 2px #d8d8d8;
}
.bd-share-popup-close{
display: block;
height: 41px;
border: 1px solid #e1e1e1;
box-shadow: 0 1px 1px #fafafa inset;
border-radius: 1px;
line-height: 41px;
font-size: 15px;
color: #3c3c3c;
text-align: center;
background-image: -webkit-linear-gradient(top,#fff,#f6f6f6);
}
/*抽奖规则弹层样式*/
.dialog-mask{
position: absolute;
z-index: 1000000;
background: rgba(0, 0, 0, 0.6);
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.dialog{
width: 81.25%;
background-color: #fff;
box-sizing: border-box;
position: fixed;
z-index: 1000001;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
top: 50%;
color: #333;
-webkit-transition: margin-top 300ms ease;
-moz-transition: margin-top 300ms ease;
-o-transition: margin-top 300ms ease;
transition: margin-top 300ms ease;
border-radius: 7px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}
.dialog-rule{
padding-bottom: .625rem;
}
.dialog-close{
position: absolute;
width: 1.25rem;
height: 1rem;
top: 5px;
right: 0;
background: url("https://ss3.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/super/pic/item/5243fbf2b21193137241569462380cd791238d90.jpg") no-repeat 50% 50%;
background-size: .46875rem .46875rem;
}
.dialog-rule .dialog-title{
text-align: center;
font-size: 21px;
line-height: 21px;
margin: 17px;
}
.dialog-rule-content{
height: 8.625rem;
overflow-y: scroll;
}
.dialog-rule-content ul li{
padding: 5px 20px;
font-size: 14px;
line-height: 20px;
color: #333;
}
.dialog-rule-content ul li span{
width: 4px;
height: 20px;
border-radius: 2px;
float: left;
line-height: 15px;
}
.dialog-rule-content ul li span i{
width: 4px;
height: 4px;
display: inline-block;
border-radius: 2px;
background: red;
}
.dialog-rule-content ul li p{
margin-left: 16px;
}
@media screen and (max-width: 440px) {
#wrapper{
display: block;
}
}
@media screen and (min-width: 441px) {
.lan-mark{
color: #fff;
text-align: center;
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: #000;
display: -webkit-box;
display: flex;
display: -webkit-flex;
-webkit-box-pack: center;
-webkit-box-align: center;
align-items: center;
-webkit-align-items: center;
justify-content: center;
font-size: 30px;
}
}
@media screen and (min-width: 441px) {
#wrapper{
display: none;
}
}
@media screen and (max-width: 440px) {
.lan-mark{
display: none;
}
}
@media (-webkit-min-device-pixel-ratio;2), not all, not all, not all{
.bd-share .media a{
background-image: url("./images/share_popup2x.png");
background-size: 437px 217px;
}
}
</style>
</head>
<body>
<div class="lan-mark">请竖屏浏览</div>
<div id="wrapper">
<div id="page_bd">
<div class="lucky_nine_main" id="lucky_nine_main">
<div id="lucky_nine_hd">
<a href="https://m.baidu.com" class="back noTapColor"></a>
<span class="share noTapColor"></span>
</div>
<div id="lucky_nine_title"></div>
<div class="rule-wrapper">
<span class="rule rule-btn noTapColor">活动规则</span>
</div>
<div class="prize-list-wrapper">
<div class="prize-content">
<div class="prize-padding"></div>
<div class="prize-bg">
<ul class="prize-ul">
<li class="prize-1 prize-li">
<div class="prize-li-bg" style="background-image:url(./images/1.jpg);">
<div class="prize-border"></div>
<span>糯米电影券</span>
</div>
</li>
<li class="prize-2 prize-li">
<div class="prize-li-bg" style="background-image:url(./images/2.jpg);">
<div class="prize-border"></div>
<span>0元领套餐</span>
</div>
</li>
<li class="prize-3 prize-li">
<div class="prize-li-bg" style="background-image:url(./images/3.jpg);">
<div class="prize-border"></div>
<span>携程酒店券</span>
</div>
</li>
<li class="prize-4 prize-li">
<div class="prize-li-bg" style="background-image:url(./images/4.jpg);">
<div class="prize-border"></div>
<span>小狗吸尘器</span>
</div>
</li>
<li class="prize-5 prize-li">
<div class="prize-li-bg" style="background-image:url(./images/5.jpg);">
<div class="prize-border"></div>
<span>嗨厨房优惠券</span>
</div>
</li>
<li class="prize-6 prize-li">
<div class="prize-li-bg" style="background-image:url(./images/6.jpg);">
<div class="prize-border"></div>
<span>好遗憾</span>
</div>
</li>
<li class="prize-7 prize-li">
<div class="prize-li-bg" style="background-image:url(./images/7.jpg);">
<div class="prize-border"></div>
<span>糯米七夕礼包</span>
</div>
</li>
<li class="prize-8 prize-li">
<div class="prize-li-bg" style="background-image:url(./images/8.jpg);">
<div class="prize-border"></div>
<span>华为v8手机</span>
</div>
</li>
<li class="prize-btn noTapColor"></li>
</ul>
</div>
<p class="prize-count">
您今天还有
<span class="prize-times">3</span>
次抽奖机会
</p>
</div>
<div class="bottom-wrapper">
<div class="roll-lamp-wrapper">
<marquee scrollamount="4">
<!-- shadow-root (open) -->
<ul>
<li>恭喜用户老衲法号净宏获得了糯米电影折扣券一张</li>
<li>恭喜用户155*****511获得了1号店0元领套套</li>
<li>恭喜用户邱叔叔获得了嗨厨房优惠券一张</li>
<li>恭喜用户Favor_M_x获得了糯米新用户鲜花券一张</li>
<li>恭喜用户葛天氏_无怀氏获得了糯米电影折扣券一张</li>
<li>恭喜用户xt_152获得了1号店0元领套套</li>
<li>恭喜用户红衣剑容获得了糯米电影折扣券一张</li>
<li>恭喜用户158*****176获得了糯米电影折扣券一张</li>
<li>恭喜用户158*****176获得了糯米电影折扣券一张</li>
<li>恭喜用户邱叔叔获得了嗨厨房优惠券一张</li>
<li>恭喜用户158*****176获得了糯米电影折扣券一张</li>
<li>恭喜用户158*****176获得了糯米电影折扣券一张</li>
</ul>
</marquee>
</div>
<a href="javascript:;" class="viewPrize noTapColor">查看奖品</a>
</div>
</div>
</div>
<div id="page-foot">
<a href="https://www.baidu.com/duty/" class="prize-copyright">
*本活动最终解释权归主办方百度所有
<br>
©2016 Baidu
</a>
</div>
<div class="dialog-mask" style="display:none;"></div>
</div>
</div>
<!-- 分享 -->
<div class="bdSharePopup" id="bd_share_popup_1470619162535" style="display:none;">
<div class="bd-share-popup-layer" id="bd_share_popup_layer" style="height:1167px;"></div>
<div class="bd-share-pop-content native" id="bd_share_popup_content_1470619162535">
<table>
<tbody>
<tr>
<td>
<div class="bd-share-popup" id="bd_share_popup" style="width:100%;">
<div class="bd-share">
<ul class="bd-cl" id="bd_share_mediaes" style="width:320px;">
<li class="media">
<a href="#" class="qqdenglu" id="bd_share_media_qqdenglu">QQ空间</a>
</li>
<li class="media">
<a href="#" class="sinaweibo" id="bd_share_media_sinaweibo">新浪微博</a>
</li>
<li class="media">
<a href="#" class="qqweibo" id="bd_share_media_qqweibo">腾讯微博</a>
</li>
<li class="media">
<a href="#" class="renren" id="bd_share_media_renren">人人网</a>
</li>
<li class="media">
<a href="#" class="kaixin" id="bd_share_media_kaixin">开心网</a>
</li>
<li class="media">
<a href="#" class="mail" id="bd_share_media_mail">邮件</a>
</li>
</ul>
</div>
<div class="bd-share-popup-footer">
<a href="javascript:;" class="bd-share-popup-close" id="bd_share_popup_close_1470619162535">取消</a>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- 抽奖规则 -->
<div class="dialog dialog-rule" id="dialog25557" style="margin-top:0px;display:none;">
<div class="dialog-close noTapColor"></div>
<div class="dialog-title">抽奖规则</div>
<div class="dialog-rule-content">
<ul>
<li>
<span>
<i></i>
</span>
<p>
活动时间:2016年8月6日0:00-2016年8月9日23:59。本活动仅限百度首页登录用户参与。
</p>
</li>
<li>
<span>
<i></i>
</span>
<p>
活动期间,每个登录用户每天有3次抽奖机会,当天抽奖次数如未用尽,不可累计至后续活动。
</p>
</li>
<li>
<span>
<i></i>
</span>
<p>
所获得的奖品可点击百度首页右上角进入“个人中心-我的奖品”查看,所有优惠券不找零、不兑现,详细使用规则参见奖品详情页内的“使用说明”。为了确保实物奖品的准确发放,请相关获奖用户填写详细收货信息,超过15个工作日未填写详细收货信息视作自动放弃奖品。
</p>
</li>
<li>
<span>
<i></i>
</span>
<p>
对于恶意注册、利用本次活动奖品进行非法牟利、炒作、套现、转售的用户,一经发现并核实用户存在上述行为,百度首页有权取消其获奖资格,追回奖品。如上述违规行为给百度首页造成损失,百度首页将保留追究其民事责任和刑事责任的权利。
</p>
</li>
<li>
<span>
<i></i>
</span>
<p>
如对本活动有其他疑问,请搜索并关注“百度首页”或“baiduzhinengshouye”微信公众号,描述详细问题,将有专人进行解答。
</p>
</li>
</ul>
</div>
</div>
<script type="text/javascript">
var oStartBtn = document.querySelector(".prize-btn"),
prizeArr = document.querySelectorAll(".prize-li"),
oShare = document.querySelector(".share"),
oSharePop = document.querySelector(".bdSharePopup"),
oSharePopClose = document.querySelector(".bd-share-popup-close"),
oRuleBtn = document.querySelector(".rule-btn"),
oDialog = document.querySelector(".dialog"),
oDialogClose = document.querySelector(".dialog-close"),
oDialogMask = document.querySelector(".dialog-mask"),
isRunning = false,
prizes = [];
oPrizeTime = document.querySelector(".prize-times"),
chance = 3;
function init() {
var val = 3;
if(parseInt(localStorage.chance) >=0) {
val = parseInt(localStorage.chance);
}
chance = val;
oPrizeTime.innerHTML = val;
document.querySelector(".bd-share-pop-content").style.height = window.innerHeight + "px";
}
init();
function getPrizeRandom() {
var num1 = Math.round(Math.random()*1000);
num2 = Math.round(Math.random()*1000),
num3 = Math.round(Math.random()*1000),
prize = 5;
if (num1 > 900 && num2 > 900 && num3 >900) {
prize = 7;
}else if (num1 > 800 && num2 > 800 && num3 >800) {
prize = 3;
}else if (num1 > 700 && num2 > 700 && num3 >500) {
prize = 6;
}else if (num1 > 400 && num2 > 400) {
prize = 4;
}else if (num1 > 300) {
prize = 1;
}else if (num1 > 350) {
prize = 0;
}else if (num1 > 350 && num2 > 350) {
prize = 2;
}
return prize;
}
oStartBtn.addEventListener("click",function () {
if (isRunning) {
return;
}
if (prizes.length > 2 || chance <= 0) {
alert('您今天的抽奖次数已经用完!');
return;
}
isRunning = true;
var i = 0;
var prize = getPrizeRandom();
prizes.push(prize);
console.log(prizes);
var ring = 0;
var timer = setInterval(function () {
var cur = document.querySelector(".prize-cur");
if (cur) {
cur.classList.remove("prize-cur");
}
prizeArr[i].classList.add("prize-cur");
if (ring > 5 && i == prize) {
clearInterval(timer);
isRunning = false;
chance--;
oPrizeTime.innerHTML = chance;
localStorage.setItem('chance',chance);
}
i++;
if (i == prizeArr.length) {
i = 0;
ring ++;
}
},100);
},false);
oShare.addEventListener('click',function () {
oSharePop.style.display = "block";
},false);
oSharePopClose.addEventListener('click',function () {
oSharePop.style.display = "none";
},false);
oRuleBtn.addEventListener('click',function () {
oDialog.style.display = "block";
oDialogMask.style.display = "block";
setTimeout(function(){
oDialog.style.marginTop = '-210px';
},50);
},false);
oDialogClose.addEventListener('click',function () {
oDialog.style.display = "none";
oDialogMask.style.display = "none";
oDialog.style.marginTop = '0px';
},false);
</script>
</body>
</html>