group_list.html
6.03 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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<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']}" />
<meta name="viewport" content="minimal-ui=yes,width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"><meta name="format-detection" content="telephone=no" />
<meta name="format-detection" content="email=no" />
<meta name="format-detection" content="address=no;">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link rel="stylesheet" type="text/css" href="__STATIC__/css/public.css"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/css/group_buy.css"/>
<script type="text/javascript" src="__STATIC__/js/jquery.js"></script>
<script type="text/javascript" src="__STATIC__/js/layer.js" ></script>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/mobile_common.js"></script>
<script >
var Tday = new Array();
var daysms = 24 * 60 * 60 * 1000
var hoursms = 60 * 60 * 1000
var Secondms = 60 * 1000
var microsecond = 1000
var DifferHour = -1
var DifferMinute = -1
var DifferSecond = -1
function clock11(key)
{
var time = new Date()
var hour = time.getHours()
var minute = time.getMinutes()
var second = time.getSeconds()
var timevalue = ""+((hour > 12) ? hour-12:hour)
timevalue +=((minute < 10) ? ":0":":")+minute
timevalue +=((second < 10) ? ":0":":")+second
timevalue +=((hour >12 ) ? " PM":" AM")
var convertHour = DifferHour
var convertMinute = DifferMinute
var convertSecond = DifferSecond
var Diffms = Tday[key].getTime() - time.getTime()
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="<span class=hour>"+DifferHour+"</span>天";
if(convertMinute != DifferMinute) f="<span class=min>"+DifferMinute+"</span>时";
if(convertSecond != DifferSecond) g="<span class=sec>"+DifferSecond+"</span>分";
h="<span class=msec>"+dSecs+"</span>秒";
if (DifferHour>0) {e=e}
else {e=''}
document.getElementById("jstimerBox"+key).innerHTML = e + f + g + h;
}
</script>
<style>
.dn{ display: none;}
.btnRed{ width: 60px; height: 30px; line-height: 30px; background:#C4182E; float: right; border-radius: 5px;
margin-top: 20px; text-align: center; color: #fff}
</style>
</head>
<body style="background:#FFF;">
<include file="public/menu"/>
<include file="public/navBall" />
<!--<h3 class="sg_box_tit">今日团购</h3>-->
<ul class="product_list" id="good_list">
<empty name="list">
<div class="nogoods ">
<img src="__STATIC__/images/v-shop/n3.png" />
<p>暂无团购信息</p>
</div>
<else/>
<foreach name="list" item="v" key="k" >
<li>
<a class="url" href="{:U('Activity/group',array('stoid'=>$Think.request.stoid,'id'=>$v[goods_id]))}">
<img src="{:getimg($v['original_img'],NOIMG,0,1)}"></a>
<a href="{:U('Activity/group',array('stoid'=>$Think.request.stoid,'id'=>$v[goods_id]))}" class="info_wrap">
<div class="fn good">{$v.title}</div>
<div class="price_wrap">
<i class="discount" style="display:;">{$v[rebate]}折</i> <span class="price" style="display:;">¥{$v[price]}</span> <del class="old_price" style="display:;">¥{$v[market_price]}</del>
</div>
<div class="bottom_info">
<span class="remain_num" style="display:;">已售{$v[buy_num] + $v[virtual_num]}件</span>
<span class="sg_g_time last_g_time" id="jstimerBox{$v[goods_id]}"></span>
</div>
<if condition="$v.goods_num gt $v.buy_num && get_list_ren($v.id,$v.store_id,1) gt 0">
<div class="btnRed">去团购</div>
<else/>
<div class="btnRed" style="background: gainsboro; color: #888;">已购完</div>
</if>
</a>
</li>
<script>
Tday['{$v[goods_id]}'] = new Date('{$v.end_time|date="Y/m/d H:i:s",###}');
window.setInterval(function()
{clock11('{$v[goods_id]}');}, 1000);
</script>
</foreach>
</empty>
</ul>
<script>
$(function () {
var gotop=$(".gotop");
$(window).scroll(function () {
($(window).scrollTop() > 100) ? gotop.show(500) : gotop.hide(100);
});
})
function goTop() {
$('html,body').animate({ 'scrollTop': 0 }, 600);
}
</script>
<a href="javascript:goTop();" class="gotop" style="display: none" ><img src="__STATIC__/images/topup.png"></a>
<!--<include file="public/footer"/>-->
<div class="gmore dn" style=" margin-top:20px;text-align:center; width: 100%">
<img src='__STATIC__/images/category/loader.gif' width="12" height="12"> </div>
<include file="public/footer_nav"/>
</body>
<script>
var stoid="{$Think.request.stoid}";
var IsLoading = true; //是否加载数据
var ishow="{$mshow}";
if(ishow=="0"){
IsLoading=false;
}
var page = 1;
/*** ajax 提交表单 查询订单列表结果 不删除*/
function ajax_sourch_submit() {
page++;
$.ajax({
type: "GET",
url: "/index.php?m=Mobile&c=Activity&a=group_list&p=" + page + "&stoid=" + stoid + "&is_ajax=1",
beforeSend: function () {
$(".gmore").show();
},
success: function (data) {
$(".gmore").hide();
if(data!="") {
IsLoading = true;
$("#good_list").append(data);
}
}
});
}
///滑动到底部事件
$(document).unbind("scroll");
$(document).bind("scroll", function (event) {
if ($(document).scrollTop() >= $(document).height() - $(window).height()) {
if(IsLoading==true){
IsLoading = false;
ajax_sourch_submit();
}
}
});
</script>
</html>