Showing
4 changed files
with
13 additions
and
8 deletions
@@ -13,9 +13,9 @@ var swiper; | @@ -13,9 +13,9 @@ var swiper; | ||
13 | var filter = require('../../plugin/filter'); | 13 | var filter = require('../../plugin/filter'); |
14 | 14 | ||
15 | var $goodsContainer = $('#goods-container'), | 15 | var $goodsContainer = $('#goods-container'), |
16 | - $ngc = $goodsContainer.children('.new-goods'), | ||
17 | - $pgc = $goodsContainer.children('.price-goods'), | ||
18 | - $dgc = $goodsContainer.children('.discount-goods'); | 16 | + $ngc = $($goodsContainer.children().get(0)), |
17 | + $pgc = $($goodsContainer.children().get(1)), | ||
18 | + $dgc = $($goodsContainer.children().get(2)); | ||
19 | 19 | ||
20 | var winH = $(window).height(); | 20 | var winH = $(window).height(); |
21 | 21 |
@@ -40,12 +40,18 @@ | @@ -40,12 +40,18 @@ | ||
40 | <div id="goods-container" class="goods-container"> | 40 | <div id="goods-container" class="goods-container"> |
41 | {{# goodsContainer}} | 41 | {{# goodsContainer}} |
42 | <div class="new-goods container"> | 42 | <div class="new-goods container"> |
43 | + {{#if goods}} | ||
43 | {{# goods}} | 44 | {{# goods}} |
44 | {{> good}} | 45 | {{> good}} |
45 | {{/ goods}} | 46 | {{/ goods}} |
47 | + {{^}} | ||
48 | + <p class="no-result">未找到相关搜索结果</p> | ||
49 | + {{/if}} | ||
46 | </div> | 50 | </div> |
51 | + <div class="price-goods container hide"></div> | ||
52 | + <div class="discount-goods container hide"></div> | ||
47 | {{/ goodsContainer}} | 53 | {{/ goodsContainer}} |
48 | - | 54 | + |
49 | {{> filter}} | 55 | {{> filter}} |
50 | </div> | 56 | </div> |
51 | 57 | ||
@@ -90,7 +96,7 @@ | @@ -90,7 +96,7 @@ | ||
90 | {{/if}} | 96 | {{/if}} |
91 | 97 | ||
92 | {{#if discount}} | 98 | {{#if discount}} |
93 | - <input id="page" type="hidden" value={{page}}> | 99 | + <input id="discount" type="hidden" value={{discount}}> |
94 | {{/if}} | 100 | {{/if}} |
95 | 101 | ||
96 | </div> | 102 | </div> |
@@ -58,6 +58,7 @@ class NewsaleController extends AbstractAction | @@ -58,6 +58,7 @@ class NewsaleController extends AbstractAction | ||
58 | $this->channelTrans($channel); | 58 | $this->channelTrans($channel); |
59 | 59 | ||
60 | $data = array(); | 60 | $data = array(); |
61 | + $data['discount'] = true; | ||
61 | $data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel); | 62 | $data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel); |
62 | $goodsList = \Product\NewsaleModel::getSaleProducts($channel, 60); | 63 | $goodsList = \Product\NewsaleModel::getSaleProducts($channel, 60); |
63 | if (!empty($goodsList)) { | 64 | if (!empty($goodsList)) { |
@@ -72,7 +73,7 @@ class NewsaleController extends AbstractAction | @@ -72,7 +73,7 @@ class NewsaleController extends AbstractAction | ||
72 | 'size' => 0, | 73 | 'size' => 0, |
73 | 'discount' => '0.1,0.9' | 74 | 'discount' => '0.1,0.9' |
74 | ); | 75 | ); |
75 | - | 76 | +//var_dump($data);exit; |
76 | $this->_view->display('sale', $data); | 77 | $this->_view->display('sale', $data); |
77 | } | 78 | } |
78 | 79 |
-
Please register or login to post a comment