Merge branch 'develop/wap' into beta/wap
Showing
7 changed files
with
52 additions
and
8 deletions
@@ -79,6 +79,8 @@ function loadData($parent, url, page) { | @@ -79,6 +79,8 @@ function loadData($parent, url, page) { | ||
79 | page: page | 79 | page: page |
80 | }, | 80 | }, |
81 | success: function(data) { | 81 | success: function(data) { |
82 | + var $loadingMask = $parent.closest('.fav-type').find('.fav-content-loading'); | ||
83 | + | ||
82 | if (url === 'favBrand') { | 84 | if (url === 'favBrand') { |
83 | $brandLoadMore.addClass('hide'); | 85 | $brandLoadMore.addClass('hide'); |
84 | } else { | 86 | } else { |
@@ -86,9 +88,16 @@ function loadData($parent, url, page) { | @@ -86,9 +88,16 @@ function loadData($parent, url, page) { | ||
86 | } | 88 | } |
87 | 89 | ||
88 | if (data === ' ') { | 90 | if (data === ' ') { |
89 | - $parent.closest('.fav-type').find('.fav-content-loading').addClass('hide'); | 91 | + $loadingMask.addClass('hide'); |
90 | $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide'); | 92 | $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide'); |
91 | } else if (data === 'end') { | 93 | } else if (data === 'end') { |
94 | + | ||
95 | + //处理data等于end时如果loadingMask存在且没有hide样式的情况 | ||
96 | + if ($loadingMask && !$loadingMask.hasClass('hide')) { | ||
97 | + $loadingMask.addClass('hide'); | ||
98 | + $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide'); | ||
99 | + } | ||
100 | + | ||
92 | $parent.closest('.fav-type').find('.fav-load-background') | 101 | $parent.closest('.fav-type').find('.fav-load-background') |
93 | .removeClass('fav-load-background').html('没有更多了'); | 102 | .removeClass('fav-load-background').html('没有更多了'); |
94 | 103 | ||
@@ -97,7 +106,9 @@ function loadData($parent, url, page) { | @@ -97,7 +106,9 @@ function loadData($parent, url, page) { | ||
97 | lockId = true; | 106 | lockId = true; |
98 | } else if (data.length > 10) { | 107 | } else if (data.length > 10) { |
99 | $parent.append(data); | 108 | $parent.append(data); |
100 | - $parent.closest('.fav-type').find('.fav-content-loading').remove(); | 109 | + |
110 | + //如果有数据loadingMask会被remove掉 | ||
111 | + $loadingMask.remove(); | ||
101 | if (url === 'favBrand') { | 112 | if (url === 'favBrand') { |
102 | initSwiper(data);//如果是收藏品牌需要初始化swiper | 113 | initSwiper(data);//如果是收藏品牌需要初始化swiper |
103 | 114 |
@@ -332,6 +332,22 @@ $clothes: sprite-map("guang/clothes/*.png"); | @@ -332,6 +332,22 @@ $clothes: sprite-map("guang/clothes/*.png"); | ||
332 | } | 332 | } |
333 | } | 333 | } |
334 | 334 | ||
335 | + .link-block { | ||
336 | + display: block; | ||
337 | + height: 80rem / $pxConvertRem; | ||
338 | + line-height: 80rem / $pxConvertRem; | ||
339 | + padding: 0 30rem / $pxConvertRem; | ||
340 | + font-size: 16px; | ||
341 | + background: #fff; | ||
342 | + border-top: 1px solid #e0e0e0; | ||
343 | + border-bottom: 1px solid #e0e0e0; | ||
344 | + | ||
345 | + .iconfont { | ||
346 | + float: right; | ||
347 | + color: #ccc; | ||
348 | + } | ||
349 | + } | ||
350 | + | ||
335 | .related-brand { | 351 | .related-brand { |
336 | margin-top: 30rem / $pxConvertRem; | 352 | margin-top: 30rem / $pxConvertRem; |
337 | 353 |
@@ -63,6 +63,13 @@ | @@ -63,6 +63,13 @@ | ||
63 | </div> | 63 | </div> |
64 | {{/if}} | 64 | {{/if}} |
65 | 65 | ||
66 | + {{#if moreLink}} | ||
67 | + <a class="post-block link-block" href="{{moreLink}}"> | ||
68 | + 更多商品 | ||
69 | + <span class="iconfont"></span> | ||
70 | + </a> | ||
71 | + {{/if}} | ||
72 | + | ||
66 | {{#if relatedReco}} | 73 | {{#if relatedReco}} |
67 | <div class="post-block related-reco-block clearfix"> | 74 | <div class="post-block related-reco-block clearfix"> |
68 | <h2>相关推荐</h2> | 75 | <h2>相关推荐</h2> |
@@ -375,7 +375,7 @@ class IndexController extends AbstractAction | @@ -375,7 +375,7 @@ class IndexController extends AbstractAction | ||
375 | 375 | ||
376 | // 设置网站标题 | 376 | // 设置网站标题 |
377 | $this->setTitle('选择地址'); | 377 | $this->setTitle('选择地址'); |
378 | - $this->setNavHeader('选择地址', Helpers::url('/cart/index/orderEnsure')); | 378 | + $this->setNavHeader('选择地址', Helpers::url('/cart/index/orderEnsure'), false); |
379 | 379 | ||
380 | $uid = $this->getUid(true); | 380 | $uid = $this->getUid(true); |
381 | $address = UserModel::getAddressData($uid); | 381 | $address = UserModel::getAddressData($uid); |
@@ -397,7 +397,7 @@ class IndexController extends AbstractAction | @@ -397,7 +397,7 @@ class IndexController extends AbstractAction | ||
397 | 397 | ||
398 | // 设置网站标题 | 398 | // 设置网站标题 |
399 | $this->setTitle('选择优惠券'); | 399 | $this->setTitle('选择优惠券'); |
400 | - $this->setNavHeader('选择优惠券', Helpers::url('/cart/index/orderEnsure')); | 400 | + $this->setNavHeader('选择优惠券', Helpers::url('/cart/index/orderEnsure'), false); |
401 | 401 | ||
402 | $this->_view->display('select-coupon', array( | 402 | $this->_view->display('select-coupon', array( |
403 | 'selectCouponPage' => true, | 403 | 'selectCouponPage' => true, |
@@ -410,8 +410,6 @@ class IndexController extends AbstractAction | @@ -410,8 +410,6 @@ class IndexController extends AbstractAction | ||
410 | */ | 410 | */ |
411 | public function orderSubAction() | 411 | public function orderSubAction() |
412 | { | 412 | { |
413 | - $result = array(); | ||
414 | - | ||
415 | if ($this->isAjax()) { | 413 | if ($this->isAjax()) { |
416 | $uid = $this->getUid(true); | 414 | $uid = $this->getUid(true); |
417 | $addressId = $this->post('addressId', null); | 415 | $addressId = $this->post('addressId', null); |
@@ -18,7 +18,7 @@ class BrandController extends AbstractAction | @@ -18,7 +18,7 @@ class BrandController extends AbstractAction | ||
18 | public function indexAction() | 18 | public function indexAction() |
19 | { | 19 | { |
20 | $this->setTitle('品牌一览'); | 20 | $this->setTitle('品牌一览'); |
21 | - $this->setNavHeader('品牌一览', '/boys?go=1&t=' . time()); | 21 | + $this->setNavHeader('品牌一览', '/boys?go=1&t=' . time(), false); |
22 | 22 | ||
23 | /* 判断参数是否有效 */ | 23 | /* 判断参数是否有效 */ |
24 | $channel = null; | 24 | $channel = null; |
@@ -146,6 +146,10 @@ class InfoController extends AbstractAction | @@ -146,6 +146,10 @@ class InfoController extends AbstractAction | ||
146 | } | 146 | } |
147 | } | 147 | } |
148 | } | 148 | } |
149 | + // 更多商品链接 | ||
150 | + elseif (isset($value['link'])) { | ||
151 | + $build['moreLink'] = $value['link']['data'][0]['url']; | ||
152 | + } | ||
149 | 153 | ||
150 | $data['detail']['content'][] = $build; | 154 | $data['detail']['content'][] = $build; |
151 | } | 155 | } |
@@ -313,6 +317,10 @@ class InfoController extends AbstractAction | @@ -313,6 +317,10 @@ class InfoController extends AbstractAction | ||
313 | } | 317 | } |
314 | } | 318 | } |
315 | } | 319 | } |
320 | + // 更多商品链接 | ||
321 | + elseif (isset($value['link'])) { | ||
322 | + $build['moreLink'] = $value['link']['data'][0]['url']; | ||
323 | + } | ||
316 | 324 | ||
317 | $data['detail']['content'][] = $build; | 325 | $data['detail']['content'][] = $build; |
318 | } | 326 | } |
@@ -445,6 +453,10 @@ class InfoController extends AbstractAction | @@ -445,6 +453,10 @@ class InfoController extends AbstractAction | ||
445 | } | 453 | } |
446 | } | 454 | } |
447 | } | 455 | } |
456 | + // 更多商品链接 | ||
457 | + elseif (isset($value['link'])) { | ||
458 | + $build['moreLink'] = $value['link']['data'][0]['url']; | ||
459 | + } | ||
448 | 460 | ||
449 | // 内容详情 | 461 | // 内容详情 |
450 | if (array() !== $build) { | 462 | if (array() !== $build) { |
-
Please register or login to post a comment