teamshow.html
34.6 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
<!DOCTYPE html>
<script type="text/javascript" src="__PUBLIC__/js/rem_new.js"></script>
<html style="height: 667px;">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>{$pdact.title}-{$tpshop_config.shop_info_store_title}</title>
<meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}"/>
<meta name="description" content="{$tpshop_config['shop_info_store_desc']}"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/css/public.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/teamstyle/css/mui.min.css?v=__CSSVERSION__">
<link rel="stylesheet" type="text/css" href="__STATIC__/teamstyle/css/main.css?v=__CSSVERSION__">
<!--<script src="__STATIC__/teamstyle/js/mui.js" type="text/javascript" charset="utf-8"></script>-->
<script src="__STATIC__/teamstyle/js/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="__STATIC__/teamstyle/js/layer/layer.js" type="text/javascript"></script>
<link rel="stylesheet" href="__STATIC__/teamstyle/js/layer/skin/layer.css" id="layui_layer_skinlayercss">
<script src="__STATIC__/teamstyle/js/layer/extend/layer.ext.js" type="text/javascript"></script>
<link rel="stylesheet" href="__STATIC__/teamstyle/js/layer/skin/layer.ext.css" id="layui_layer_skinlayerextcss">
<link type="text/css" rel="stylesheet" href="__STATIC__/teamstyle/js/layer1.8.5/skin/layer.css" id="skinlayercss">
<script src="__STATIC__/teamstyle/js/xmsz_common.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/js/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/global.js?v=__CSSVERSION__"></script>
<script type="text/javascript" src="__PUBLIC__/js/mobile_common.js?v=__CSSVERSION__"></script>
<script type="text/javascript" src="__PUBLIC__/js/goodsInfoScroll3.js?v=__CSSVERSION__"></script>
<style>
.sto_item { height: 35px;line-height: 35px;margin: 0 10px;border-bottom: 1px solid gainsboro;color: #0a0a0a }
.dn { display: none; }
#addr_catlist, #pickuplist { max-height: 200px; overflow: auto; }
.bgdiv {
position: fixed; top: 0;
left: 0; width: 100%; height: 100%;
background-color: rgba(0, 0, 0, 0.5); z-index: 9999
}
.mui-btn-grey {
background: grey;
border: 1px solid grey;
color:#333
}
.fx-cdlist{
margin-top: 1.3rem;
}
.position{
width: 0.15rem;
height: 0.15rem;
border-top: 1px solid #7d7d7d;
border-left: 1px solid #7d7d7d;
background: none;
content: '\20';
display: block;
-webkit-transform: rotate(45deg);
margin-left: 0.1rem;
margin-top: 0.08rem;
}
.add{
margin-top: 0.2rem;
}
.remove{
margin-top: 0.05rem;
}
.rmb{
font-size: 0.18rem; height:0.25rem;margin-right:0.02rem;margin-left:0.07rem;
}
.buy-cp .cp-img{ margin-top: 0; }
.mui-card-link{margin-top: 0}
.mui-card-link.ui-nyf{margin-top: 10px}
.buy-nyf-close{position: absolute; right: 0.1rem;top:0.11rem}
.buy-cp.nyf{border-bottom: none;}
.mui-card-link .price-int.ui-nyf {
margin-left: 0.03rem;font-size: 0.38rem;
}
.buy-cpt.ui-goods-name-n{ font-size: 0.32rem; width: 3.6rem; margin-top: 0.08rem; line-height: 0.4rem}
</style>
</head>
<body class="mui-ios mui-ios-9 mui-ios-9-1" style="height: 667px;">
<include file="public/navBall"/>
<script src="__STATIC__/teamstyle/js/lefttime.js" type="text/javascript"></script>
<style type="text/css">
.mores-list {
padding: 0;
}
.bq-box {
margin-bottom: 20px;
padding-bottom: 20px;
}
</style>
<div class="page-box">
<!--组团成功加 ptcg-zk 失败加ptsb-zk-->
<dl class="fx-cpbox clearfix">
<dt>
<a href="/index.php/mobile/goods/goodsInfo/stoid/{$Think.request.stoid}/id/{$gd.goods_id}"><img
src="{:getImg($gd.original_img,NOIMG)}"></a>
</dt>
<dd>
<h3 class="ellipsis-2" style="height: 1rem;line-height: 0.4rem;">{$gd.goods_name}</h3>
<div class="mui-card-link flex">
<div style="margin-top: 0.15rem">
<if condition="pdact.kttype eq 3">
<span class="price-int"><span class="rmb">¥</span>{$curpice}</span>
<else/>
<span class="price-int"><span class="rmb">¥</span>{$pdact.price}</span>
</if>
<p class="price-ori word-line" style="width: 2.0rem;">零售价¥{$gd.market_price}</p>
</div>
<div class="xc-right fr fs24">
<div class="flex xc-valframe ">
<div>
<div style="width: 97%; color: #e22b44">已拼{$pdact.buy_num}份
</div>
<div class="flex" style="align-items: center">
<div class="xc-frame-img flex jc_center ai_center">
<img class="picture" src="__STATIC__/images/weixin/w_logo.png"></img>
</div>
<div class="xc-people-val flex ai_center" style=" height: 0.25rem; padding-top: 0.19rem; padding-bottom: 0.13rem">{$pdact.ct_num}人拼</div>
</div>
</div>
</div>
</div>
</div>
</dd>
</dl>
<div class="ladder-box1 clearfix">
<p class="fx-ts1">
<if condition="$pdact.kttype eq 3">
还差<span>{$max_num-$num}</span>人享受最优价,组团成功为您节省<span>{$gd.market_price-$curpice}</span>元
<else/>
还差<span>{$pdact.ct_num-$num}</span>人成团,组团成功为您节省<span>{$gd.market_price-$pdact.price}</span>元
</if>
</p>
<div class="abs fail-img">
<if condition="$tgr.state eq 1">
<img src="__STATIC__/images/weixin/xc-qtshibai.png">
<elseif condition="$is_succ"/>
<img src="__STATIC__/images/weixin/xc_qtcg.png">
</if>
</div>
<div class="ladder-box1 clearfix">
<!--参与显示-->
<ul class="fx-cttx">
<foreach name="pp" item="v">
<li>
<img src="{$v['head_pic']|default='__STATIC__/teamstyle/img/txbg.png'}"
style="width: 0.78rem;height: auto">
<if condition="$v['is_pt_tz'] eq 1"><span>团长</span></if>
</li>
</foreach>
<for start="0" end="$sf_num">
<li>
<img src="__STATIC__/images/weixin/safa.png" style="width: 0.78rem;height: auto">
</li>
</for>
<if condition="count($ptedlist) gt 5">
<li>
<div style="width: 0.5rem;height: auto">
<img src="__STATIC__/images/weixin/ellipsis.png">
</div>
</li>
</if>
</ul>
<!-- 许程 8.17 <p class="fx-ts2">参团支付成功后,如果人数不足,系统会自动退款</p>-->
<div class="fx-box2">
<div class="group-tit">
<if condition="$tgr.state eq 2">
<span>剩余<em
id="leftTimeJx645"><label>0</label>:<label>0</label>:<label>0</label>:<label>0</label></em>结束</span>
<script>onload_leftTime_jx(645, {$timedif}, "label", "");</script>
</if>
</div>
</div>
<if condition="$needtime gt 0">
<p id="fhuiyuan_d" style="margin:0 10px; text-align: center">会员"<font id='fusername'>{$needtime_nickname}</font>"待付款,若<span
id="fneedtime"></span>后该会员未支付您可继续参团哦!</p>
<script>
var ttt = "{$needtime}";
var tt_id = "{$needtime_id}";
$(function () {
$("#fneedtime_inp").val(ttt);
$("#fneedtime_ordid").val(tt_id);
clock1122({$needtime});
$(".xc-invitation.buy_team").addClass("mui-btn-grey");
});
</script>
<input type="hidden" id="fneedtime_inp"/>
<input type="hidden" id="fneedtime_ordid"/>
</if>
<div class="fr t_c xc-onclik" >
点击下方按钮分享给小伙伴,可快速成团!
<if condition="1 eq 2">
<!– 拼团成功后 支付尾款 阶梯团支付尾款–>
<text style="color:#16ba63">拼团成功,规定时间内支付尾款即发货</text>
</if>
<div class="buttem-frame fc">
<if condition="$tgr.state eq 1 or $is_succ">
<if condition="$tgr.team_type neq 1">
<div class="xc-invitation t_c xc-goods buy_team" ty="1" issubscribe="{$issubscribe}" teamty="{$tgr.team_type}" style="color: #fff">去开团</div>
<else/>
<div class="xc-invitation t_c xc-goods buy_team" ty="1" issubscribe="{$issubscribe}" teamty="{$tgr.team_type}" style="color: #fff">去参团</div>
</if>
<else/>
<div class="xc-invitation t_c xc-goods buy_team" ty="0" issubscribe="{$issubscribe}" teamty="{$tgr.team_type}" style="color: #fff">去参团</div>
</if>
<div class="xc-home-page t_c">返回首页</div>
</div>
</if>
<!--阶梯团成功 支付尾款-->
<if condition="2 eq 1">
<span>剩余支付时间:<em id="leftTimeJx645"><label>0</label>时<label>0</label>分<label>0</label>秒<label>0</label></em></span>
<script>onload_leftTime_jx(645,{$timedif},"label","");</script>
</if>
</if>
</div>
</div>
<script>
var daysms = 24 * 60 * 60;
var hoursms = 60 * 60;
var Secondms = 60;
var microsecond = 1;
var DifferHour = -1;
var DifferMinute = -1;
var DifferSecond = -1;
function clock1122(key) {
var convertHour = DifferHour
var convertMinute = DifferMinute
var convertSecond = DifferSecond
key--;
if (key <= 0) {
var oid = $("#fneedtime_ordid").val();
$.ajax({
type: "GET",
url: "/index.php?m=Mobile&c=team&a=clearOrder&stoid={$Think.request.stoid}&id=" + oid,
success: function (data) {
switch (data.code) {
case 1:
$("#fhuiyuan_d").hide();
$("#fneedtime_inp").val(0);
$(".xc-invitation.buy_team").removeClass("mui-btn-grey");
break;
case 2:
$("#fneedtime_inp").val(data.needtime);
$("#fneedtime_ordid").val(data.needtime_id);
$("#fusername").text(data.nickname);
clock1122(data.needtime);
break;
case 3:
//刷新界面
layer.open({content: data.msg, time: 1});
setTimeout(function () {
window.location.href = window.location.href;
}, 1000);
break;
}
}
});
} else {
Diffms = key;
DifferHour = Math.floor(Diffms / daysms)
Diffms -= DifferHour * daysms
DifferMinute = Math.floor(Diffms / hoursms)
Diffms -= DifferMinute * hoursms
DifferSecond = Math.floor(Diffms / Secondms)
Diffms -= DifferSecond * Secondms
var dSecs = Math.floor(Diffms / microsecond)
if (convertHour != DifferHour) e = "<i>" + DifferHour + "</i>天";
if (convertMinute != DifferMinute) f = "<i>" + DifferMinute + "</i>时";
if (convertSecond != DifferSecond) g = "<i>" + DifferSecond + "</i>分";
h = "<i>" + dSecs + "</i>秒";
if (DifferHour > 0) {
e = e;
}
else {
e = '';
}
document.getElementById("fneedtime").innerHTML = e + f + g + h;
setTimeout(function () {
clock1122(key)
}, 1000);
}
}
</script>
<!--此团情况列表-->
<div class="fx-cdlist">
<div class="explain-txt" id="explain-txt2">
<div class="explain-open flex jc_center ai_center" id="explain-open2">
<span class="flex"></span>
<p class="after remove" id="drop_down"></p>
</div>
<div class="detail rel">
<ul>
<foreach name="ptedlist" item="v">
<li class="rel">
<img src="{$v['head_pic']|default='__STATIC__/teamstyle/img/txbg.png'}">
<span>{$v.nickname}</span>
<span class="xc-kaituan abs t_c fc" style="font-size: 0.17rem;color: #fff">团长</span>
<if condition="$v['is_pt_tz'] eq 1"><span class="time">{$v.pt_pay_time|date='Y-m-d H:i:s',###}开团</span>
<else/>
<span class="time">{$v.pt_pay_time|date='Y-m-d H:i:s',###} 参团</span>
</if>
</li>
</foreach>
</ul>
</div>
</div>
</div>
<!-- 大家都在团 -->
<if condition="$as_ptedlist">
<div class='goodslisttop'>
<div class="flex jc_center ai_center rel xc-linellae-frame">
<div class="xc-linellae" style="border-bottom:0.01rem solid #a5a5a5;"></div>
<div class="abs flex jc_center ai_center xc-recommend-frame ">
<img class=" xc-recommend" src="__STATIC__/images/weixin/zs.png">
</img>
<div class="xc-recommend-word">大家都在团</div>
</div>
</div>
<div class='goodslisttopright'></div>
</div>
<div class="changxin" style="padding-top: 0.15rem;margin-top: -0.05rem;">
<foreach name="as_ptedlist" item="v">
<div class='onegoods' onclick="go_goods(this)" gid="{$v.goods_id}">
<div class='onegoodsimg ny'>
<img class='onegoodsimg ny'src="{:getImg($v.original_img,NOIMG)}">
</div>
<div class="xc-buttmo-frame">
<div class='onegoodsdesc '>
<div class='price flex ai_center jc_sb'>
<div class='jgleft flex ai_center '>
<text class="xc-ping xc-wc flex ai_center jc_center">拼</text>
<text class="rmb">¥</text>
<p class="fc fs023"style="margin-top: 0.04rem;">{$v.price}</p>
</div>
<div class='jgright'>{$v.buy_num}<span>人参团</span>
</div>
</div>
</div>
<div class="xc-shuoming ellipsis-2 fs020" style="line-height: 0.33rem">{$v.title}</div>
</div>
</div>
</foreach>
</div>
</if>
</div>
</div>
<Input type="hidden" id="hidstoid" value="{$Think.request.stoid}">
<Input type="hidden" id="fstore_limit" value="{$limit_num}">
<Input type="hidden" id="prom_num" value="{$prom_num}">
<Input type="hidden" id="prom_onlybuy" value="{$onlybuy}">
<Input type="hidden" id="prom_qigou" value="{$pdact.minbuynum}">
<!--session存储位置信息-->
<Input type="hidden" id="ulx" value="{:session('ulx'.session('user')['user_id'])}">
<Input type="hidden" id="uly" value="{:session('uly'.session('user')['user_id'])}">
<!-- 是否默认门店 -->
<if condition="$de_pick">
<Input type="hidden" id="is_def" value="1">
<Input type="hidden" id="def_pick" value="{$de_pick.pickup_id}">
<Input type="hidden" id="def_pick_name" value="{$de_pick.pickup_name}">
</if>
<!--<script src="__STATIC__/teamstyle/js/layer1.8.5/layer.min.js"></script>-->
<script src="__STATIC__/teamstyle/js/html2canvas.min.js" type="text/javascript"></script>
<script type="text/javascript">
$("#explain-txt2").click(function(){
var datas=$("#explain-txt2").attr("data");
if(datas==1){
var datas=$("#explain-txt2").attr("data","2");
$("#drop_down").addClass("position add");
$("#drop_down").removeClass("after remove");
}else {
$("#drop_down").removeClass("position add");
$("#drop_down").addClass("after remove");
$("#explain-txt2").attr("data","1");
}
});
</script>
<!-----购买的弹出框----->
<div class="bz_view hide">
<!---参团,和开团--->
<div id="buyparm">
<div class="buy-option">
<div class="buy-nyf-close" onclick="closebuypop()">⊗</div>
<div class="buy-cp nyf clearfix">
<img src="{:getImg($gd.original_img,NOIMG)}" class="cp-img">
<div class="buy-cpt">
<div class="mui-card-link nyf">
<span class="u-nyf">¥</span><if condition="$pdact['kttype'] eq 3"><span class="price-int price-sku ui-nyf">{$pdact['yf_price']}</span><else/> <span class="price-int price-sku ui-nyf">{$pdact.price}</span></if>
</div>
</div>
<div class="buy-cpt ui-goods-name-n ellipsis-2 ">{$gd.goods_name}</div>
</div>
<div class="buy-auto"></div>
<!---选择门店--->
<div id="store_click" class="buy-sl">
<span>取货门店(<font id="fselestore">请选择门店</font>)</span>
</div>
<div id="selecat" class="buy-sl dn">
<span>< 选择门店</span>
<div style="height: 1px; background: gainsboro;"></div>
<div id="addr_catlist"></div>
</div>
<div id="selepick" class="buy-sl dn">
<span>< <font id="fcat_name"></font></span>
<div style="height: 1px; background: gainsboro;"></div>
<div id="pickuplist"></div>
</div>
<!---选择数量--->
<div class="buy-sl shu-liang">
<span style="position: relative;top:-5px">数量</span>
<div class="mui-numbox" data-numbox-min="1" data-numbox-max="172">
<button class="mui-btn mui-btn-numbox-minus" type="button" onclick="goods_cut()">-</button>
<input id="ffgoods_num" class="mui-input-numbox" type="tel" value="1">
<button class="mui-btn mui-btn-numbox-plus" type="button" onclick="goods_add()">+</button>
</div>
</div>
<div class="buy-btn">
<if condition="$onlybuy gt 0 && $gd.store_count gt 0">
<if condition="$pdact['kttype'] eq 3">
<button teamid="{$Think.request.teamid}" qh="{$Think.request.qh}" b_ty="dj" type="button"
class="mui-btn mui-btn-danger ajax_cart">支付定金
</button>
<else/>
<button teamid="{$Think.request.teamid}" qh="{$Think.request.qh}" b_ty="tprice"
type="button" class="mui-btn mui-btn-danger ajax_cart">立即支付
</button>
</if>
<else/>
<button type="button" class="mui-btn mui-btn-danger">已拼完</button>
</if>
</div>
</div>
</div>
</div>
<script>
<!-- 分享相关 -->
var stoid = '{$Think.request.stoid}';
//关闭遮罩
function closezhe(ob) {
$(ob).addClass('hide');
}
//选择的商品ID
var selectid = "<?php echo $gd['goods_id']?>";
//选择的自提点ID
var selectpid = "";
var selectnum = 1;
var selectpiccount = -1;
var store_count = {$gd.store_count};
//选择规格返回不同的图片和规格
var goods_id = "{$gd['goods_id']}";
var id = goods_id;
var teamid = '{$Think.request.teamid}';
var team_qh = '{$Think.request.qh}';
var distr_type = "{$gd['distr_type']}";
var prom_num = $("#prom_num").val();
var prom_onlybuynum = $("#prom_onlybuy").val();
var store_limit = $("#fstore_limit").val();
var is_pt_ty = '{$pdact.kttype}';
</script>
<!----参团规则的弹出框---->
<div class="ptjj-txt show-rule-content" style="display: none;">
<div class="detail">
<div class="ptjj-tt">
<span class="close_note"><img src="__STATIC__/teamstyle/img/gb.png"></span>
</div>
<p>1)用户选择好所要拼团的商品,进入开团页面,支付定金开团成功</p>
<p>2)开团成功后,团的有效期为24小时,请及时把拼团分享页面分享给好友或朋友圈</p>
<p>3)例如本团5人一个阶梯(价格为50元),10人一个阶梯(价格为:40元),24小时过后此团只有4个参团表示些拼团失败,系统退定金</p>
<p>4)24小时过后此团的参团人数为6人表示此团参团成功,(请在24小时内补齐尾款),如果这6个人有2个没有支付尾款,商家会以50元的价格出售该商品,别外2个人不补齐尾款的话,商家有权退或不退定金</p>
</div>
</div>
<div class="ptjj-txt show-note-content" style="display: none;">
<div class="detail">
<div class="ptjj-tt">
<span class="close_note"><img src="__STATIC__/teamstyle/img/gb.png"></span>
</div>
<p>
<span>1.开团:</span>选择心仪商品,点击“发起X人团”按钮,付款后即为开团成功;
</p>
<p>
<span>2.参团:</span>进入朋友分享的页面,点击“立即参团”按钮,付款后即为参团成功,若多人同时支付,支付成功时间较早的人获得参团资格;
</p>
<p>
<span>3.成团:</span>在开团或参团成功后,点击“邀请小伙伴参团”将页面分享给好友,在有效时间内凑齐人数即为成团,此时商家会开始发货;
</p>
<p>
<span>4.组团失败:</span>在有效时间内未凑齐人数,即为组团失败,此时付款项会原路退回到支付账户;
</p>
<p>
5.组团有效期间内,拼购商品订单不允许取消。
</p>
</div>
</div>
<script>
//页面开始渲染要开始读取门店信息
var isapple = false;
//定位有关
var list = '';
var ii0 = 0;
function ismobile(test) {
var u = navigator.userAgent, app = navigator.appVersion;
if (/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))) {
if (window.location.href.indexOf("?mobile") < 0) {
try {
if (/iPhone|mac|iPod|iPad/i.test(navigator.userAgent)) {
return '0';
} else {
return '1';
}
} catch (e) {
}
}
} else if (u.indexOf('iPad') > -1) {
return '0';
} else {
return '1';
}
};
if (ismobile(1) == "0") {
isapple = true;
}
$(document).ready(function () {
$(".show_note").click(function () {
$(".show-note-content").show();
});
$(".fx-afxa").click(function () {
$(".show-rule-content").show();
});
$(".close_note").click(function () {
$(".ptjj-txt,.ptjj-txt-rule").hide();
});
if (!isapple) {
ii0 = layer.open({type: 2, shadeClose: false});
/*--位置用session记录--*/
if (issortsto == 1) {
var ulx = $("#ulx").val();
var uly = $("#uly").val();
if (ulx != "" && uly != "") {
mapshow(ulx, uly);
} else {
getCurLocation();
}
} else {
mapshow(0, 0);
}
}
$.ajax({
type: "GET",
url: "/index.php?m=Mobile&c=team&a=every_body_team&stoid=" + stoid,
success: function (data) {
$(".mores-list").html(data);
}
});
});
</script>
<script src="__STATIC__/teamstyle/js/main.js" type="text/javascript"></script>
<!---判断用户是否关注了公众号--->
<div id="subscribe" class="pop-gz hide">
<div class="pop-gznr">
<a href="javascript:;" class="pop-gbbtn">关闭</a>
<h2>扫描或长按图中的二维码</h2>
<p>为了接收发货通知,购买前需先关注</p>
<div class="rwm-box">
<img src="{$share_wximg}">
</div>
<p>或请回到微信首页搜索关注{$tpshop_config.shop_info_store_title}</p>
</div>
</div>
<input id="tuantype" type="hidden" value="{$pdact['kttype']}"/>
<script>
//起购默认值
$(function () {
$("#ffgoods_num").val($("#prom_qigou").val());
});
$(".pop-gbbtn").on("click", function () {
$(".pop-gz").addClass("hide");
});
/*-----------------定位相关------------------*/
var issortsto = "{$is_sort_storage}";
//获取经纬度
function getCurLocation() {
navigator.geolocation.getCurrentPosition( // 该函数有如下三个参数
function (pos) { // 如果成果则执行该回调函数
var x = pos.coords.longitude;
var y = pos.coords.latitude;
mapshow(x, y);
}, function (err) { // 如果失败则执行该回调函数
//layer.open({content:'定位失败',time:2});
mapshow(0, 0);
}, { // 附带参数
enableHighAccuracy: false, // 提高精度(耗费资源)
timeout: 5000, // 超过timeout则调用失败的回调函数
maximumAge: 1000 // 获取到的地理信息的有效期,超过有效期则重新获取一次位置信息
}
);
}
var isapple = false;
if (ismobile(1) == "0") {
isapple = true;
}
/*--显示门店--*/
function mapshow(x, y) {
var is_def=$("#is_def").val();
/*---新增20171016,获取门店---*/
$.ajax({
type: "GET",
url: "/index.php?m=Mobile&c=activity&a=getStorageList&stoid=" + stoid + "&goodsid=" + id + "&lx=" + x + "&ly=" + y + "&distr_type=" + distr_type,//+tab,
success: function (data) {
layer.close(ii0);
if (data.code == 1) {
if (data.type == 1) {
list = data.mini;
var htm = "";
var len = 0;
for (var i in list) {
len++;
htm += "<p class='sto_item' onclick='setpickup(this)' distri_t='" + list[i]['distr_type'] + "' pid='" + list[i]['pickup_id'] + "'>" + list[i]['pickup_name'] + "</p>";
}
$("#addr_catlist").html(htm);
if(is_def){
$("#fselestore").text($("#def_pick_name").val());
selectpid = $("#def_pick").val();
}
if ((issortsto == 1 && (x != 0 || y != 0)) || len == 1) {
if(!is_def) {
var ele = list[0];
$("#fselestore").text(ele.pickup_name);
selectpid = ele.pickup_id;
}
}
} else {
list = data.sto_data;
var htm = "";
for (var i in list) {
htm += "<p class='sto_item' sid='" + list[i].cat_id + "'>" + list[i].cat_name + "</p>";
}
$("#addr_catlist").html(htm);
if(is_def){
$("#fselestore").text($("#def_pick_name").val());
selectpid = $("#def_pick").val();
}
/*---最小值拿出来---*/
if (x != 0 || y != 0) {
if (issortsto == 1 && !is_def) {
var ele = data.min;
$("#fselestore").text(ele.pickup_name);
selectpid = ele.pickup_id;
}
}
}
/*--选择线下门店--*/
$("#addr_catlist p").click(function () {
var id = parseInt($(this).attr("sid"));
var htm = "";
/*----判断是否采用了线下库存----*/
if (data.is_bline == 0) {
var ary;
for (var i in list) {
if (list[i]["cat_id"] == id) {
ary = list[i];
break;
}
}
var cary = ary["list"];
for (var i = 0; i < cary.length; i++) {
if (cary[i]['count'] != undefined && cary[i]['count'] != null && cary[i]['count'] != "") {
htm += "";
} else {
htm += "<p class='sto_item' onclick='setpickup(this)' distri_t='" + cary[i]['distr_type'] + "' pid='" + cary[i]['pickup_id'] + "'>" + cary[i]['pickup_name'] + "</p>";
}
}
}
$("#fcat_name").text(ary['cat_name']);
$("#pickuplist").html(htm);
$("#ffgoods_num").val("1");
$("#selepick").removeClass("dn");
$("#selecat").addClass("dn");
$("#store_click").addClass("dn");
$("#ffgoods_num").val($("#prom_qigou").val());
});
}
else {
$("#nokill").text('未找到门店');
$("#nokill").show();
$("#normal").hide();
}
}
});
}
//关闭购买弹出框
function closebuypop() {
$(".bz_view").addClass('hide');
}
$("#hidstoid").val(stoid);
function go_goods(ob) {
var gid=$(ob).attr("gid");
window.location.href="/Mobile/Goods/goodsInfo/stoid/{:I('stoid')}/id/"+gid;
}
</script>
</body>
</html>
<!-- 微信浏览器 调用微信 分享js-->
<include file="public/wx_share"/>