Authored by 毕凯

搜索结果店铺个数

... ... @@ -1921,4 +1921,3 @@ class HelperSearch
return array();
}
}
... ...

48.3 KB | W: | H:

48.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

8.64 KB | W: | H:

8.64 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -28,40 +28,46 @@ exports.init = function(num) {
$shopEntryArea = $('.shop-entry-area'),
shopEntryLen = $shopEntry.length;
if (shopEntryLen > 0) {
if (shopEntryLen % 3 === 1) {
$shopEntry.eq(shopEntryLen - 1).css({
width: '100%'
});
if (shopEntryLen > 1) {
$shopEntry.eq(shopEntryLen - 1).find('.name').css({
width: '600px'
if (shopEntryLen === 3) {
$shopEntry.css({
width: '32%'
});
} else if (shopEntryLen % 3 === 2) {
$shopEntry.eq(shopEntryLen - 1).css({
width: '49%'
} else if (shopEntryLen % 2) {
// 大于 2 ,并且是基数
$('.shop-entry:gt(' + (shopEntryLen - 4) + ')').css({
width: '32%'
});
}
$shopEntry.eq(shopEntryLen - 2).css({
width: '49%'
$('.shop-entry:nth-child(2n+1)').css({
marginLeft: 0
});
$shopEntry.eq(shopEntryLen - 1).find('.name').css({
width: '230px'
$shopEntry.last().css({
marginLeft: '2%'
});
$shopEntry.eq(shopEntryLen - 2).find('.name').css({
width: '230px'
if (shopEntryLen % 2 === 0) {
$shopEntry.find('.name').css({
width: '50%'
});
} else if (shopEntryLen % 3 === 0) {
$shopEntry.find('.name').css({
width: '26%'
});
}
$('.shop-entry:nth-child(3n+1)').css({
marginLeft: 0
} else {
$shopEntry.css({
width: '100%'
});
$shopEntryArea.show();
}
$shopEntryArea.slideDown();
productList = null;
$goodItem.unbind();
... ...
... ... @@ -14,7 +14,7 @@
background: #f5f7f6;
border: 1px solid #eaeceb;
padding: 12px 15px;
width: 32%;
width: 49%;
box-sizing: border-box;
float: left;
margin: 0 0 10px 2%;
... ... @@ -26,7 +26,7 @@
.name {
margin-left: 10px;
width: 75px;
width: 70%;
}
.shop-name {
... ...