sumbitpay.html
62.1 KB
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
<!DOCTYPE html >
<html>
<head>
<meta charset="UTF-8">
<title>确定支付</title>
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="minimal-ui=yes,width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="__STATIC__/css/giftuser/common_new.css?v=__CSSVERSION__" />
<link rel="stylesheet" href="__STATIC__/css/giftuser/swiper.min.css?v=__CSSVERSION__" />
<link rel="stylesheet" href="__STATIC__/css/giftuser/place_order_new.css?v=__CSSVERSION__" />
<link rel="stylesheet" href="__STATIC__/css/public.css?v=__CSSVERSION__">
<link rel="stylesheet" href="__STATIC__/css/style_jm.css?v=__CSSVERSION__">
<link rel="stylesheet" href="__STATIC__/css/user.css?v=__CSSVERSION__">
<link rel="stylesheet" href="__STATIC__/css/flow.css?v=__CSSVERSION__">
<script type="text/javascript" src="__STATIC__/js/jquery.js?v=__CSSVERSION__"></script>
<script src="__PUBLIC__/js/global.js?v=__CSSVERSION__"></script>
<script src="__STATIC__/js/layer.js"></script>
<script src="__PUBLIC__/js/mobile_common.js?v=__CSSVERSION__"></script>
<script src="__STATIC__/js/common.js?v=__CSSVERSION__"></script>
<link rel="stylesheet" href="__STATIC__/css/login.css">
<style type="text/css">
.addList li {border-bottom: 1px solid #ccc;}
.address_add { border: 0; padding: 0;padding-bottom: 10px;}
.address_add dl {border: 0;padding-left: 35px;}
.address_add dl dd { width: 80%; }
.addmone {padding: 0 10px 10px;}
.fu.close {
background: rgba(0, 0, 0, 0) url("__STATIC__/images/flow/close.png") no-repeat scroll center center / 20px 20px;
cursor: pointer;
height: 20px;
position: absolute;
right: 10px;
top: 10px;
width: 30px;
}
#addrform li { padding-left: 10px;border-bottom: 1px solid #eeeeee; position: relative}
.grd { background: #e18b96}
.giveaway { position: absolute;left: 0;top: 0; z-index: 10; }
.c_checkbox_t {
width: 20px;
height: 20px;
margin-right: 10px;
background: url(__STATIC__/images/flow/c_checkbox_off.png) no-repeat center center;
background-image: url("__STATIC__/images/flow/c_checkbox_off.png");
background-size: auto auto;
background-size: cover;
vertical-align: middle;
display: inline-block;
*display: inline;
*zoom: 1;
}
.c_checkbox_on { background-image: url(__STATIC__/images/flow/c_checkbox_on.png);}
</style>
<body>
<!--选择支付方式弹出框end!-->
<div class="layout order">
<ul class="step">
<li>
<i></i>
<span>1.确定数量</span>
<span></span>
</li>
<li class="on">
<i></i>
<span>2.完成支付</span>
<span></span>
</li>
<li>
<i></i>
<span>3.赠送礼包</span>
<span></span>
</li>
</ul>
<div class="screen-wrap fullscreen login">
<form name="cart2_form" id="cart2_form" method="post">
<input type="hidden" name="state" value="{$Think.request.tocart}"/>
<input type="hidden" id="u_money" value="{$u_money}"/>
<input type="hidden" id="scene" value="{$Think.request.scene}" name="lb_type"/>
<input type="hidden" id="user_note" value="{$Think.request.user_note}" name="user_note"/>
<input type="hidden" name="kl_man_num" value="{$Think.request.kl_man_num}" />
<input type="hidden" name="kl_num" value="{$Think.request.kl_num}"/>
<section class="content" style="min-height: 294px;">
<div class="wrap">
<div class="active" style="min-height: 294px;">
<div class="content-buy">
<div class="wrap order-buy">
<section class="order-info">
<div class="order-list">
<div class="content ptop0">
<div class="panel panel-default info-box">
<div class="panel-body" id="pay_div"></div>
</div>
</div>
</div>
</section>
<div id="fexp" class="<if condition='$expty eq 0'>dn</if>">
<div id="faddmone" class="addmone " onclick="addaddr(0)">
<span class="addTxt">联系电话:{$user['mobile']}</span>
<p class="clear"></p>
</div>
</div>
<!--商品详细情况-->
<section class="order " id="order4">
<section class="order-info kuorder_list" style=" margin-top:0px;">
<foreach name="slist" item="v">
<div class="order-list">
<div class="goods-list-title">{$v.pickup_name}</div>
<ul class="order-list-info">
<foreach name="$v.goods" item="v1" key="k1">
<if condition="$v1.is_gift eq 1 or $v1.is_gift eq 1">
<li class="item">
<div class="itemPay list-price-nums">
<p class="price">¥{$v1.goods_price}</p>
<p class="nums">x{$v1.goods_num}</p>
</div>
<div class="itemInfo list-info">
<div class="list-img ">
<a class="rel" href="{:U('Mobile/Goods/goodsInfo',array('stoid'=>$Think.request.stoid,'id'=>$v1[goods_id]))}">
<img class="giveaway" src="__STATIC__/images/giveaway.png" alt="">
<img src="{:getimg($v1['original_img'],NOIMG,0,1)}">
</a>
</div>
<div class="list-cont">
<h5 class="goods-title">{$v1.goods_name} </h5>
<p class="godds-specification">{$v1.guige}</p>
</div>
</div>
</li>
<else/>
<li class="item">
<div class="itemPay list-price-nums" id="itemPay17">
<p class="price">¥{$v1.goods_price}</p>
<p class="nums">x{$v1.goods_num}</p>
</div>
<div class="itemInfo list-info" id="itemInfo12">
<div class="list-img ">
<a class="rel"
href="{:U('Mobile/Goods/goodsInfo',array('stoid'=>$Think.request.stoid,'id'=>$v1[goods_id]))}">
<img src="{:getimg($v1['original_img'],NOIMG,0,1)}">
</a>
</div>
<div class="list-cont">
<h5 class="goods-title">{$v1.goods_name} </h5>
<p class="godds-specification">
{$v1.guige}</p>
</div>
</div>
</li>
</if>
</foreach>
<if condition="count($v['couponList']) neq 0">
<li class="flow_youhui_no">
<div class="checkout_other">
<div class="jmbag" href="javascript:void(0);" onClick="changeVoucher(this);">
<span class="right_arrow_flow"></span>使用优惠券
<input type="hidden" name="coupon_id[{$v.pickup_id}]" readonly value=""/>
<span class="namespan" style="float: right; text-align: right; color:#333"></span>
</div>
<ul class="quanlistul" id="coupon_id_{$v.pickup_id}" style="display: none">
<li val="" onclick="setquansele(this)" name="不使用">
<span class="left">
<p class="num">不用使用</p>
</span>
<span class="right">
<img src="__STATIC__/images/flow/c_checkbox_off.png"/>
</span>
</li>
<foreach name="$v['couponList']" item="vv" key="k">
<li val="{$vv['CashRepNo']}" onclick="setquansele(this)" name="{$vv['Sum']}元优惠券" data-limit="{$vv.BuySum}">
<span class="left">
<p class="num">{$vv['Sum']}元</p>
<if condition="$vv['BuySum'] gt 0">
<p>订单满{$vv['BuySum']}元使用</p>
</if>
<p class="gray">使用期限 {$vv['BillDate']}至{$vv['ValidDate']}</p>
</span>
<span class="right">
<img src="__STATIC__/images/flow/c_checkbox_off.png"/>
</span>
</li>
</foreach>
</ul>
</div>
</li>
</if>
<li class="flow_youhui_no">
<switch name='v.expty'>
<case value="0">
<a onclick="setexptype(this,1)"><span class="c_checkbox_t c_checkbox_on"></span>门店自提</a> <a onclick="setexptype(this,0)"><span class="c_checkbox_t"></span>快递邮寄</a><input type="hidden" name="exparr[{$v.pickup_id}]" value="1"/>
</case>
<case value="1">
<span class="c_checkbox_t c_checkbox_on"></span>门店自提
<input type="hidden" name="exparr[{$v.pickup_id}]" value="1"/>
</case>
<case value="2">
<span class="c_checkbox_t c_checkbox_on"></span>快递邮寄
<input type="hidden" name="exparr[{$v.pickup_id}]" value="0"/>
</case>
</switch>
</li>
<!---当是自选或者物流的时候的时候--->
<li class="flow_youhui_no fexp <if condition='$v.expty eq 0 or $v.expty eq 1'>dn</if>">
<label>
选择物流:
<if condition="count($shippingList) eq 1">
<select onChange="ajax_order_price();" class="vam ou-no fwuliu" name="shipping_code[{$v.pickup_id}]">
<option value="{$shippingList[0][shipping_code]}">{$shippingList[0][shipping_name]}</option>
</select>
<else/>
<select onChange="ajax_order_price();" class="vam ou-no fwuliu" name="shipping_code[{$v.pickup_id}]">
<foreach name="shippingList" item="v4" key="k4">
<option value="{$v4.shipping_code}">{$v4.shipping_name}</option>
</foreach>
</select>
</if>
</label>
</li>
<!--<li class="flow_youhui_no">-->
<!--<label>给卖家留言:-->
<!--<input type="text" placeholder="给卖家留言" name="user_note[{$v.pickup_id}]"-->
<!--style="vertical-align:middle" class="txt1">-->
<!--</label>-->
<!--</li>-->
<!--<li class="flow_youhui_no">
合计<span class="price">¥<strong class="price_total" id="payables">0</strong></span>
<p class="clear"></p>
</li>-->
</ul>
</div>
</foreach>
<ul class="order-list-info" style="margin-top: 10px">
<li class="flow_youhui_no dn">
如果是会员<font color=red></font>,可以享受会员折扣价
</li>
<li class="flow_youhui_no" style="display: none">
<label>
使用积分:
<input id="pay_points" name="pay_points" type="text" placeholder="输入积分"
onpaste="this.value=this.value.replace(/[^\d]/g,'')"
onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" class="txt1"
style="width:100px;"/>
<input name="validate_bonus" type="button" value="使用" onClick="ajax_order_price();"
class="BonusButton"/>
您的可用积分<em>{$user['pay_points']}</em>
</label>
</li>
</ul>
</section>
<if condition="$u_money gt 0">
<section class="order-info">
<ul class="order-list-info" style="margin-top: 10px">
<li class="flow_youhui_no">
<label class="nav-list-sidenav" onclick="fuseryuer(this)">
<span class="c_checkbox_t"></span>使用余额:¥<font id="fumoney">{$u_money}</font>
<input type="hidden" name="user_money" id="user_money" value=""/>
</label>
</li>
</ul>
</section>
</if>
</section>
<section class="order-info dn">
<div class="order-list">
<div class="content ptop0">
<div class="panel panel-default info-box">
<div class="orderInfo ">
<h4 class="seller-name"><img src="__STATIC__/images/flow/dingdan.png" width="28"> 其他选项 </h4>
</div>
<table border=0 cellpadding=0 cellspacing=0 width="100%" class="checkgoods">
<tr>
<td colspan=4 class="tdother2" style="border-top:none;">
<div class="checkout_other">
<div class="jmbag" href="javascript:void(0);"
onClick="showCheckoutOther(this);"><span class="right_arrow_flow"></span>开发票和缺货处理
</div>
<div class="subbox_other" width="100%">
<table id='normal_invoice_tbody' width="100%">
<tr>
<td align=right style="vertical-align:top" width="84">发票抬头:</td>
<td colspan="2">
<input class="txt1" style='vertical-align:middle' type="text"
name="invoice_title" placeholder="XXX单位 或 XX个人"/>
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
<div style="height:10px; line-height:10px; clear:both;"></div>
</div>
</div>
</div>
</section>
<section class="order-info">
<div class="order-list">
<div class="content ptop0">
<div class="panel panel-default info-box">
<div class="con-ct fo-con">
<ul class="ct-list order_total_ul" id="ECS_ORDERTOTAL">
<!--<li class="order_total_li">-->
<!--*该订单完成后,您将获得 <span class="price">相应的</span> 积分<br/>-->
<!--</li>-->
<!--删除 20170525-->
<!--<li>
<div class="subtotal">
<span class="total-text">商品总额:</span><em
class="price">¥{$total_price.total_fee}</em><br/>
<span class="total-text">配送费用:</span>¥<em class="price" id="postFee">{$total_price.shipping_price}</em>元<br/>
<span class="total-text">使用优惠券:</span>- ¥ <em class="price"
id="couponFee">0</em><br/>-->
<!--<span class="total-text">使用余额:</span>- ¥ <em class="price"-->
<!--id="balance">0</em><br/>-->
<!--<span class="total-text">优惠活动:</span>- ¥ <em class="price"
id="order_prom_amount">0</em><br/>
<span class="total-text">应付金额:</span>¥<strong class="price_total" id="payables">0</strong>
<span class="total-text" style=""></span>
</div>
</li>-->
<li>商品总额
<span class="txt_right">¥<em class="price" id="goodsFee"></em></span>
<p class="clear"></p>
</li>
<li>配送费用
<span class="txt_right">¥<em class="price" id="postFee">{$total_price.shipping_price}</em></span>
<p class="clear"></p>
</li>
<li>使用优惠券
<span class="txt_right">- ¥ <em class="price" id="couponFee">0</em></span>
<p class="clear"></p>
</li>
<li>优惠活动
<span class="txt_right">- ¥ <em class="price"
id="order_prom_amount">0</em></span>
<p class="clear"></p>
</li>
<li>使用余额
<span class="txt_right">- ¥ <em class="price" id="balance">0</em></span>
<p class="clear"></p>
</li>
<li>使用积分
<span class="txt_right">- ¥ <em class="price" id="integral"></em></span>
<p class="clear"></p>
</li>
</ul>
</div>
<div class="confirm">
<span class="confirm_text">合计:
<span class="price">
¥<strong class="price_total" id="payables">0</strong>
</span>
</span>
<span id="fsub_btn" class="confirm_btn" onclick="submit_order()">提交订单</span>
<span id="fsubing" class="confirm_btn dn">提交中..</span>
</div>
<!--<div class="panel panel-default info-box">
<div class="pay-btn">
<input onClick="submit_order();" type="button" class="sub-btn btnRadius" value="提交订单"/>
</div>
</div>-->
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
</section>
</form>
<input id="back_ordno" value="" type="hidden">
</div>
<!--弹窗-->
<div id="layeraddr" class="layermbox layermbox0_1 dn">
<div class="laymshade"></div>
<div class="layermmain">
<div class="section">
<div class="layermchild layermanim">
<p class="addTit">选择收货地址</p>
<div class="closed" style="top:8px"></div>
<p class="clear"></p>
<div class="layermcont">
<!--------------添加编辑优惠券------------->
<ul id="popaddressmone" class="addressmone dn">
<form id="addrform">
<input id="popseleaddid" name="address_id" type="hidden" value=""/>
<li style="padding-top: 0;">
<span>收货人</span>
<input name="consignee" id="consignee" type="text" value="" maxlength="12" placeholder="收货人姓名"/>
</li>
<li>
<span>手机</span>
<input type="tel" name="mobile" value="" id="mobile"
onpaste="this.value=this.value.replace(/[^\d-]/g,'')"
onKeyUp="this.value=this.value.replace(/[^\d-]/g,'')" maxlength="15" placeholder="手机号码"/>
</li>
<li onclick="show_addsele()">
<span>所在地区</span>
<input type="text" value="" id="showaddrQ" readonly placeholder="所在地区"/>
<input name='country' value='1' type="hidden">
<input id='inp_province' name='province' value='' type="hidden">
<input id='inp_city' name='city' value='' type="hidden">
<input id='inp_district' name='district' value='' type="hidden">
<input id='inp_twon' name='twon' value='' type="hidden">
</li>
<li>
<span>详细地址</span>
<input type="text" name="address" id="address" placeholder="详细地址" maxlength="100" value="{$address.address}"/>
</li>
<li>
<span>邮政编码</span>
<input id="zipcode" type="tel" name="zipcode" value="{$address.zipcode}"
onpaste="this.value=this.value.replace(/[^\d]/g,'')"
onKeyUp="this.value=this.value.replace(/[^\d]/g,'')"
maxlength="10" placeholder="邮政编码"/>
</li>
<li id="addrdelli" style="text-align: center;" onclick="deladdr()">
<a class="delAdd">删除地址</a>
</li>
</form>
</ul>
<!--------------地址列表------------->
<div id="popadddiv">
<ul id="popaddlist" class="addList">
<foreach name="addlist" item="v">
<li aid="{$v.address_id}"
<eq name="$v.is_default" value="1">isel="1"</eq>
onclick='selectto(this)'>
<div class="address_add">
<h2>
<eq name="$v.is_default" value="1">
<img src="__STATIC__/images/right.png">
<else/>
<img src="__STATIC__/images/flow/c_checkbox_off.png">
</eq>
</h2>
<dl class='popdata'>
<dt><font class="popconsignee">{$v.consignee}</font>,手机:<font class="popmobile">{$v.mobile}</font>
</dt>
<dd>收货地址:<font class="popaddstr">{$v.addrstr} {$v.address}</font>
</dd>
</dl>
<img id="amend" onclick="editAddress(this,event)"
src="__STATIC__/images/amend.png"/>
</div>
</li>
</foreach>
</ul>
<div class="addmone" onclick="addaddr(0)">
<div class="jia"></div>
<span class="addTxt">新增收货地址</span>
<img src="__STATIC__/images/category/leftTip.png" class="shop_arrow"/>
<p class="clear"></p>
</div>
</div>
<!--------------优惠券使用------------->
<div id="popquanlist">
<ul id="popaddlistul" class="couponList" style=" max-height:200px;overflow: auto;"></ul>
</div>
<div id="addbtn" class="twoBtn dn">
<div class="btnRed" style="width: 100%;margin-top: 20px;" onclick="updateaddr()">确定</div>
<!--<div class="btnWhile">取消</div>-->
</div>
<div id="quanbtn" class="twoBtn dn">
<div class="btnRed" style="width: 100%;margin-top: 20px;" onclick="selequanbtn()">确定</div>
<!--<div class="btnWhile">取消</div>-->
</div>
</div>
</div>
</div>
</div>
</div>
<!--弹窗,电话注册-->
<div id="fzhuce" class="layermbox layermbox0_1" style="display: none">
<div class="laymshade"></div>
<div class="layermmain">
<div class="section">
<div class="layermchild layermanim" style="border-radius:0 ">
<p class="addTit" style="text-align:left; margin-left:10px ">手机绑定</p>
<span class="fu close" onclick="close_fzhuce()"></span>
<p class="clear"></p>
<div class="field phone">
<img class="phonePic" src="/template/mobile/new/static/images/user/tel.png">
<input id="b_mobile" maxlength="11" placeholder="手机号" class="c-form-txt-normal" type="tel"
style="color: #adadad">
<div class="tips">
<span id="mobile_phone_notice"></span>
</div>
</div>
<div class="yanzheng" style=" margin-top:0px;">
<div class="codeTxt">
<img class="yzmPic" src="/template/mobile/new/static/images/user/code.png">
<input id="checkno" maxlength="4" name="mobile_code" placeholder="验证码" type="tel"
style="color: #adadad">
</div>
<div class="codePhoto">
<input id="zphone" rel="mobile" value="发送验证码" onclick="sendcode(this)" class="zphone"
style=" color:#FFF;margin-right:5px" type="button">
</div>
</div>
<div id="btn_set" style="width: 100%;background:red; height: 40px; font-size: 16px; text-align: center;
line-height: 40px;color:#fff" onclick="save_mobile(this)">绑定并支付
</div>
</div>
</div>
</div>
</div>
<section class="f_mask" style="display: none;"></section>
<include file="public/footer"/>
<include file="public/addrsele"/>
<script type="text/javascript">
var getstoid = "<?php echo I('stoid')?>";
var exptype = "{$expty}";
var addtype = 0;
var popquanid = ""; //弹出层的券列表ID
var popseleedid = ""; //弹出层的券列表已经选择的id
var maxyuer = 0;
var money = 0;
var mobile = "{$user['mobile']}";
var erpvipid= "{$user['erpvipid']}";
var reg_mobile="";
<if condition="$killarr"> var killd='{$killarr}'; <else/>var killd=''; </if>
$(document).ready(function () {
if(erpvipid=="") mobile="";
ajax_order_price(); // 计算订单价钱
//获取输入焦点时
$(".addressmone input").focus(function () {
$(".addressmone li").css("border-color", "#eee");
$(this).parents("li").css("border-color", "#C4182E");
});
});
/*-----------选择优惠券弹出框-----------------*/
function changeVoucher(ob) {
/*--界面调整--*/
$("#layeraddr").removeClass("dn");
$("body").css("overflow", "hidden");
$(".addTit").text("选择优惠券");
$("#popadddiv").addClass("dn");
$(".addressmone").addClass("dn");
$("#addbtn").addClass("dn");
$("#popquanlist").removeClass("dn");
$("#quanbtn").removeClass("dn");
$(".subbox_other").removeClass("dn");
var obj = $(ob).parent().find(".quanlistul");
obj.find("li").each(function () {
if ($(this).attr('data-limit') > money){
$(this).remove();
}
});
popquanid = obj.attr("id");
popseleedid = obj.attr("obsele");
var htm = obj.html();
var num = 0;
obj.find("li").each(function () {
if ($(this).css("display") != "none") { num++;}
});
if (num == 0) {
htm = "<p style='width: 100%; margin:20px 0;'>暂无可选择的优惠券</p>";
}
$("#popaddlistul").html(htm);
}
/*-------选择动画-------*/
function setquansele(ob) {
$(ob).parent().find("li").each(function () {
$(this).find(".right").find("img").attr("src", "__STATIC__/images/flow/c_checkbox_off.png");
$(this).attr("msele", "0");
});
$(ob).find(".right").find("img").attr("src", "__STATIC__/images/right.png");
$(ob).attr("msele", "1");
}
/*-------选择券-------*/
function selequanbtn() {
var seleid = "";
var selename = "";
$("#popaddlistul").find("li").each(function () {
var msele = $(this).attr("msele");
if (msele == "1") {
seleid = $(this).attr("val");
selename = $(this).attr("name");
}
});
if (seleid == "") {
//layer.open({content: "请选择优惠券", time: 2});
//return;
}
//如果弹出层的选择id不为空
if (popseleedid != undefined) {
//如果弹出层的选择id不等于当前选择
if (seleid != popseleedid) {
$(".quanlistul").each(function () {
var id2 = $(this).attr('id');
//其他的优惠券列表
if (popquanid != id2) {
$(this).find("li").each(function () {
var val = $(this).attr("val");
//把它显示
if (val == popseleedid) {
$(this).show();
}
});
}
});
}
}
$(".quanlistul").each(function () {
var id2 = $(this).attr('id')
if (popquanid != id2) {
$(this).find("li").each(function () {
var val = $(this).attr("val");
//把它隐藏
if (val == seleid) {
$(this).hide();
}
});
}
});
$(".quanlistul").each(function () {
var id2 = $(this).attr('id')
if (popquanid == id2) {
$(this).attr("obsele", seleid);
$(this).parent().find(".jmbag").find("input").val(seleid);
$(this).parent().find(".jmbag").find(".namespan").text(selename);
$(this).html($("#popaddlistul").html());
}
});
$("#layeraddr").addClass("dn");
$("body").css("overflow", "auto");
ajax_order_price();
}
/*---表单初始化---*/
function forminit() {
$("#popseleaddid").val("");
$("#consignee").val("");
$("#mobile").val("");
$("#province").val("0");
$("#city").html("<option value='0'>请选择</option>");
$('#district').html("<option value='0'>请选择</option>");
$("#twon").css("display", "none");
$("#address").val("");
$("#zipcode").val("");
}
/*---订单应付对象---*/
var orderyglist = null;
/*----------------------------------------------------------------------------------*/
// 获取订单价格
function ajax_order_price() {
var mm = layer.open({
type: 2,
shadeClose: false
});
$.ajax({
type: "POST",
url: '/index.php?m=Mobile&c=giftuser&a=cart_gift2_nosub&act=order_price&stoid=' + getstoid + '&t=' + Math.random() + "&exptype=" + exptype,
data: $('#cart2_form').serialize(),
dataType: "json",
success: function (data) {
layer.close(mm);
if (data.status != 1) {
layer.open({
content: data.msg, time: 2
});
// 登录超时
if (data.status == -100)
location.href = "{:U('Mobile/User/login',array('stoid'=>$Think.request.stoid))}";
return false;
}
// console.log(data);
$("#postFee").text(data.result.postFee); // 物流费
$("#couponFee").text(data.result.couponFee); // 优惠券
$("#balance").text(data.result.balance); // 余额
$("#pointsFee").text(data.result.pointsFee); // 积分支付
$("#payables").text(data.result.payables); // 应付
$("#order_prom_amount").text(data.result.order_prom_amount); // 订单 优惠活动
$("#integral").text(data.result.pointsFee);//使用积分
$("#goodsFee").text(data.result.goodsFee); //商品总额
maxyuer = data.result.payables1; //应付,没余额的那一部分
money = data.result.goodsFee - data.result.order_prom_amount;
},
error: function () {
layer.open({
content: '网络异常',
time: 2
});
}
});
}
// 提交订单
var ajax_return_status = 1; // 标识ajax 请求是否已经回来 可以进行下一次请求
function submit_order() {
if (mobile == "") {
$("#fzhuce").fadeIn(3);
return;
}
$("#fsub_btn").fadeOut(3);
$("#fsubing").fadeIn(3);
var ordno = $("#back_ordno").val();
if ($.trim(ordno) != "") {
location.href = '/Mobile/Payment/getCode.html?orderno=' + data.result + '&stoid=' + getstoid;
return;
}
if (ajax_return_status == 0) {
return false;
}
ajax_return_status = 0;
//alert($('#cart2_form').serialize() + "&act=submit_order");
var ii = layer.open({
type: 2,
content: '提交中',
shadeClose: false
});
$.ajax({
type: "POST",
url: "{:U('Mobile/Giftuser/cart_gift2',array('stoid'=>$Think.request.stoid))}?"+$('#cart2_form').serialize() + "&act=submit_order&exptype="+exptype, //+tab,
data:{da:killd} , // 你的formid
dataType: "json",
success: function (data) {
layer.close(ii);
if (data.status != '1') {
/*--当价格有变化--*/
if (data.status == '-1004') {
var io = layer.open({
content: data.msg,
btn: ['确定购买', '取消购买'],
yes: function () {
var uurl = "/index.php?m=Mobile&c=cart&a=updatecart2&stoid=" + getstoid;
var mm = layer.open({type: 2, shadeClose: false});
$.ajax({
type: "POST",
url: uurl,
data: $('#cart2_form').serialize(), // 你的formid
dataType: "json",
success: function (data) {
if (data == 1) {
ajax_return_status = 1;
layer.close(io);
submit_order();
}
else {
layer.open({content: "购买失败!", time: 2}); //执行有误
setTimeout(function () {
location.href = "/index.php?m=Mobile&c=index&a=index&stoid=" + getstoid + "";
}, 2000);
}
}
,erro: function (data) {
layer.open({content: "购买失败!", time: 2}); //执行有误
setTimeout(function () {
location.href = "/index.php?m=Mobile&c=index&a=index&stoid=" + getstoid + "";
}, 2000);
}
});
}, no: function () {
location.href = "/index.php?m=Mobile&c=index&a=index&stoid=" + getstoid + "";
}
});
return false;
}
layer.open({content: data.msg, time: 2}); //执行有误
// 登录超时
if (data.status == -100)
location.href = "{:U('Mobile/User/login',array('stoid'=>$Think.request.stoid))}";
ajax_return_status = 1; // 上一次ajax 已经返回, 可以进行下一次 ajax请求
$("#fsub_btn").fadeIn(3);
$("#fsubing").fadeOut(3);
return false;
}
// console.log(data);
$("#postFee").text(data.result.postFee); // 物流费
$("#couponFee").text(data.result.couponFee); // 优惠券
$("#balance").text(data.result.balance); // 余额
$("#pointsFee").text(data.result.pointsFee); // 积分支付
$("#payables").text(data.result.payables); // 应付
$("#order_prom_amount").text(data.result.order_prom_amount); // 订单 优惠活动
$("#integral").text(data.result.pointsFee);//使用积分
//alert(data.payables);
if (data.payables == "0" || data.payables == 0) {
layer.open({
content: "支付成功",
time: 2
});
var sstate=$('input[name="state"]').val();
setTimeout(function () {
//location.href = "/Mobile/User/index/stoid/" + getstoid;
if(sstate==1){
location.href = "/mobile/Giftuser/to_send/stoid/" + getstoid+"/ordno/"+data.result;
}else{
location.href = "/mobile/payment/payment_success2/stoid/" + getstoid;
}
}, 1000)
} else {
layer.open({
content: "提交订单成功",
time: 2
});
$("#back_ordno").val(data.result);
setTimeout(function () {
location.href = '/Mobile/Payment/getCode.html?orderno=' + data.result + '&stoid=' + getstoid+"/is_gift/1";
}, 1000)
}
}
});
}
function fuseryuer(ob) {
if ($(ob).find(".c_checkbox_t").hasClass("c_checkbox_on")) {
$(ob).find(".c_checkbox_t").removeClass("c_checkbox_on");
$("#user_money").val("");
} else {
$(ob).find(".c_checkbox_t").addClass("c_checkbox_on");
$mon = $("#fumoney").text();
$("#user_money").val($mon);
}
ajax_order_price();
}
function close_fzhuce() { $("#fzhuce").fadeOut(3);}
/*--发送验证码--*/
var sendtag = true;
function sendcode(ob) {
if (!sendtag) return;
var txt = $(ob).val();
if (txt == "发送中..") {
return;
}
var mobile = $("#b_mobile").val();
if ($.trim(mobile) == "") {
layer.open({content: "请输入手机号", time: 2});
return;
}
$(ob).val("发送中..");
$(ob).addClass('grd');
var t1 = layer.open({shadeClose: false, type: 2, content: '加载中'});
$.ajax({
url: '/index.php?m=Home&c=Api&a=send_validate_code&t=' + Math.random(),
type: 'post',
dataType: 'json',
data: {stoid: '{$Request.param.stoid}', type: "mobile", send: mobile, scene: 1},
success: function (res) {
layer.close(t1);
if (res.status == 1) {
sendtag = false;
layer.open({content: res.msg, time: 1});
countdown(ob);
} else {
layer.open({content: res.msg, time: 1});
layer.close(t1);
}
}, error: function () {
layer.close(t1);
$(ob).val('发送验证码');
$(ob).addClass('red');
}
})
}
var wait = 60;
function countdown(obj, msg) {
obj = $(obj);
if (wait == 0) {
obj.removeAttr("disabled");
obj.val("发送验证码");
$(obj).removeClass('grd');
wait = 60;
sendtag = true;
} else {
if (msg == undefined || msg == null) {
msg = obj.val();
}
obj.attr("disabled", "disabled");
obj.val(wait + "秒后重新获取");
wait--;
setTimeout(function () {
countdown(obj, msg)
}, 1000)
}
}
/*--会员注册--*/
function save_mobile(ob) {
var txt = $(ob).text();
if (txt == "提交中..") {
return;
}
var mob0 = $("#b_mobile").val();
if ($.trim(mob0) == "") {
layer.open({content: "请输入手机号", time: 2});
return;
}
var code = $("#checkno").val();
if ($.trim(code) == "") {
layer.open({content: "验证码", time: 2});
return;
}
$(ob).text("提交中..")
var t1 = layer.open({shadeClose: false, type: 2, content: '加载中'});
$.ajax({
url: '/index.php?m=mobile&c=cart&a=reg_user&t=' + Math.random(),
type: 'post',
dataType: 'json',
data: {stoid: '{$Request.param.stoid}', mob: mob0, co: code},
success: function (res) {
layer.close(t1);
if (res.status == 1) {
mobile = mob0;
$("#fzhuce").fadeOut(3);
submit_order();
} else {
layer.open({content: res.msg, time: 2});
$(ob).text('确定');
}
}, error: function () {
layer.close(t1);
$(ob).text('确定');
}
})
}
//设置物流方式
function setexptype(ob,ind){
$(ob).parent().find('a').each(function () {
$(this).find('span').removeClass('c_checkbox_on');
});
$(ob).find('span').addClass('c_checkbox_on');
$(ob).parent().find('input').val(ind);
if(ind==1) {
$(ob).parent().parent().find('.fexp').addClass('dn');
}
else {
$(ob).parent().parent().find('.fexp').removeClass('dn');
}
var isshow=0
$('.kuorder_list .order-list').each(function (){
isshow=0;
if(!$(this).find('ul').find('.fexp').hasClass('dn')){
isshow=1; return false;
}
})
if(isshow==1){ $("#fexp").removeClass("dn"); exptype=2;} //物流
else { $("#fexp").addClass("dn");exptype=1;} //自提
ajax_order_price();
}
</script>
</body>
</html>
<script>
var payService={
'payBtn_click':function(obj){
var $this = this;
$("#payBtn").off('click');
$("#confirmPay").off('click');
$(".payClass").css('background-color', '#999999');
$("#confirmPay").css('background-color', '#999999');
if(wechat_common.check_wechat_version()){
$.post($("#paymentUrl").val(),$this.make_parameter(obj),function(result){
if(result.status=='ok'){
if (result.data.payType == 'weixinPay') {
if(obj.type=='NATIVE'){
nativePay(result.data.code_url);
}else{
wechat_common.wechat_pay_common(result.data, $this.successCallback, $this.errorCallback, $this.cancelCallback);
}
}else{
$this.successCallback(result.data);
}
}else if (result.status == 'notEnough') {
alert("非常抱歉,暂时库存不足");
}else if(result.status == 'deleted'){
alert("非常抱歉,该商品已下架");
}else{
if(result.data){
alert(result.data);
}else{
alert("server is busy");
}
}
});
}
},
make_parameter: function (obj) {
var parameter={
"sid":$("#sid").val(),
"productItemId":$("input[name='productItemId']").val(),
"message":$("input[name='message']").val(),
"personAmount":$("input[name='personAmount']").val(),
"perPersonAmount":$("input[name='perPersonAmount']").val(),
"ticketId":$("input[name='coupon']:checked").val(),
"phone":$("#phone").val(),
"type":obj.type,
"payType":$("#payType").val(),
"sceneId":$("#sceneId").val(),
"voicePath":$("#voicePath").val(),
"messageType":$("#messageType").val(),
"grouponId": $("input[name='grouponId']").val(),
"groupInfoCode": $("input[name='groupInfoCode']").val(),
"pangdouFlag":0
}
if($("input[name='pangdou']").is(":checked")){
parameter['pangdouFlag'] = 1;
}
return parameter;
},
successCallback: function (data) {
if(!payService.check_group_order()){
document.location.href = $("#rebackToCompletePageUrl").url_handle()+data.code+'/'+$("input[name='productItemId']").val()+"?orderCode="+data.orderCode;
}else{
document.location.href = $("#groupOrderPayCompleteUrl").url_handle() + data.code;
}
},
errorCallback: function () {
payService.payBtn_click({type:'NATIVE'});
},
cancelCallback: function () {
$("#payBtn").off('click').on('click', payCommon.payBtnChoose_click);
$("#confirmPay").off('click').on('click', payCommon.confirmPay_click);
$(".payClass").css('background-color', '#DA1C1C');
$("#confirmPay").css('background-color', '#DA1C1C');
},
check_group_order:function(){
var groupFlag = $("input[name='groupFlag']").val();
if(groupFlag){
return true;
}
return false;
}
}
$(function($) {
var appHeight = $(window).height()-$(".btn_b").outerHeight(true),minHeight;
minHeight = appHeight;
$(".layout").css({
"min-height" : minHeight
})
})
$("#payBtn").click(function() {
if(!phone_common.check_phone($('#phone'),function(){
$("#confirm_phone").attr("class","win");
})){
return;
}
payCommon.payBtnChoose_click();
});
//优惠券开启与关闭
$(function(){
ticket_service.init();
});
//关闭手机号不正确提示
$("#confirm_phone").on("click",".transparent_bg,.close",function(e){
$("#confirm_phone").attr("class","win_none");
/*$("#confirm_phone").children("dl").animate({
top:"-20rem"
},200);
$("#confirm_phone").fadeOut("400",function(){
$(this).attr("class","win_none");
$(this).removeAttr("style");
console.info($(this).children("dl").attr("style"))
$(this).children("dl").removeAttr("style");
});*/
});
//关闭支付
$("#win .transparent_bg,#win .close").on("click",function(e){
$("#win").children(".layout_win").animate({
bottom:"-31rem"
},400);
$("#win").fadeOut("4000",function(){
$(this).attr("class","win_none");
$(this).removeAttr("style");
$(this).children(".layout_win").removeAttr("style");
});
});
$(".explain").click(function(){
$(".instruction").fadeIn();
$(".instruction > div").animate({"top":"50%"});
});
$(".instruction").click(function(e){
var _con = $(this).children("div");
if(!_con.is(e.target) && _con.has(e.target).length === 0){
$(this).fadeOut();
$(".instruction > div").animate({
"top":"-50%"
},200);
}
});
$(".instruction .btn").click(function(e){
$(".instruction").fadeOut();
$(".instruction > div").animate({"top":"-50%"});
});
</script>