Authored by Rock Zhang

修复逛页面中的一些问题,包括逛详情页数据重复,图片错误的问题

@@ -108,14 +108,14 @@ @@ -108,14 +108,14 @@
108 {{/if}} 108 {{/if}}
109 109
110 {{!-- 新品到着 --}} 110 {{!-- 新品到着 --}}
111 -{{#if newArrival}} 111 +{{#if newArrivalPage}}
112 <script> 112 <script>
113 seajs.use('js/product/newsale/newarrival'); 113 seajs.use('js/product/newsale/newarrival');
114 </script> 114 </script>
115 {{/if}} 115 {{/if}}
116 116
117 {{!-- 折扣专区 --}} 117 {{!-- 折扣专区 --}}
118 -{{#if discount}} 118 +{{#if discountPage}}
119 <script> 119 <script>
120 seajs.use('js/product/newsale/discount'); 120 seajs.use('js/product/newsale/discount');
121 </script> 121 </script>
@@ -60,12 +60,10 @@ class DetailController extends AbstractAction @@ -60,12 +60,10 @@ class DetailController extends AbstractAction
60 // 文字 60 // 文字
61 if (isset($value['text'])) { 61 if (isset($value['text'])) {
62 $build['text'] = $value['text']['data']['text']; 62 $build['text'] = $value['text']['data']['text'];
63 - $data['detail']['content'][] = $build;  
64 } 63 }
65 // 单张图 64 // 单张图
66 elseif (isset($value['singleImage'])) { 65 elseif (isset($value['singleImage'])) {
67 $build['bigImage'] = Helpers::getImageUrl($value['singleImage']['data'][0]['src'], 640, 640); 66 $build['bigImage'] = Helpers::getImageUrl($value['singleImage']['data'][0]['src'], 640, 640);
68 - $data['detail']['content'][] = $build;  
69 } 67 }
70 // 相关推荐 68 // 相关推荐
71 elseif (isset($value['goods']['data'])) { 69 elseif (isset($value['goods']['data'])) {
@@ -142,6 +140,7 @@ class DetailController extends AbstractAction @@ -142,6 +140,7 @@ class DetailController extends AbstractAction
142 if (!empty($detail['getOtherArticle'])) { 140 if (!empty($detail['getOtherArticle'])) {
143 foreach ($detail['getOtherArticle'] as $value) { 141 foreach ($detail['getOtherArticle'] as $value) {
144 $value['url'] = '/guang/detail/index?id=' . $value['id']; 142 $value['url'] = '/guang/detail/index?id=' . $value['id'];
  143 + $value['thumb'] = Helpers::getImageUrl($value['thumb'], 279, 175);
145 $data['relatedInfo'][] = $value; 144 $data['relatedInfo'][] = $value;
146 } 145 }
147 } 146 }
@@ -79,7 +79,7 @@ class PlusstarController extends AbstractAction @@ -79,7 +79,7 @@ class PlusstarController extends AbstractAction
79 $data['ps']['likeUrl'] = false; //"http://guang.m.yohobuy.com/plustar/brandinfo?id=285&amp;openby:yohobuy={&quot;action&quot;:&quot;go.weblogin&quot;,&quot;params&quot;:{&quot;jumpurl&quot;:{&quot;url&quot;:&quot;http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo&quot;,&quot;param&quot;:{&quot;id&quot;:285}},&quot;requesturl&quot;:{&quot;url&quot;:&quot;\/guang\/api\/v1\/favorite\/togglebrand&quot;,&quot;param&quot;:{&quot;brand_id&quot;:&quot;701&quot;}},&quot;priority&quot;:&quot;Y&quot;}}"; 79 $data['ps']['likeUrl'] = false; //"http://guang.m.yohobuy.com/plustar/brandinfo?id=285&amp;openby:yohobuy={&quot;action&quot;:&quot;go.weblogin&quot;,&quot;params&quot;:{&quot;jumpurl&quot;:{&quot;url&quot;:&quot;http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo&quot;,&quot;param&quot;:{&quot;id&quot;:285}},&quot;requesturl&quot;:{&quot;url&quot;:&quot;\/guang\/api\/v1\/favorite\/togglebrand&quot;,&quot;param&quot;:{&quot;brand_id&quot;:&quot;701&quot;}},&quot;priority&quot;:&quot;Y&quot;}}";
80 $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? '' : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' ')); 80 $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? '' : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' '));
81 $data['ps']['newArrival'] = array(); 81 $data['ps']['newArrival'] = array();
82 - $data['ps']['newArrival']['moreUrl'] = ''; // @todo 品牌列表页面 82 + $data['ps']['newArrival']['moreUrl'] = '/product/list/brand?brand='.$id; // @todo 品牌列表页面
83 $data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct']; 83 $data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct'];
84 $data['ps']['infos'] = array(); 84 $data['ps']['infos'] = array();
85 85
@@ -24,7 +24,7 @@ class NewsaleController extends AbstractAction @@ -24,7 +24,7 @@ class NewsaleController extends AbstractAction
24 $this->channelTrans($channel); 24 $this->channelTrans($channel);
25 25
26 $data = array(); 26 $data = array();
27 - $data['newArrival'] = true; 27 + $data['newArrivalPage'] = true;
28 $data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel); 28 $data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel);
29 $goodsList = \Product\NewsaleModel::getNewProducts($channel, 60); 29 $goodsList = \Product\NewsaleModel::getNewProducts($channel, 60);
30 if (!empty($goodsList)) { 30 if (!empty($goodsList)) {
@@ -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['discountPage'] = 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)) {