...
|
...
|
@@ -353,7 +353,8 @@ |
|
|
<div id="banner-container" class="swiper-container">
|
|
|
<div class="swiper-wrapper">
|
|
|
{foreach name="$slide" item="s"}
|
|
|
<div class="swiper-slide"><img src="{$s.thumbnail}" alt="img" style="width: 100%;height:100%"></div>
|
|
|
<div class="swiper-slide" style="height: auto;
|
|
|
min-height: 540px;"><img src="{$s.thumbnail}" alt="img" style="width: 100%;height:100%"></div>
|
|
|
{/foreach}
|
|
|
</div>
|
|
|
<!--分页器。如果放置在swiper-container外面,需要自定义样式。-->
|
...
|
...
|
@@ -390,9 +391,8 @@ |
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!--特价清仓部分-->
|
|
|
<div class="clearanceBox">
|
|
|
<div class="clearanceBox" style="display: none">
|
|
|
<div class="clearanceMain">
|
|
|
<div class="titleBox">
|
|
|
<span></span>
|
...
|
...
|
@@ -450,6 +450,7 @@ |
|
|
</div>
|
|
|
{/foreach}
|
|
|
</div>
|
|
|
<div class="without" style="height: 100px;text-align: center;font-size: 16px;line-height: 100px;display: none;">暂无更多</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -518,30 +519,38 @@ |
|
|
data:{"province_id":province_id,'is_clearance':1},
|
|
|
success:function(res){
|
|
|
console.log(res);
|
|
|
var clearance_goods_html = "";
|
|
|
$(res.data).each(function (key, vo) {
|
|
|
var str = "<div class=\"swiper-slide\">\n" +
|
|
|
" <a href=\"{:url('index/goods/detail',array('goods_id'=>'GOODS_ID'))}\" target='_blank'>\n" +
|
|
|
" <div style=\"width:175px;height:175px;\"><img src=\""+vo.thumbnail+"\" alt=\"img\"></div>\n" +
|
|
|
" <p class=\"commodityTitle\">"+vo.goodsname+"</p>\n" +
|
|
|
" <div class=\"priceBox\">\n" +
|
|
|
" <p class=\"presentPrice\">¥"+vo.price+"</p>\n" +
|
|
|
" <p class=\"originalPrice\">¥"+vo.lineation+"</p>\n" +
|
|
|
" </div>\n" +
|
|
|
" </a>\n" +
|
|
|
" </div>";
|
|
|
clearance_goods_html += str.replace("GOODS_ID",vo.id);
|
|
|
});
|
|
|
$('.clearance_goods_dom').html(clearance_goods_html);
|
|
|
//初始化swiper
|
|
|
var myClearance = new Swiper('#clearanceList-container', {
|
|
|
loop: false,
|
|
|
slidesPerView: 6,
|
|
|
autoplay: 3000,
|
|
|
//前进后退按钮
|
|
|
nextButton: '#clearanceList-button-next',
|
|
|
prevButton: '#clearanceList-button-prev',
|
|
|
})
|
|
|
if(res.code == 1) {
|
|
|
console.log(res.data)
|
|
|
if(res.data.length == 0){
|
|
|
$('.clearanceBox').hide();
|
|
|
return false;
|
|
|
}
|
|
|
$('.clearanceBox').show();
|
|
|
var clearance_goods_html = "";
|
|
|
$(res.data).each(function (key, vo) {
|
|
|
var str = "<div class=\"swiper-slide\">\n" +
|
|
|
" <a href=\"{:url('index/goods/detail',array('goods_id'=>'GOODS_ID'))}\" target='_blank'>\n" +
|
|
|
" <div style=\"width:175px;height:175px;\"><img src=\"" + vo.thumbnail + "\" alt=\"img\"></div>\n" +
|
|
|
" <p class=\"commodityTitle\">" + vo.goodsname + "</p>\n" +
|
|
|
" <div class=\"priceBox\">\n" +
|
|
|
" <p class=\"presentPrice\">¥" + vo.price + "</p>\n" +
|
|
|
" <p class=\"originalPrice\">¥" + vo.lineation + "</p>\n" +
|
|
|
" </div>\n" +
|
|
|
" </a>\n" +
|
|
|
" </div>";
|
|
|
clearance_goods_html += str.replace("GOODS_ID", vo.id);
|
|
|
});
|
|
|
$('.clearance_goods_dom').html(clearance_goods_html);
|
|
|
//初始化swiper
|
|
|
var myClearance = new Swiper('#clearanceList-container', {
|
|
|
loop: false,
|
|
|
slidesPerView: 6,
|
|
|
autoplay: 3000,
|
|
|
//前进后退按钮
|
|
|
nextButton: '#clearanceList-button-next',
|
|
|
prevButton: '#clearanceList-button-prev',
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
error:function(res){
|
|
|
toast('与服务器断开连接');
|
...
|
...
|
@@ -557,33 +566,39 @@ |
|
|
data:{"province_id":province_id},
|
|
|
success:function(res){
|
|
|
console.log(res);
|
|
|
var goods_html = "";
|
|
|
$(res.data).each(function (key1, vo) {
|
|
|
var property = "";
|
|
|
$(vo.property).each(function (key2, p) {
|
|
|
property += "<span>"+p+"</span>";
|
|
|
});
|
|
|
var insurance = "";
|
|
|
if(vo.insurance == '1'){
|
|
|
insurance = "<img class=\"insurance_icon\" src=\"__CDN__/assets/store/images/insurance_icon.png\" alt=\"img\">"
|
|
|
if(res.code == 1){
|
|
|
if(res.data.length == 0){
|
|
|
$('.without').show();
|
|
|
return false;
|
|
|
}
|
|
|
var str = "<div class=\"commodityBox\">\n" +
|
|
|
" <a href=\"{:url('index/goods/detail',array('goods_id'=>'GOODS_ID'))}\" target='_blank'>\n" +
|
|
|
" <div class=\"imgBox\">\n" +
|
|
|
" <img src=\""+vo.thumbnail+"\" alt=\"img\">\n" +
|
|
|
" <span>"+vo.store_name+"</span>\n" +
|
|
|
" </div>\n" +
|
|
|
" <p class=\"commodityPrice\">¥"+vo.price+"</p>\n" +
|
|
|
" <p class=\"commodityName\">"+vo.goodsname+"</p>\n" +
|
|
|
" <div class=\"labelBox\">\n" +
|
|
|
" "+property+"\n" +
|
|
|
" </div>\n" +
|
|
|
" "+insurance+"\n" +
|
|
|
" </a>\n" +
|
|
|
" </div>";
|
|
|
goods_html += str.replace("GOODS_ID",vo.id);
|
|
|
});
|
|
|
$('.goods_dom').html(goods_html);
|
|
|
var goods_html = "";
|
|
|
$(res.data).each(function (key1, vo) {
|
|
|
var property = "";
|
|
|
$(vo.property).each(function (key2, p) {
|
|
|
property += "<span>"+p+"</span>";
|
|
|
});
|
|
|
var insurance = "";
|
|
|
if(vo.insurance == '1'){
|
|
|
insurance = "<img class=\"insurance_icon\" src=\"__CDN__/assets/store/images/insurance_icon.png\" alt=\"img\">"
|
|
|
}
|
|
|
var str = "<div class=\"commodityBox\">\n" +
|
|
|
" <a href=\"{:url('index/goods/detail',array('goods_id'=>'GOODS_ID'))}\" target='_blank'>\n" +
|
|
|
" <div class=\"imgBox\">\n" +
|
|
|
" <img src=\""+vo.thumbnail+"\" alt=\"img\">\n" +
|
|
|
" <span>"+vo.store_name+"</span>\n" +
|
|
|
" </div>\n" +
|
|
|
" <p class=\"commodityPrice\">¥"+vo.price+"</p>\n" +
|
|
|
" <p class=\"commodityName\">"+vo.goodsname+"</p>\n" +
|
|
|
" <div class=\"labelBox\">\n" +
|
|
|
" "+property+"\n" +
|
|
|
" </div>\n" +
|
|
|
" "+insurance+"\n" +
|
|
|
" </a>\n" +
|
|
|
" </div>";
|
|
|
goods_html += str.replace("GOODS_ID",vo.id);
|
|
|
});
|
|
|
$('.goods_dom').html(goods_html);
|
|
|
}
|
|
|
},
|
|
|
error:function(res){
|
|
|
toast('与服务器断开连接');
|
...
|
...
|
|