Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
10 changed files
with
36 additions
and
17 deletions
@@ -25,7 +25,6 @@ var end = false, | @@ -25,7 +25,6 @@ var end = false, | ||
25 | var winH = $(window).height(); | 25 | var winH = $(window).height(); |
26 | 26 | ||
27 | load.init(); | 27 | load.init(); |
28 | - | ||
29 | function moreRecord(cb) { | 28 | function moreRecord(cb) { |
30 | var count = $page.children('.browse-record-good').length; | 29 | var count = $page.children('.browse-record-good').length; |
31 | 30 | ||
@@ -61,7 +60,7 @@ function moreRecord(cb) { | @@ -61,7 +60,7 @@ function moreRecord(cb) { | ||
61 | 60 | ||
62 | lazyLoad($page.find('.browse-record-good:gt(' + (count - 1) + ') .lazy')); | 61 | lazyLoad($page.find('.browse-record-good:gt(' + (count - 1) + ') .lazy')); |
63 | } | 62 | } |
64 | - | 63 | + window.rePosFooter(); |
65 | page++; | 64 | page++; |
66 | 65 | ||
67 | if (cb) { | 66 | if (cb) { |
@@ -99,6 +98,7 @@ $page.on('touchstart', '.del-icon', function() { | @@ -99,6 +98,7 @@ $page.on('touchstart', '.del-icon', function() { | ||
99 | rightBtnText: '确定' | 98 | rightBtnText: '确定' |
100 | } | 99 | } |
101 | }, function() { | 100 | }, function() { |
101 | + | ||
102 | $.ajax({ | 102 | $.ajax({ |
103 | type: 'GET', | 103 | type: 'GET', |
104 | url: '/home/delRecord', | 104 | url: '/home/delRecord', |
@@ -107,7 +107,12 @@ $page.on('touchstart', '.del-icon', function() { | @@ -107,7 +107,12 @@ $page.on('touchstart', '.del-icon', function() { | ||
107 | }, | 107 | }, |
108 | success: function(data) { | 108 | success: function(data) { |
109 | if (data.code === 200) { | 109 | if (data.code === 200) { |
110 | - window.history.go(0); | 110 | + dialog.showDialog({ |
111 | + dialogText: '删除浏览记录成功', | ||
112 | + autoHide: true, | ||
113 | + fast: true | ||
114 | + }); | ||
115 | + setTimeout(function(){window.history.go(0);},1000); | ||
111 | } | 116 | } |
112 | }, | 117 | }, |
113 | complete: function() { | 118 | complete: function() { |
@@ -119,7 +119,8 @@ $likeBtn.bind('click', function() { | @@ -119,7 +119,8 @@ $likeBtn.bind('click', function() { | ||
119 | method: 'post', | 119 | method: 'post', |
120 | url: '/home/upAndDown', | 120 | url: '/home/upAndDown', |
121 | data: { | 121 | data: { |
122 | - suggest_id: id | 122 | + suggest_id: id, |
123 | + reliable: 1 | ||
123 | } | 124 | } |
124 | }).then(function(data) { | 125 | }).then(function(data) { |
125 | if (data.code === 200) { | 126 | if (data.code === 200) { |
@@ -146,7 +147,8 @@ $disLikeBtn.bind('click', function() { | @@ -146,7 +147,8 @@ $disLikeBtn.bind('click', function() { | ||
146 | method: 'post', | 147 | method: 'post', |
147 | url: '/home/upAndDown', | 148 | url: '/home/upAndDown', |
148 | data: { | 149 | data: { |
149 | - suggest_id: id | 150 | + suggest_id: id, |
151 | + reliable: 2 | ||
150 | } | 152 | } |
151 | }).then(function(data) { | 153 | }).then(function(data) { |
152 | if (data.code === 200) { | 154 | if (data.code === 200) { |
@@ -97,8 +97,7 @@ a { | @@ -97,8 +97,7 @@ a { | ||
97 | left: 50%; | 97 | left: 50%; |
98 | margin-left: -35%; | 98 | margin-left: -35%; |
99 | margin-top: -45px; | 99 | margin-top: -45px; |
100 | - background-color: #000; | ||
101 | - opacity: 0.7; | 100 | + background-color: rgba(0,0,0,.7); |
102 | color: #fff; | 101 | color: #fff; |
103 | font-size: 18px; | 102 | font-size: 18px; |
104 | border: none; | 103 | border: none; |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="discount-page yoho-page"> | 2 | <div class="discount-page yoho-page"> |
3 | {{# headerBanner}} | 3 | {{# headerBanner}} |
4 | - {{> product/banner_swipe_and_single}} | 4 | + {{> product/banner-swipe-and-single}} |
5 | {{/ headerBanner}} | 5 | {{/ headerBanner}} |
6 | <div id="hotRank"></div> | 6 | <div id="hotRank"></div> |
7 | {{#if brand}} | 7 | {{#if brand}} |
@@ -181,7 +181,8 @@ class HomeController extends AbstractAction | @@ -181,7 +181,8 @@ class HomeController extends AbstractAction | ||
181 | $this->setNavHeader('浏览记录', true, SITE_MAIN); | 181 | $this->setNavHeader('浏览记录', true, SITE_MAIN); |
182 | 182 | ||
183 | $this->_view->display('browse-record', array( | 183 | $this->_view->display('browse-record', array( |
184 | - 'browseRecordPage' => true | 184 | + 'browseRecordPage' => true, |
185 | + 'pageFooter' => true | ||
185 | )); | 186 | )); |
186 | } | 187 | } |
187 | 188 |
@@ -84,6 +84,18 @@ class BrandModel | @@ -84,6 +84,18 @@ class BrandModel | ||
84 | $result['bannerTop']['list'][] = $build; | 84 | $result['bannerTop']['list'][] = $build; |
85 | } | 85 | } |
86 | } | 86 | } |
87 | + // 顶部的轮翻广告列表 | ||
88 | + elseif (!empty($brand['brandTop']['list'][0]['data'])) { | ||
89 | + $build = array(); | ||
90 | + foreach ($brand['brandTop']['list'][0]['data'] as $value) { | ||
91 | + if (isset($value['url'])) { | ||
92 | + $build['url'] = Helpers::getFilterUrl($value['url']); | ||
93 | + } | ||
94 | + $build['img'] = Helpers::getImageUrl($value['src'], 640, 310); | ||
95 | + $build['title'] = $value['title']; | ||
96 | + $result['bannerTop']['list'][] = $build; | ||
97 | + } | ||
98 | + } | ||
87 | 99 | ||
88 | /* 顶部的热门品牌列表 (备注: 当没有轮翻广告的时候,此处内部的foreach不会被执行) */ | 100 | /* 顶部的热门品牌列表 (备注: 当没有轮翻广告的时候,此处内部的foreach不会被执行) */ |
89 | if (!empty($brand['brandTop'][1]['data']['list'])) { | 101 | if (!empty($brand['brandTop'][1]['data']['list'])) { |
@@ -98,8 +98,8 @@ class HomeModel | @@ -98,8 +98,8 @@ class HomeModel | ||
98 | 98 | ||
99 | // 调用接口获取数据 | 99 | // 调用接口获取数据 |
100 | $banner = IndexData::getBannerStart(self::CODE_BG); | 100 | $banner = IndexData::getBannerStart(self::CODE_BG); |
101 | - if (isset($banner['data'][0]['data']['list'][0]['src'])) { | ||
102 | - $result = Helpers::getImageUrl($banner['data'][0]['data']['list'][0]['src'], 640, 800, 2); | 101 | + if (isset($banner['code']) && $banner['code'] == 200 && $banner['data']['total'] > 0) { |
102 | + $result = Helpers::getImageUrl($banner['data']['list'][0]['data']['list'][0]['src'], 640, 800, 2); | ||
103 | } | 103 | } |
104 | 104 | ||
105 | if (USE_CACHE) { | 105 | if (USE_CACHE) { |
@@ -302,7 +302,7 @@ class UserModel | @@ -302,7 +302,7 @@ class UserModel | ||
302 | $data = $records['data']['product_list']; | 302 | $data = $records['data']['product_list']; |
303 | foreach ($data as &$val) { | 303 | foreach ($data as &$val) { |
304 | $val['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : ''; | 304 | $val['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : ''; |
305 | - $val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 140, 140) : ''; | 305 | + $val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : ''; |
306 | $val['sales_price'] = !empty($val['sales_price']) ? $val['sales_price'] . '.00' : 0; | 306 | $val['sales_price'] = !empty($val['sales_price']) ? $val['sales_price'] . '.00' : 0; |
307 | $val['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? $val['market_price'] . '.00' : false; | 307 | $val['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? $val['market_price'] . '.00' : false; |
308 | } | 308 | } |
@@ -184,12 +184,12 @@ class NewsaleModel | @@ -184,12 +184,12 @@ class NewsaleModel | ||
184 | $newsale = NewsaleData::getNewsaleFocus($codeKey); | 184 | $newsale = NewsaleData::getNewsaleFocus($codeKey); |
185 | 185 | ||
186 | // 调用接口获取数据并封装 | 186 | // 调用接口获取数据并封装 |
187 | - if (isset($newsale['code']) && isset($newsale['data']['list'])) { | ||
188 | - if(count($newsale['data']['list']) === 1) { | 187 | + if (isset($newsale['code']) && isset($newsale['data']['list']) && !empty($newsale['data']['list'])) { |
188 | + if(count($newsale['data']['list'][0]['data']) === 1) { | ||
189 | $result = Helpers::formatBanner($newsale['data']['list'][0]['data'][0], 640, 240); | 189 | $result = Helpers::formatBanner($newsale['data']['list'][0]['data'][0], 640, 240); |
190 | } else { | 190 | } else { |
191 | - foreach ($newsale['data']['list'] as $one) { | ||
192 | - $result['list'][] = Helpers::formatBanner($one['data'], 640, 240); | 191 | + foreach ($newsale['data']['list'][0]['data'] as $one) { |
192 | + $result['list'][] = Helpers::formatBanner($one, 640, 240); | ||
193 | } | 193 | } |
194 | } | 194 | } |
195 | } | 195 | } |
-
Please register or login to post a comment