integralMall.html
7.73 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand" />
<meta http-equiv="Cache-control" content="public" max-age="no-cache" />
<link rel="apple-touch-icon" sizes="114x114" href="http://static02.fn-mart.com/images/touch-icon-iphone-136.png" />
<link rel="alternate" media="only screen and (max-width:640px)" href="http://m.tp-shop.cn/category/C18973">
<meta name="applicable-device" content="pc">
<meta name="mobile-agent" content="format=html5;url=http://m.tp-shop.cn/category/C18973">
<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']}" />
<!--[if lte IE 9]>
<script src="http://static02.fn-mart.com/js/html5.js"></script>
<script src="http://static02.fn-mart.com/js/IE9.js"></script>
<link rel="stylesheet" type="text/css" href="http://static02.fn-mart.com/css/ie.css"/>
<![endif]-->
<link rel="stylesheet" href="__STATIC__/css/integral.css">
<link rel="stylesheet" href="__STATIC__/css/page.css">
<style type="text/css">
.num{bottom: 0 !important;}
</style>
</head>
<body>
<include file="public/header" />
<div class="content">
<div class="main">
<div class="exchange">
<ul id="cate_ul">
<li <if condition="$Think.get.id eq ''">class="travel"</if> id="cate">
<a href="{:U('Home/Goods/integralMall')}">全部分类</a>
</li>
<volist name="goods_category" id="gc">
<li <if condition="$Request.param.id eq $gc['id']">class="travel"</if>>
<a href="{:U('Home/Goods/integralMall',array('id'=>$gc['id']))}">{$gc['name']}</a>
</li>
</volist>
</ul>
</div>
<div class="bdnr">
<div class="jffw">
<div id="range" style="display:inline-block;">
积分范围:
<input type="text" class="bt_" name="minValue" id="minValue" value="{$Request.param.minValue}"> -
<input type="text" class="bt_" name="maxValue" id="maxValue" value="{$Request.param.maxValue}">
<button type="button" id="selectBtn" onclick="search();"><i class="icon-key"></i>查找</button>
</div>
兑换方式:
<select style=" padding:0 5px;" name="brandType" id="brandType">
<option value="0">全部</option>
<option value="1" <if condition="$Request.param.brandType eq 1">selected="selected"</if>>积分+金额</option>
<option value="2" <if condition="$Request.param.brandType eq 2">selected="selected"</if>>全积分</option>
</select>
<input name="is_new" type="checkbox" <if condition="$Request.param.is_new eq 1">checked="checked"</if> value="1" id="is_new"> 新品
<input name="exchange" type="checkbox" <if condition="$Request.param.exchange eq 1">checked="checked"</if> value="" id="exchange"> 我能兑换的商品
<!--<input name="" type="checkbox" value="" id="memberShip"> 会员专享-->
<input name="cat_id" id="cat_id" value="{$Request.param.id}" type="hidden" />
<div class="ysp" id="totlePage">共{$goods_list_count}个商品
<a class="prepage" href="javascript:void(0);" onclick="prePagination();"><</a>
<span><em id="pageIndex">{$nowPage}</em>/<em id="pageCount">{$totalPages}</em></span>
<a class="nextpage" href="javascript:void(0);" onclick="nextPagination();">></a>
</div>
</div>
<div class="jfxq">
<ul id="goods_ul">
<volist name="goods_list" id="goods">
<div id="jfdhsp">
<li>
<p class="p1">
<a target="_blank" href="{:U('Home/Goods/goodsInfo',array('id'=>$goods['goods_id']))}">
<img src="{$goods['goods_id']|goods_thum_images=200,200}">
</a>
</p>
<p class="p2">
<a target="_blank" href="{:U('Home/Goods/goodsInfo',array('id'=>$goods['goods_id']))}">{$goods['goods_name']}</a>
</p>
<p class="p4">
<span class="lx3">¥</span>
<span class="lx1">{$goods['shop_price']-$goods['exchange_integral']/$point_rate}</span>
<span class="lx4">+</span>
<span class="lx1">{$goods['exchange_integral']}</span>
<span class="lx4">积分</span>
<a target="_blank" href="{:U('Home/Goods/goodsInfo',array('id'=>$goods['goods_id']))}">立即兑换</a>
</p>
</li>
</div>
</volist>
</ul>
</div>
<div class="djs">
{$page}
</div>
</div>
</div>
</div>
<include file="public/footer" />
<script>
$(document).ready(function(){
//切换兑换方式
$('#brandType').change(function(){
search();
});
//选中新品
$("#is_new").bind("click", function () {
search();
});
//用户能买的商品
$("#exchange").bind("click", function () {
search();
});
})
//搜索
function search() {
var minValue = parseInt($('#minValue').val());//积分起始范围
var maxValue = parseInt($('#maxValue').val());//积分截止范围
var cat_id = $('#cat_id').val();//商品分类id
var brandType = $('#brandType').find("option:selected").val();
var url = "/index.php?m=Home&c=goods&a=integralMall";
if($('#minValue').val() != ''){
if(!isPositiveNum(minValue)){
layer.alert('范围有误', {icon: 2});
return false;
}else{
url += "&minValue="+minValue;
}
}
if($('#maxValue').val() != ''){
if(!isPositiveNum(maxValue)){
layer.alert('范围有误', {icon: 2});
return false;
}else{
url += "&maxValue="+maxValue;
}
}
if($('#minValue').val() != '' && $('#maxValue').val() != '' && maxValue < minValue){
layer.alert('范围有误', {icon: 2});
return false;
}
if(cat_id!=0 && cat_id!=''){
url += "&id="+cat_id;
}
if(brandType!=''){
url += "&brandType="+brandType;
}
if($("#is_new").is(":checked")){
url += "&is_new="+1;
}
if($("#exchange").is(":checked")){
url += "&exchange="+1;
}
window.location.href=url;
}
//检查是否为正整数
function isPositiveNum(s)
{
var re = /^\d+$/;
return re.test(s);
}
</script>
</body>
</html>