Authored by Rock Zhang

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

... ... @@ -108,14 +108,14 @@
{{/if}}
{{!-- 新品到着 --}}
{{#if newArrival}}
{{#if newArrivalPage}}
<script>
seajs.use('js/product/newsale/newarrival');
</script>
{{/if}}
{{!-- 折扣专区 --}}
{{#if discount}}
{{#if discountPage}}
<script>
seajs.use('js/product/newsale/discount');
</script>
... ...
... ... @@ -60,12 +60,10 @@ class DetailController extends AbstractAction
// 文字
if (isset($value['text'])) {
$build['text'] = $value['text']['data']['text'];
$data['detail']['content'][] = $build;
}
// 单张图
elseif (isset($value['singleImage'])) {
$build['bigImage'] = Helpers::getImageUrl($value['singleImage']['data'][0]['src'], 640, 640);
$data['detail']['content'][] = $build;
}
// 相关推荐
elseif (isset($value['goods']['data'])) {
... ... @@ -142,6 +140,7 @@ class DetailController extends AbstractAction
if (!empty($detail['getOtherArticle'])) {
foreach ($detail['getOtherArticle'] as $value) {
$value['url'] = '/guang/detail/index?id=' . $value['id'];
$value['thumb'] = Helpers::getImageUrl($value['thumb'], 279, 175);
$data['relatedInfo'][] = $value;
}
}
... ...
... ... @@ -79,7 +79,7 @@ class PlusstarController extends AbstractAction
$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;}}";
$data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? '' : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' '));
$data['ps']['newArrival'] = array();
$data['ps']['newArrival']['moreUrl'] = ''; // @todo 品牌列表页面
$data['ps']['newArrival']['moreUrl'] = '/product/list/brand?brand='.$id; // @todo 品牌列表页面
$data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct'];
$data['ps']['infos'] = array();
... ...
... ... @@ -24,7 +24,7 @@ class NewsaleController extends AbstractAction
$this->channelTrans($channel);
$data = array();
$data['newArrival'] = true;
$data['newArrivalPage'] = true;
$data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel);
$goodsList = \Product\NewsaleModel::getNewProducts($channel, 60);
if (!empty($goodsList)) {
... ... @@ -58,6 +58,7 @@ class NewsaleController extends AbstractAction
$this->channelTrans($channel);
$data = array();
$data['discountPage'] = true;
$data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel);
$goodsList = \Product\NewsaleModel::getSaleProducts($channel, 60);
if (!empty($goodsList)) {
... ...