index.html
11.5 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
<!DOCTYPE html>
<script type="text/javascript" src="__PUBLIC__/js/rem_new.js"></script>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<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="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.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/layer.css" />
<!--<link rel="stylesheet" type="text/css" href="__STATIC__/css/category_list.css"/>-->
<link rel="stylesheet" type="text/css" href="__STATIC__/css/index.css"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/css/libao.css"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/css/appscript.css"/>
<script type="text/javascript" src="__STATIC__/js/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/js/TouchSlide.1.1.js"></script>
<script type="text/javascript" src="__STATIC__/js/jquery.json.js"></script>
<script type="text/javascript" src="__STATIC__/js/touchslider.dev.js"></script>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/mobile_common.js"></script>
<script type="text/javascript" src="__STATIC__/js/layer.js"></script>
<style type="text/css">
.subNav1{background: url(__STATIC__/images/arrow_down_off.png) no-repeat right center;
background-size: auto auto;
background-size: auto 13px;}
.mt10{ margin-bottom: 10px;}
.mhead{color: #797979;padding-bottom: 10px;font-weight: bold;}
.mintro{line-height: .4rem;height: .9rem;overflow: hidden;margin: 10px 0;position: absolute;padding: .1rem .1rem 0 .1rem;box-sizing: border-box;background-color: rgba(255, 255, 255, 0.7);color: #000;top: 3.4rem; width: 6rem;}
.mprice{border-top: 1px solid #f6f5f6;}
.libao_list ul{background-color: #fff;
padding:.0 ;}
.libao_list ul li{border-bottom: 10px solid #f1f1f1;padding: .2rem .2rem 0 .2rem;}
.libao_list ul li .div{width:6rem; height:4.5rem;background-size: 100% auto;position: relative;}
</style>
</head>
<body style="background-color: #f1f1f1;">
<include file="public/navBall" />
<div class="">
<div class="libaobox disfx" style="background-color: #fff;">
<div class="fxall" onclick="javascript:window.location.href='/index.php/mobile/Libao/index/stoid/{$Think.request.stoid}/'" ><span class="spanon">礼包列表</span></div>
<div class="fxall" onclick="javascript:window.location.href='/index.php/mobile/Libao/mylibao/stoid/{$Think.request.stoid}/'" ><span>我的礼包</span></div>
</div>
<div class="libao_list">
<ul id="libaolist">
<foreach name="list" item="vo">
<li data-id="{$vo.id}">
<div class="mhead f30 cut">{$vo.lbtitle}</div>
<div onclick="look(this,{$vo.lbtype});" data-id="{$vo.id}" class="div" style=" background-image: url({:getImg($vo.lburl)});background-repeat: no-repeat;">
<div class="bgf p10 f26 mintro" style="" onclick="showlbintro(this,event);" data-intro="{$vo.lbintro}">活动说明:{$vo.lbintro} </div>
</div>
<div class="disfx pt5 pb5 mprice" style="">
<span class="c9 f24 fxall">原价:<del>¥{$vo.oldprice}元</del></span>
<span class="c9 f24 tar fxall">已售:{$vo.salenum}件</span>
</div>
<div class="cr f30"><if condition="$vo.lbprice neq 0.00">¥{$vo.lbprice}元<if condition="$vo.lbintegral neq 0">/</if></if><if condition="$vo.lbintegral neq 0">{$vo.lbintegral}积分</if></div>
<div>活动结束时间:{$vo.endtime|date='Y-m-d',###}</div>
<div class="mt10" <if condition="$vo.curnum eq 0">style="display:none;"</if>>
<div class="btn_libao moz_b4 moz_t4" onclick="transjifen(this);" <if condition="$vo.lbintegral eq 0">style="display:none;"</if>> 立即兑换</div>
<div class="btn_libao moz_b4 moz_t4 cr" onclick="goumai(this);" <if condition="$vo.lbprice eq 0.00">style="display:none;"</if>> 立即购买</div>
</div>
</li>
</foreach>
</ul>
</div>
<div style="clear:both">
<a href="javascript:;" class="get_more" style="text-align:center; display:none;padding:10px 0">
<img src='__STATIC__/images/category/loader.gif' width="12" height="12"> </a>
</div>
<eq name="mshow" value="1">
<div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem; clear:both">
<a href="javascript:void(0)" onClick="ajax_list()"
style=" color: #000000;font-size: 14px;text-decoration: none;">点击加载更多</a>
</div>
</eq>
<eq name="mshow" value="0">
<div style="line-height: .4rem; text-align: center;font-size: .18rem;color: #999; margin-top: 40px">暂无更多</div>
</eq>
</div>
<!--规则-->
<div class="fixed" style=" display:none;">
<div class="guize rel moz_b4 moz_t4" style="position: relative;display:none;">
<ul>
<li class="p20 tal">活动说明:</li>
<li class="lh40" id="rules">
这就是活动规则
</li>
</ul>
<div class="close bgcover" onclick="javascript:$('.fixed,.guize').hide();" style="font-size: x-large;">×</div>
</div>
</div>
<form action="/Mobile/Payment/getPay" method="post" name="points" id="points" style="display: none;">
<input name="stoid" value="{$Think.request.stoid}" type="hidden">
<input name="recharge_type" value="5" type="hidden">
<input type="hidden" value="" name="lbid" id="lbid"/>
</form>
<input type="hidden" id="ghspath" value="" />
<input type="hidden" id="supplyid" value="" />
<input id="xsyurl" name="xsyurl" type="hidden" value="" />
<input id="getcururl" name="getcururl" type="hidden" value="" />
</body>
<script type="text/javascript">
var getstoid = "<?php echo I('stoid')?>";
var page = 1;
/*** ajax 提交表单 查询订单列表结果*/
function ajax_list()
{
$('.get_more').show();
$('#getmore').hide();
page += 1;
$.ajax({
type : "GET",
url:"/index.php?m=Mobile&c=Libao&a=index&is_ajax=1&p="+page+"&stoid="+getstoid,//+tab,
success: function(data)
{
$('.get_more').hide();
if ($.trim(data) === '') {
$('#getmore a').hide();
} else {
$('#getmore').show();
$("#libaolist").append(data);
}
}
});
}
//查看详情
function look(obj,t) {
var id=$(obj).attr("data-id");
if(t==1)
{
window.location.href="/index.php/mobile/Libao/lbdetails/stoid/{$Think.request.stoid}/id/"+id;
}
else if(t==2)
{
window.location.href="/index.php/mobile/Libao/lbquan/stoid/{$Think.request.stoid}/id/"+id;
}
}
//积分兑换
function transjifen(obj) {
var uid=getCookie("user_mobile");
if($.trim(uid)=="" || uid==undefined) {
window.location.href = '/index.php/Mobile/User/login/stoid/' + getstoid + '?oldurl=' + encodeURIComponent(window.location.href);
return false;
}
var lbid=$(obj).parents('li').attr('data-id');
layer.open({
content:'是否确定兑换礼包',
btn:['确定','取消'],
yes:function (index) {
layer.closeAll();
console.log('确定');
var ii=layer.open({type: 2,shadeClose: false});
$.ajax({
type: "POST",
url: "{:U('Mobile/Libao/libaoorder',array('stoid'=>$Think.request.stoid))}", //+tab,
data: "lbid="+lbid+"&paytype=1", // 你的formid
dataType: "json",
beforeSend:function()
{
layer.open({shadeClose: false,type: 2 ,content: '提交中…'});
},
success: function (data) {
layer.closeAll();
layer.close(ii);
console.log(data.code);
if (data.code == 1) {
layer.open({
content: "兑换成功",
time: 2
});
setTimeout(function () {
location.href = "/Mobile/Payment/payment_success/stoid/" + getstoid+"/ptype/1.html";
}, 1000)
} else {
layer.open({
content: data.msg,
time: 2
});
}
},
error:function () {
layer.close(ii);
}
});
},
// no:function (index) {
// console.log('取消');
// }
})
}
//微信购买
function goumai(obj) {
var uid=getCookie("user_mobile");
if($.trim(uid)=="" || uid==undefined) {
window.location.href = '/index.php/Mobile/User/login/stoid/' + getstoid + '?oldurl=' + encodeURIComponent(window.location.href);
return false;
}
var lbid=$(obj).parents('li').attr('data-id');
$('#lbid').val(lbid);
layer.open({
content:'是否确定购买礼包',
btn:['确定','取消'],
yes:function (index) {
layer.closeAll();
console.log('确定');
$.ajax({
type: "POST",
url: "{:U('Mobile/Libao/libaoorder',array('stoid'=>$Think.request.stoid))}", //+tab,
data: "lbid="+lbid+"&paytype=2", // 你的formid
dataType: "json",
success: function (data) {
// layer.close(ii);
console.log(data.code);
if (data.code == 1) {
$("#points").submit();
} else {
layer.open({
content: data.msg,
time: 2
});
}
}
});
},
// no:function (index) {
// console.log('取消');
// }
})
}
//礼包说明
function showlbintro(obj,e) {
$("#rules").html($(obj).attr("data-intro"));
$('.fixed,.guize').show();
e = window.event || e;
if (document.all) { //只有ie识别
e.cancelBubble = true;
} else {
e.stopPropagation();
}
}
</script>
</html>
<!-- 微信浏览器 调用微信 分享js-->
<include file="public/wx_share"/>