作者 王晓刚
1 个管道 的构建 通过 耗费 10 秒

订单?

... ... @@ -705,7 +705,7 @@
<li>
<div class="customerInfo">
<img src="{$c1.user.avatar}" alt="img">
<p class="customerNickname">{$c1.user.username}</p>
<p class="customerNickname">{$c1.user.nickname|default='****'}</p>
</div>
<div class="evaluateInfo">
<div class="title">
... ... @@ -744,7 +744,7 @@
<li>
<div class="customerInfo">
<img src="{$c2.user.avatar}" alt="img">
<p class="customerNickname">{$c2.user.username}</p>
<p class="customerNickname">{$c2.user.nickname|default='****'}</p>
</div>
<div class="evaluateInfo">
<div class="title">
... ... @@ -783,7 +783,7 @@
<li>
<div class="customerInfo">
<img src="{$c3.user.avatar}" alt="img">
<p class="customerNickname">{$c3.user.username}</p>
<p class="customerNickname">{$c3.user.nickname|default='****'}</p>
</div>
<div class="evaluateInfo">
<div class="title">
... ... @@ -822,7 +822,7 @@
<li>
<div class="customerInfo">
<img src="{$c4.user.avatar}" alt="img">
<p class="customerNickname">{$c4.user.username}</p>
<p class="customerNickname">{$c4.user.nickname|default='****'}</p>
</div>
<div class="evaluateInfo">
<div class="title">
... ... @@ -1024,32 +1024,28 @@
// Netscape/Firefox/Opera
keyCode = e.which
}
if(is_impose == 1){
if(parseInt($('.spinner input').val()) >= parseInt(imposenum)){
$('#numberInput').val(parseInt(imposenum));
var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]);
$('#totalPrice').html('¥'+totalPrice.toFixed(2));
return false;
};
}
if($('#numberInput').val()<=0){
$('#numberInput').val(1);
var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]);
$('#totalPrice').html('¥'+totalPrice.toFixed(2));
return false;
}
console.log(parseInt($('#numberInput').val()));
console.log(parseInt($('#inventory').text()));
if(parseInt($('#numberInput').val()) >= parseInt($('#inventory').text())){
$('#numberInput').val(parseInt($('#inventory').text()));
var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]);
$('#totalPrice').html('¥'+totalPrice.toFixed(2));
return false;
}
if(is_impose == 1){
console.log(imposenum);
console.log($('.spinner input').val());
if(parseInt($('.spinner input').val()) >= parseInt(imposenum)){
$('#numberInput').val(parseInt(imposenum));
var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]);
$('#totalPrice').html('¥'+totalPrice.toFixed(2));
return false;
};
}
$('.spinner input').val(isNaN(parseFloat($('.spinner input').val()))?1:parseFloat($('.spinner input').val()));
$('#totalPrice').html('¥0.00');
// $('#totalPrice').html('¥0.00');
if (keyCode>=48&&keyCode<=57 || keyCode>=96&&keyCode<=105 || keyCode==8){
var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]);
$('#totalPrice').html('¥'+totalPrice.toFixed(2));
... ...
... ... @@ -341,7 +341,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外面,需要自定义样式。-->
... ... @@ -402,6 +403,7 @@
</a>
</div>-->
</div>
<div class="without" style="height: 100px;text-align: center;font-size: 16px;line-height: 100px;display: none;">暂无更多</div>
<div class="pagingBox">
<div class="paginationMyOrder" id="paginationAllOrder">
<div class="whj_jqueryPaginationCss-1 "></div>
... ... @@ -474,36 +476,42 @@
data:{"province_id":province_id,"page":page,"pageNum":pageNum,'paginate':1,'category_id':category_id},
success:function(res){
console.log(res);
var goods_html = "";
$(res.data.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'))}\">\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 totalPage = Math.ceil(res.data.total/pageNum);
initPaging(res.data.total,res.data.current_page,totalPage,pageNum);
var goods_html = "";
$(res.data.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'))}\">\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 totalPage = Math.ceil(res.data.total / pageNum);
initPaging(res.data.total, res.data.current_page, totalPage, pageNum);
}
},
error:function(res){
toast('与服务器断开连接');
... ...
... ... @@ -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('与服务器断开连接');
... ...
... ... @@ -34,6 +34,7 @@
padding: 21px 24px;
border: 0;
}
.content .contentMain .searchBox .search:focus{ outline:none; }
.content .contentMain .searchBox .input-group-btn{
width: 112px;
height: 64px;
... ... @@ -124,7 +125,7 @@
<img src="__CDN__/assets/store/images/hot.png" alt="hot">
<span>热门搜索</span>
</div>
<div class="labels">
<div class="labels" style="position: relative;">
{foreach name="$hot" item="h"}
<div onclick="search('{$h.keyword}')">{$h.keyword}</div>
{/foreach}
... ...