Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Showing
13 changed files
with
67 additions
and
25 deletions
@@ -369,7 +369,7 @@ class AbstractAction extends Controller_Abstract | @@ -369,7 +369,7 @@ class AbstractAction extends Controller_Abstract | ||
369 | * @param string $homeUrl 返回首页的链接 | 369 | * @param string $homeUrl 返回首页的链接 |
370 | * @return void | 370 | * @return void |
371 | */ | 371 | */ |
372 | - protected function setNavHeader($title = '', $backUrl = true, $homeUrl = '/') | 372 | + protected function setNavHeader($title = '', $backUrl = true, $homeUrl = '/', $navBtn = false) |
373 | { | 373 | { |
374 | $header = array(); | 374 | $header = array(); |
375 | 375 | ||
@@ -387,6 +387,9 @@ class AbstractAction extends Controller_Abstract | @@ -387,6 +387,9 @@ class AbstractAction extends Controller_Abstract | ||
387 | if (!empty($homeUrl)) { | 387 | if (!empty($homeUrl)) { |
388 | $header['navHome'] = $homeUrl . '?go=1&t=' . time(); | 388 | $header['navHome'] = $homeUrl . '?go=1&t=' . time(); |
389 | } | 389 | } |
390 | + if ($navBtn) { | ||
391 | + $header['navBtn'] = true; | ||
392 | + } | ||
390 | 393 | ||
391 | $controller = $this->getRequest()->getControllerName(); | 394 | $controller = $this->getRequest()->getControllerName(); |
392 | if ($controller !== 'Home') { | 395 | if ($controller !== 'Home') { |
@@ -301,7 +301,7 @@ class FloorProcess | @@ -301,7 +301,7 @@ class FloorProcess | ||
301 | 301 | ||
302 | // 区别多张图与一张图 | 302 | // 区别多张图与一张图 |
303 | if (count($data['big_image']) > 1) { | 303 | if (count($data['big_image']) > 1) { |
304 | - $result['big_image']['list'] = $data['big_image']; | 304 | + $result['big_image']['big_list'] = $data['big_image']; |
305 | unset($data['big_image']); | 305 | unset($data['big_image']); |
306 | } | 306 | } |
307 | 307 |
@@ -131,6 +131,7 @@ $addressListPage.find('.address').each(function(i, elem) { | @@ -131,6 +131,7 @@ $addressListPage.find('.address').each(function(i, elem) { | ||
131 | $this.siblings().hide(); | 131 | $this.siblings().hide(); |
132 | $this.children('ul').show().children('li').show(); | 132 | $this.children('ul').show().children('li').show(); |
133 | 133 | ||
134 | + $(this).removeClass('highlight'); | ||
134 | e.srcEvent.preventDefault(); | 135 | e.srcEvent.preventDefault(); |
135 | e.srcEvent.stopPropagation(); | 136 | e.srcEvent.stopPropagation(); |
136 | }); | 137 | }); |
@@ -137,6 +137,7 @@ favTabHammer.on('tap', function(e) { | @@ -137,6 +137,7 @@ favTabHammer.on('tap', function(e) { | ||
137 | index = $cur.index(); | 137 | index = $cur.index(); |
138 | 138 | ||
139 | if (index === 0) { | 139 | if (index === 0) { |
140 | + brandTab = false; | ||
140 | if ($favProductList.find('li').length === 0 && | 141 | if ($favProductList.find('li').length === 0 && |
141 | $favProductList.closest('.fav-type').find('.fav-null-box').hasClass('hide')) { | 142 | $favProductList.closest('.fav-type').find('.fav-null-box').hasClass('hide')) { |
142 | loadData($favProductList, 'favProduct', 1); | 143 | loadData($favProductList, 'favProduct', 1); |
@@ -202,6 +203,11 @@ favContentHammer.on('tap', function(e) { | @@ -202,6 +203,11 @@ favContentHammer.on('tap', function(e) { | ||
202 | }).fail(function() { | 203 | }).fail(function() { |
203 | 204 | ||
204 | //TODO | 205 | //TODO |
206 | + | ||
207 | + diaLog.showDialog({ | ||
208 | + autoHide: true, | ||
209 | + dialogText: '网络错误~' | ||
210 | + }); | ||
205 | }); | 211 | }); |
206 | }); | 212 | }); |
207 | }); | 213 | }); |
@@ -129,7 +129,7 @@ orderHammer.on('tap', function(e) { | @@ -129,7 +129,7 @@ orderHammer.on('tap', function(e) { | ||
129 | if (data.code === 200) { | 129 | if (data.code === 200) { |
130 | 130 | ||
131 | //删除订单页面刷新 | 131 | //删除订单页面刷新 |
132 | - location.href = location.href; | 132 | + history.go(0); |
133 | } | 133 | } |
134 | } | 134 | } |
135 | }); | 135 | }); |
@@ -154,7 +154,7 @@ orderHammer.on('tap', function(e) { | @@ -154,7 +154,7 @@ orderHammer.on('tap', function(e) { | ||
154 | if (data.code === 200) { | 154 | if (data.code === 200) { |
155 | 155 | ||
156 | //取消订单页面刷新 | 156 | //取消订单页面刷新 |
157 | - location.href = location.href; | 157 | + history.go(0); |
158 | } | 158 | } |
159 | } | 159 | } |
160 | }); | 160 | }); |
@@ -126,6 +126,11 @@ $likeBtn.bind('click', function() { | @@ -126,6 +126,11 @@ $likeBtn.bind('click', function() { | ||
126 | }).fail(function(data) { | 126 | }).fail(function(data) { |
127 | 127 | ||
128 | //TODO | 128 | //TODO |
129 | + | ||
130 | + diaLog.showDialog({ | ||
131 | + autoHide: true, | ||
132 | + dialogText: '网络错误~' | ||
133 | + }); | ||
129 | }); | 134 | }); |
130 | }); | 135 | }); |
131 | 136 | ||
@@ -148,5 +153,10 @@ $disLikeBtn.bind('click', function() { | @@ -148,5 +153,10 @@ $disLikeBtn.bind('click', function() { | ||
148 | }).fail(function(data) { | 153 | }).fail(function(data) { |
149 | 154 | ||
150 | //TODO | 155 | //TODO |
156 | + | ||
157 | + diaLog.showDialog({ | ||
158 | + autoHide: true, | ||
159 | + dialogText: '网络错误~' | ||
160 | + }); | ||
151 | }); | 161 | }); |
152 | }); | 162 | }); |
@@ -126,6 +126,7 @@ | @@ -126,6 +126,7 @@ | ||
126 | 126 | ||
127 | .price-underline { | 127 | .price-underline { |
128 | text-decoration: line-through; | 128 | text-decoration: line-through; |
129 | + margin-left: pxToRem(15px); | ||
129 | } | 130 | } |
130 | } | 131 | } |
131 | 132 | ||
@@ -188,6 +189,11 @@ | @@ -188,6 +189,11 @@ | ||
188 | } | 189 | } |
189 | //品牌收藏 | 190 | //品牌收藏 |
190 | .fav-brand-swiper { | 191 | .fav-brand-swiper { |
192 | + border-bottom: 1px solid #ccc; | ||
193 | + | ||
194 | + &.none-border-bottom { | ||
195 | + border-bottom: none; | ||
196 | + } | ||
191 | 197 | ||
192 | .swiper-header { | 198 | .swiper-header { |
193 | height: pxToRem(100px); | 199 | height: pxToRem(100px); |
@@ -239,17 +245,26 @@ | @@ -239,17 +245,26 @@ | ||
239 | } | 245 | } |
240 | } | 246 | } |
241 | .fav-more { | 247 | .fav-more { |
242 | - $width: pxToRem(image_width(sprite-file($fav, fav-more))); | ||
243 | - $height: pxToRem(image_height(sprite-file($fav, fav-more))); | ||
244 | - | ||
245 | - @include rem-sprite($fav, fav-more); | ||
246 | - width: $width; | ||
247 | - height: $height; | ||
248 | - | 248 | + width: 2.5rem; |
249 | + height: 2.5rem; | ||
249 | position: absolute; | 250 | position: absolute; |
250 | - top: 50%; | ||
251 | - right: pxToRem(30px); | ||
252 | - margin-top: -$height / 2; | 251 | + top: 0; |
252 | + right: 0; | ||
253 | + | ||
254 | + &:after { | ||
255 | + $width: pxToRem(image_width(sprite-file($fav, fav-more))); | ||
256 | + $height: pxToRem(image_height(sprite-file($fav, fav-more))); | ||
257 | + | ||
258 | + @include rem-sprite($fav, fav-more); | ||
259 | + width: $width; | ||
260 | + height: $height; | ||
261 | + | ||
262 | + position: absolute; | ||
263 | + top: 50%; | ||
264 | + right: pxToRem(30px); | ||
265 | + margin-top: -$height / 2; | ||
266 | + content: ''; | ||
267 | + } | ||
253 | } | 268 | } |
254 | } | 269 | } |
255 | .swiper-container { | 270 | .swiper-container { |
@@ -39,10 +39,14 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | @@ -39,10 +39,14 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | ||
39 | border-top: 1px solid #e0e0e0; | 39 | border-top: 1px solid #e0e0e0; |
40 | border-bottom: pxToRem(30px) solid #f0f0f0; | 40 | border-bottom: pxToRem(30px) solid #f0f0f0; |
41 | 41 | ||
42 | - > img { | ||
43 | - display: block; | ||
44 | - overflow: hidden; | 42 | + .suggest-item-img { |
45 | width: 100%; | 43 | width: 100%; |
44 | + overflow: hidden; | ||
45 | + > img { | ||
46 | + display: block; | ||
47 | + overflow: hidden; | ||
48 | + width: 100%; | ||
49 | + } | ||
46 | } | 50 | } |
47 | 51 | ||
48 | > h2 { | 52 | > h2 { |
@@ -10,18 +10,20 @@ | @@ -10,18 +10,20 @@ | ||
10 | {{# suggestContent}} | 10 | {{# suggestContent}} |
11 | <div class="suggest-item" data-id="{{suggest_id}}"> | 11 | <div class="suggest-item" data-id="{{suggest_id}}"> |
12 | {{#if imgUrl}} | 12 | {{#if imgUrl}} |
13 | + <div class="suggest-item-img"> | ||
13 | <img class="lazy" data-original="{{imgUrl}}" alt=""/> | 14 | <img class="lazy" data-original="{{imgUrl}}" alt=""/> |
15 | + </div> | ||
14 | {{/if}} | 16 | {{/if}} |
15 | <h2>{{title}}</h2> | 17 | <h2>{{title}}</h2> |
16 | <p>{{content}}</p> | 18 | <p>{{content}}</p> |
17 | 19 | ||
18 | - <div class="suggest-type suggest-good"> | 20 | + <div class="suggest-type suggest-good {{#good}}show{{/good}}"> |
19 | <div class="active"> | 21 | <div class="active"> |
20 | <span class="iconfont"></span> | 22 | <span class="iconfont"></span> |
21 | <span>靠谱,谢谢您的反馈</span> | 23 | <span>靠谱,谢谢您的反馈</span> |
22 | </div> | 24 | </div> |
23 | </div> | 25 | </div> |
24 | - <div class="suggest-type suggest-bad"> | 26 | + <div class="suggest-type suggest-bad {{# bad}}show{{/ bad}}"> |
25 | <div class="active"> | 27 | <div class="active"> |
26 | <span class="iconfont"></span> | 28 | <span class="iconfont"></span> |
27 | <span>不靠谱,谢谢您的反馈</span> | 29 | <span>不靠谱,谢谢您的反馈</span> |
1 | {{# hasFavBrand}} | 1 | {{# hasFavBrand}} |
2 | -<div class="fav-brand-swiper"> | 2 | +<div class="fav-brand-swiper {{#if productList}}none-border-bottom{{/if}}"> |
3 | <div class="swiper-header"> | 3 | <div class="swiper-header"> |
4 | <div class="swiper-logo"> | 4 | <div class="swiper-logo"> |
5 | <img src="{{brandImg}}" alt=""/> | 5 | <img src="{{brandImg}}" alt=""/> |
@@ -17,6 +17,7 @@ | @@ -17,6 +17,7 @@ | ||
17 | </div> | 17 | </div> |
18 | <a class="fav-more" href="{{link}}"></a> | 18 | <a class="fav-more" href="{{link}}"></a> |
19 | </div> | 19 | </div> |
20 | + {{#if productList}} | ||
20 | <div id="swiper-container-{{id}}" class="swiper-container" data-id="{{id}}"> | 21 | <div id="swiper-container-{{id}}" class="swiper-container" data-id="{{id}}"> |
21 | <ul class="swiper-wrapper swiper-wrapper-{{id}}"> | 22 | <ul class="swiper-wrapper swiper-wrapper-{{id}}"> |
22 | {{# productList}} | 23 | {{# productList}} |
@@ -33,5 +34,6 @@ | @@ -33,5 +34,6 @@ | ||
33 | {{/ productList}} | 34 | {{/ productList}} |
34 | </ul> | 35 | </ul> |
35 | </div> | 36 | </div> |
37 | + {{/if}} | ||
36 | </div> | 38 | </div> |
37 | {{/ hasFavBrand}} | 39 | {{/ hasFavBrand}} |
1 | {{> home/floor_header_more}} | 1 | {{> home/floor_header_more}} |
2 | <div class="goods-category"> | 2 | <div class="goods-category"> |
3 | {{# big_image}} | 3 | {{# big_image}} |
4 | - {{#if list}} | 4 | + {{#if big_list}} |
5 | <div class="category-swiper"> | 5 | <div class="category-swiper"> |
6 | <ul class="swiper-wrapper"> | 6 | <ul class="swiper-wrapper"> |
7 | - {{# list}} | 7 | + {{# big_list}} |
8 | <li class="swiper-slide"> | 8 | <li class="swiper-slide"> |
9 | <a href="{{url}}"> | 9 | <a href="{{url}}"> |
10 | <img class="lazy" data-original="{{img}}" alt="{{title}}"> | 10 | <img class="lazy" data-original="{{img}}" alt="{{title}}"> |
11 | </a> | 11 | </a> |
12 | </li> | 12 | </li> |
13 | - {{/ list}} | 13 | + {{/ big_list}} |
14 | </ul> | 14 | </ul> |
15 | <div class="swiper-pagination"> | 15 | <div class="swiper-pagination"> |
16 | <div class="pagination-inner clearfix"> | 16 | <div class="pagination-inner clearfix"> |
@@ -52,7 +52,7 @@ class BrandModel | @@ -52,7 +52,7 @@ class BrandModel | ||
52 | $brand = BrandData::package(self::CODE_TOPPOS_LIFESTYLE, 4); | 52 | $brand = BrandData::package(self::CODE_TOPPOS_LIFESTYLE, 4); |
53 | break; | 53 | break; |
54 | } | 54 | } |
55 | - var_dump($brand); exit; | 55 | + |
56 | // 模板中的使用JS标识 | 56 | // 模板中的使用JS标识 |
57 | $result['brandPage'] = true; | 57 | $result['brandPage'] = true; |
58 | // 是否显示app下载浮层标识 | 58 | // 是否显示app下载浮层标识 |
@@ -41,7 +41,6 @@ class BrandController extends AbstractAction | @@ -41,7 +41,6 @@ class BrandController extends AbstractAction | ||
41 | } | 41 | } |
42 | 42 | ||
43 | // 渲染模板 | 43 | // 渲染模板 |
44 | - print_r(Category\BrandModel::getBrandByChannel($channel)); | ||
45 | $this->_view->display('index', Category\BrandModel::getBrandByChannel($channel)); | 44 | $this->_view->display('index', Category\BrandModel::getBrandByChannel($channel)); |
46 | } | 45 | } |
47 | 46 |
-
Please register or login to post a comment