Merge branch 'feature/mbrand_shop' of http://git.dev.yoho.cn/web/yohobuy into feature/mbrand_shop
Showing
7 changed files
with
236 additions
and
83 deletions
@@ -11,4 +11,4 @@ require('./detail/detail'); | @@ -11,4 +11,4 @@ require('./detail/detail'); | ||
11 | require('./detail/consultform'); | 11 | require('./detail/consultform'); |
12 | require('./newsale/hot-rank'); | 12 | require('./newsale/hot-rank'); |
13 | require('./product-category'); | 13 | require('./product-category'); |
14 | - | 14 | +require('./shop'); |
@@ -2,4 +2,24 @@ | @@ -2,4 +2,24 @@ | ||
2 | * 品牌店铺首页 | 2 | * 品牌店铺首页 |
3 | */ | 3 | */ |
4 | 4 | ||
5 | -// var $ = require('jquery'); | 5 | +var $ = require('jquery'), |
6 | + activeTab; | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | +$.jqtab = function(nav, main) { | ||
11 | + | ||
12 | + $(nav + ' li').click(function() { | ||
13 | + $(nav + ' li').removeClass('active'); | ||
14 | + $(nav + ' li').find('a').removeClass('color'); | ||
15 | + | ||
16 | + $(this).find('a').addClass('color'); | ||
17 | + activeTab = $(this).find('a').attr('tab'); | ||
18 | + $(main).hide(); | ||
19 | + $(this).addClass('active'); | ||
20 | + $('#' + activeTab).fadeIn(); | ||
21 | + return false; | ||
22 | + }); | ||
23 | +}; | ||
24 | +$.jqtab('#nav1', '.main'); | ||
25 | + |
@@ -35,6 +35,7 @@ | @@ -35,6 +35,7 @@ | ||
35 | border-bottom: 1px solid #e1e1e1; | 35 | border-bottom: 1px solid #e1e1e1; |
36 | 36 | ||
37 | li{ | 37 | li{ |
38 | + color: #b1b1b1; | ||
38 | display: block; | 39 | display: block; |
39 | height: 28rem /$pxConvertRem; | 40 | height: 28rem /$pxConvertRem; |
40 | float: left; | 41 | float: left; |
@@ -47,18 +48,21 @@ | @@ -47,18 +48,21 @@ | ||
47 | 48 | ||
48 | &:first-child { | 49 | &:first-child { |
49 | border-left: none; | 50 | border-left: none; |
50 | - // color: #b1b1b1; | ||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | a { | 54 | a { |
55 | color: #b1b1b1; | 55 | color: #b1b1b1; |
56 | - } | 56 | + } |
57 | + .color { | ||
58 | + color: #000; | ||
59 | + } | ||
57 | } | 60 | } |
58 | 61 | ||
59 | .main { | 62 | .main { |
60 | background: #f0f0f0; | 63 | background: #f0f0f0; |
61 | padding-bottom: 1rem; | 64 | padding-bottom: 1rem; |
65 | + overflow: hidden; | ||
62 | } | 66 | } |
63 | 67 | ||
64 | .hide { | 68 | .hide { |
@@ -250,7 +254,7 @@ | @@ -250,7 +254,7 @@ | ||
250 | height: 28rem /$pxConvertRem; | 254 | height: 28rem /$pxConvertRem; |
251 | float: left; | 255 | float: left; |
252 | line-height: 28rem /$pxConvertRem; | 256 | line-height: 28rem /$pxConvertRem; |
253 | - width: 49%; | 257 | + width: 33%; |
254 | text-align: center; | 258 | text-align: center; |
255 | border-left: 1px solid #e1e1e1; | 259 | border-left: 1px solid #e1e1e1; |
256 | margin-top: 30rem / $pxConvertRem; | 260 | margin-top: 30rem / $pxConvertRem; |
@@ -262,6 +266,12 @@ | @@ -262,6 +266,12 @@ | ||
262 | } | 266 | } |
263 | } | 267 | } |
264 | 268 | ||
269 | + .list { | ||
270 | + padding-top: 30rem / $pxConvertRem; | ||
271 | + padding-left: 15rem / $pxConvertRem; | ||
272 | + background: #fff; | ||
273 | + } | ||
274 | + | ||
265 | .discount-area { | 275 | .discount-area { |
266 | @extend .discount-page; | 276 | @extend .discount-page; |
267 | 277 | ||
@@ -299,4 +309,15 @@ | @@ -299,4 +309,15 @@ | ||
299 | .search-area { | 309 | .search-area { |
300 | @extend .search-page; | 310 | @extend .search-page; |
301 | } | 311 | } |
312 | + | ||
313 | + .scroll-wrapper{ | ||
314 | + position: absolute; | ||
315 | + top: 0; | ||
316 | + bottom: 0; | ||
317 | + left: 0; | ||
318 | + right: 0; | ||
319 | + overflow: hidden; | ||
320 | + } | ||
321 | + | ||
322 | + | ||
302 | } | 323 | } |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | {{# shopIndex}} | 2 | {{# shopIndex}} |
3 | - <div class="shop-index yoho-page"> | ||
4 | - <div class="search-area"> | ||
5 | - <div id="search-input" class="search-input"> | ||
6 | - <form id="search-form" action={{url}} method="get"> | ||
7 | - <i class="search-icon iconfont"></i> | ||
8 | - <input type="text" placeholder="搜索店铺内潮品" name="query"> | ||
9 | - <input type="hidden" name="from" value="search"> | ||
10 | - <i class="clear-input iconfont hide"></i> | ||
11 | - <span id="search" class="search" type="submit">搜索</span> | ||
12 | - </form> | 3 | + <div class="shop-index yoho-page" id="wrapper"> |
4 | + <div id="scroller"> | ||
5 | + <div class="search-area"> | ||
6 | + <div id="search-input" class="search-input"> | ||
7 | + <form id="search-form" action={{url}} method="get"> | ||
8 | + <i class="search-icon iconfont"></i> | ||
9 | + <input type="text" placeholder="搜索店铺内潮品" name="query"> | ||
10 | + <input type="hidden" name="from" value="search"> | ||
11 | + <i class="clear-input iconfont hide"></i> | ||
12 | + <span id="search" class="search" type="submit">搜索</span> | ||
13 | + </form> | ||
14 | + </div> | ||
15 | + </div> | ||
16 | + <div class="branner-top"> | ||
17 | + <img src="{{branerImg}}"> | ||
18 | + <div class="collect"></div> | ||
13 | </div> | 19 | </div> |
14 | - </div> | ||
15 | - <div class="branner-top"> | ||
16 | - <img src="{{branerImg}}"> | ||
17 | - <div class="collect"></div> | ||
18 | - </div> | ||
19 | - | ||
20 | - <ul id="nav1" class="nav"> | ||
21 | - <li><a href="#" tab="main1">首页</a></li> | ||
22 | - <li><a href="#" tab="main2">人气</a></li> | ||
23 | - <li><a href="#" tab="main3">上新</a></li> | ||
24 | - <li><a href="#" tab="main4">全部商品</a></li> | ||
25 | - </ul> | ||
26 | 20 | ||
27 | - <ul> | ||
28 | - <li id="main1" class="main"> | ||
29 | - <div class="coupon"> | ||
30 | - {{#each coupon}} | ||
31 | - <img src="{{couponType}}"> | ||
32 | - {{/each}} | ||
33 | - </div> | ||
34 | - | ||
35 | - {{#unless brands}} | ||
36 | - <div class="multi-brands"> | ||
37 | - <h2>品牌一览</h2> | ||
38 | - <div class="brand-img"> | ||
39 | - {{#each brandImg}} | ||
40 | - <img src="{{brandType}}"> | 21 | + <ul id="nav1" class="nav"> |
22 | + <li class="active"> | ||
23 | + <a href="#" tab="home-page" class="color" >首页</a> | ||
24 | + </li> | ||
25 | + <li> | ||
26 | + <a href="#" tab="new-arrival">上新</a> | ||
27 | + </li> | ||
28 | + <li> | ||
29 | + <a href="#" tab="popularity">人气</a> | ||
30 | + </li> | ||
31 | + <li> | ||
32 | + <a href="#" target="_blank">全部商品</a> | ||
33 | + </li> | ||
34 | + </ul> | ||
35 | + | ||
36 | + <ul id="main1"> | ||
37 | + <li id="home-page" class="main"> | ||
38 | + <div class="coupon"> | ||
39 | + {{#each coupon}} | ||
40 | + <img src="{{couponType}}"> | ||
41 | {{/each}} | 41 | {{/each}} |
42 | </div> | 42 | </div> |
43 | - </div> | ||
44 | - {{/unless}} | 43 | + |
44 | + {{#unless brands}} | ||
45 | + <div class="multi-brands"> | ||
46 | + <h2>品牌一览</h2> | ||
47 | + <div class="brand-img"> | ||
48 | + {{#each brandImg}} | ||
49 | + <img src="{{brandType}}"> | ||
50 | + {{/each}} | ||
51 | + </div> | ||
52 | + </div> | ||
53 | + {{/unless}} | ||
45 | 54 | ||
46 | - <div class="centerimg"> | ||
47 | - <img src="{{preferential}}"> | ||
48 | - </div> | 55 | + <div class="centerimg"> |
56 | + <img src="{{preferential}}"> | ||
57 | + </div> | ||
49 | 58 | ||
50 | - <ul class="spring"> | ||
51 | - {{#each spring}} | ||
52 | - <li> | ||
53 | - <img src="{{springType}}"> | ||
54 | - </li> | ||
55 | - {{/each}} | ||
56 | - </ul> | 59 | + <ul class="spring"> |
60 | + {{#each spring}} | ||
61 | + <li> | ||
62 | + <img src="{{springType}}"> | ||
63 | + </li> | ||
64 | + {{/each}} | ||
65 | + </ul> | ||
57 | 66 | ||
58 | - {{! 热门品类}} | ||
59 | - {{# hotCategory}} | ||
60 | - {{> home/hot_category}} | ||
61 | - {{/ hotCategory}} | 67 | + {{! 热门品类}} |
68 | + {{# hotCategory}} | ||
69 | + {{> home/hot_category}} | ||
70 | + {{/ hotCategory}} | ||
62 | 71 | ||
63 | - <div class="title"> | ||
64 | - 人气单品 | ||
65 | - <a class="more" href="{{more_url}}"></a> | ||
66 | - </div> | 72 | + <div class="title"> |
73 | + 人气单品 | ||
74 | + <a class="more" href="{{more_url}}"></a> | ||
75 | + </div> | ||
76 | + | ||
67 | <ul class="product-list"> | 77 | <ul class="product-list"> |
68 | {{#each hotList}} | 78 | {{#each hotList}} |
69 | <li> | 79 | <li> |
@@ -71,29 +81,52 @@ | @@ -71,29 +81,52 @@ | ||
71 | <div class="list-price"> | 81 | <div class="list-price"> |
72 | <p>VANS AP M BERZE</p> | 82 | <p>VANS AP M BERZE</p> |
73 | <p><span class="red">{{originalPrice}}</span> | 83 | <p><span class="red">{{originalPrice}}</span> |
74 | - <span>{{presentPrice}}</span> | 84 | + <span>{{presentPrice}}</span> |
75 | </p> | 85 | </p> |
76 | </div> | 86 | </div> |
77 | </li> | 87 | </li> |
78 | {{/each}} | 88 | {{/each}} |
79 | </ul> | 89 | </ul> |
80 | - </li> | ||
81 | 90 | ||
82 | - <li id="main2" class="main hide">1234</li> | ||
83 | - <li id="main3" class="main hide"><li> | ||
84 | - <li id="main4" class="main hide"><li> | ||
85 | - </ul> | ||
86 | - | ||
87 | - <div class="discount-area"> | ||
88 | - {{> product/goods-nav-top}} | ||
89 | - </div> | ||
90 | - | ||
91 | - <div class="fotter"> | ||
92 | - <ul> | ||
93 | - <li>商品分类</li> | ||
94 | - <li>店铺简介</li> | ||
95 | - </ul> | ||
96 | - </div> | 91 | + <div class="discount-area"> |
92 | + {{> product/goods-nav-top}} | ||
93 | + </div> | ||
94 | + </li> | ||
95 | + | ||
96 | + <li id="new-arrival" class="main list hide"> | ||
97 | + | ||
98 | + </li> | ||
99 | + | ||
100 | + <li id="popularity" class="main list hide"> | ||
101 | + | ||
102 | + </li> | ||
103 | + </ul> | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + <div class="fotter"> | ||
110 | + <ul> | ||
111 | + <li>商品分类</li> | ||
112 | + <li>品牌一览</li> | ||
113 | + <li>店铺简介</li> | ||
114 | + </ul> | ||
115 | + </div> | ||
116 | + </div> | ||
117 | + | ||
118 | + <ul id="pos-nav1" class="nav hide"> | ||
119 | + <li>首页</li> | ||
120 | + <li>上新</li> | ||
121 | + <li>人气</li> | ||
122 | + <li>全部商品</li> | ||
123 | + </ul> | ||
124 | + <ul id="pos-nav2" class="nav hide"> | ||
125 | + <li>最新</li> | ||
126 | + <li>价格</li> | ||
127 | + <li>折扣</li> | ||
128 | + <li>筛选</li> | ||
129 | + </ul> | ||
97 | </div> | 130 | </div> |
98 | {{/ shopIndex}} | 131 | {{/ shopIndex}} |
99 | {{> layout/footer}} | 132 | {{> layout/footer}} |
@@ -344,13 +344,13 @@ | @@ -344,13 +344,13 @@ | ||
344 | {{!-- 品牌分类 --}} | 344 | {{!-- 品牌分类 --}} |
345 | {{#if productCategoryPage}} | 345 | {{#if productCategoryPage}} |
346 | <script> | 346 | <script> |
347 | - seajs.use('js/prodcut/product-category'); | 347 | + seajs.use('js/product/product-category'); |
348 | </script> | 348 | </script> |
349 | {{/if}} | 349 | {{/if}} |
350 | 350 | ||
351 | {{!-- 品牌店铺首页 --}} | 351 | {{!-- 品牌店铺首页 --}} |
352 | -{{#if shop}} | 352 | +{{#if shopPage}} |
353 | <script> | 353 | <script> |
354 | - seajs.use('js/prodcut/shop'); | 354 | + seajs.use('js/product/shop'); |
355 | </script> | 355 | </script> |
356 | {{/if}} | 356 | {{/if}} |
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | <li class="filter"> | 26 | <li class="filter"> |
27 | <a href="javascript:void(0);"> | 27 | <a href="javascript:void(0);"> |
28 | <span class="spanTest">筛选</span> | 28 | <span class="spanTest">筛选</span> |
29 | - <span class="iconfont cur"></span> | 29 | + <span class="iconfont cur"></span> |
30 | </a> | 30 | </a> |
31 | </li> | 31 | </li> |
32 | </ul> | 32 | </ul> |
@@ -20,6 +20,7 @@ class ShopController extends AbstractAction | @@ -20,6 +20,7 @@ class ShopController extends AbstractAction | ||
20 | 20 | ||
21 | $data = array( | 21 | $data = array( |
22 | 'branner-top' => '', | 22 | 'branner-top' => '', |
23 | + 'goodList' => 'https://www.baidu.com', | ||
23 | 'coupon' => array( | 24 | 'coupon' => array( |
24 | array( | 25 | array( |
25 | 'couponType' => '' | 26 | 'couponType' => '' |
@@ -125,6 +126,84 @@ class ShopController extends AbstractAction | @@ -125,6 +126,84 @@ class ShopController extends AbstractAction | ||
125 | 'presentPrice' => '¥399' | 126 | 'presentPrice' => '¥399' |
126 | ) | 127 | ) |
127 | ), | 128 | ), |
129 | + 'newGood' => array( | ||
130 | + array( | ||
131 | + 'url' => 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html', | ||
132 | + 'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/12/07/09/01ced0e2ed6a4f2a6d95be70cd0a6c5a56.jpg?imageView/2/w/235/h/314', | ||
133 | + 'name' => 'NEFF ONE OF US RAGLAN L/S 男款森林风连帽卫衣', | ||
134 | + 'salePrice' => '759.00', | ||
135 | + 'price' => '799.00', | ||
136 | + 'tags' => array( | ||
137 | + 'is_new' => false, | ||
138 | + 'is_advance' => true, | ||
139 | + 'is_discount' => false, | ||
140 | + 'is_yohoood' => false, | ||
141 | + 'is_limited' => false | ||
142 | + ), | ||
143 | + 'is_soon_sold_out' => false | ||
144 | + ), | ||
145 | + array( | ||
146 | + 'url' => 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html', | ||
147 | + 'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/12/07/09/01ced0e2ed6a4f2a6d95be70cd0a6c5a56.jpg?imageView/2/w/235/h/314', | ||
148 | + 'name' => 'NEFF ONE OF US RAGLAN L/S 男款森林风连帽卫衣', | ||
149 | + 'salePrice' => '759.00', | ||
150 | + 'price' => '799.00', | ||
151 | + 'tags' => array( | ||
152 | + 'is_new' => true, | ||
153 | + 'is_advance' => false, | ||
154 | + 'is_discount' => false, | ||
155 | + 'is_yohoood' => false, | ||
156 | + 'is_limited' => false | ||
157 | + ), | ||
158 | + 'is_soon_sold_out' => false | ||
159 | + ), | ||
160 | + array( | ||
161 | + 'url' => 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html', | ||
162 | + 'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/12/07/09/01ced0e2ed6a4f2a6d95be70cd0a6c5a56.jpg?imageView/2/w/235/h/314', | ||
163 | + 'name' => 'NEFF ONE OF US RAGLAN L/S 男款森林风连帽卫衣', | ||
164 | + 'salePrice' => '759.00', | ||
165 | + 'price' => '799.00', | ||
166 | + 'tags' => array( | ||
167 | + 'is_new' => true, | ||
168 | + 'is_advance' => false, | ||
169 | + 'is_discount' => false, | ||
170 | + 'is_yohoood' => false, | ||
171 | + 'is_limited' => false | ||
172 | + ), | ||
173 | + 'is_soon_sold_out' => false | ||
174 | + ) | ||
175 | + | ||
176 | + ), | ||
177 | + 'popuGood' => array( | ||
178 | + array( | ||
179 | + 'url' => 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html', | ||
180 | + 'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/12/07/09/01ced0e2ed6a4f2a6d95be70cd0a6c5a56.jpg?imageView/2/w/235/h/314', | ||
181 | + 'name' => 'NEFF ONE OF US RAGLAN L/S 男款森林风连帽卫衣', | ||
182 | + 'salePrice' => '759.00', | ||
183 | + 'price' => '799.00', | ||
184 | + | ||
185 | + 'is_soon_sold_out' => false | ||
186 | + ), | ||
187 | + array( | ||
188 | + 'url' => 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html', | ||
189 | + 'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/12/07/09/01ced0e2ed6a4f2a6d95be70cd0a6c5a56.jpg?imageView/2/w/235/h/314', | ||
190 | + 'name' => 'NEFF ONE OF US RAGLAN L/S 男款森林风连帽卫衣', | ||
191 | + 'salePrice' => '759.00', | ||
192 | + 'price' => '799.00', | ||
193 | + | ||
194 | + 'is_soon_sold_out' => false | ||
195 | + ), | ||
196 | + array( | ||
197 | + 'url' => 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html', | ||
198 | + 'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/12/07/09/01ced0e2ed6a4f2a6d95be70cd0a6c5a56.jpg?imageView/2/w/235/h/314', | ||
199 | + 'name' => 'NEFF ONE OF US RAGLAN L/S 男款森林风连帽卫衣', | ||
200 | + 'salePrice' => '759.00', | ||
201 | + 'price' => '799.00', | ||
202 | + | ||
203 | + 'is_soon_sold_out' => false | ||
204 | + ) | ||
205 | + | ||
206 | + ), | ||
128 | 'goods' => array( | 207 | 'goods' => array( |
129 | array( | 208 | array( |
130 | 'url' => 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html', | 209 | 'url' => 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html', |
@@ -191,7 +270,7 @@ class ShopController extends AbstractAction | @@ -191,7 +270,7 @@ class ShopController extends AbstractAction | ||
191 | 270 | ||
192 | return $this->_view->display('index', array( | 271 | return $this->_view->display('index', array( |
193 | 'shopIndex' => $data, | 272 | 'shopIndex' => $data, |
194 | - 'shop' => true | 273 | + 'shopPage' => true |
195 | )); | 274 | )); |
196 | } | 275 | } |
197 | } | 276 | } |
-
Please register or login to post a comment