Authored by Rock Zhang

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

... ... @@ -36,13 +36,13 @@ class Helpers
// 市场价和售价一样,则不显示市场价
if (intval($productData['market_price']) === intval($productData['sales_price'])) {
$productData['market_price'] = '';
$productData['market_price'] = false;
}
$result = array();
$result['id'] = $productData['product_skn'];
$result['product_id'] = $productData['product_id'];
$result['thumb'] = $productData['default_images'];
$result['thumb'] = Helpers::getImageUrl($productData['default_images'], 235, 314);
$result['name'] = $productData['product_name'];
$result['price'] = $productData['market_price'];
$result['salePrice'] = $productData['sales_price'];
... ...
... ... @@ -4,7 +4,7 @@
seajs.config({
base: 'http://172.16.6.248:8000'
});
seajs.use('js/{{modulePath}}');
</script>
{{> layout/use}}
</body>
</html>
\ No newline at end of file
... ...
{{#if psList}}
<script>
seajs.use('js/guang/plus-star/list');
</script>
{{else if psDetail}}
<script>
seajs.use('js/guang/plus-star/detail');
</script>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -17,7 +17,7 @@ class PlusstarController extends AbstractAction
*/
public function listAction()
{
$data = array('ps' => array('star' => array(), 'plus' => array()));
$data = array('psList' => true, 'ps' => array('star' => array(), 'plus' => array()));
$brandList = array();
$build = array();
... ... @@ -108,22 +108,48 @@ class PlusstarController extends AbstractAction
}
/* 判断品牌信息是否为空 */
$brandInfo = PlusstarData::brandInfo($id, $gender, $uid, $udid); var_dump($brandInfo); exit;
$brandInfo = PlusstarData::brandInfo($id, $gender, $uid, $udid);
if (empty($brandInfo['getBrandInfo']['brand_id'])) {
break;
}
$data['id'] = $brandInfo['getBrandInfo']['brand_id'];
$data['banner'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['cover_img'], 640, 309);
$data['logo'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['brand_ico'], 160, 160);
$data['name'] = $brandInfo['getBrandInfo']['name'];
$data['isLike'] = $brandInfo['getUidBrandFav'];
$data['likeUrl'] = "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['intro'] = empty($brandInfo['brand_intro']) ? '' : strip_tags($brandInfo['brand_intro']);
$data['newArrival'] = array();
$data['newArrival']['moreUrl'] = ''; // @todo
$data['newArrival']['naList'] = $brandInfo['getNewProduct'];
$data['infos'] = array();
$data['psDetail'] = true;
$data['ps']['id'] = $brandInfo['getBrandInfo']['brand_id'];
$data['ps']['banner'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['cover_img'], 640, 309);
$data['ps']['logo'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['brand_ico'], 160, 160);
$data['ps']['name'] = $brandInfo['getBrandInfo']['brand_name'];
$data['ps']['isLike'] = $brandInfo['getUidBrandFav'];
$data['ps']['likeUrl'] = "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['brand_intro']) ? '' : strip_tags($brandInfo['brand_intro']);
$data['ps']['newArrival'] = array();
$data['ps']['newArrival']['moreUrl'] = ''; // @todo
$data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct'];
$data['ps']['infos'] = array();
if (empty($brandInfo['getArticleByBrand'])) {
break;
}
// 相关文章
$build = array();
foreach ($brandInfo['getArticleByBrand'] as $value) {
$build = array();
$build['id'] = $value['id'];
$build['showTags'] = false; // 不显示标签
$build['img'] = Helpers::getImageUrl($value['src'], 640, 640, $value['cover_image_type']);
$build['url'] = $value['url']; // @todo
$build['title'] = $value['title'];
$build['text'] = $value['intro'];
$build['publishTime'] = $value['publish_time'];
$build['pageView'] = $value['views_num'];
$build['like'] = array();
$build['like']['isLiked'] = $value['like']['isLiked'];
$build['like']['count'] = $value['like']['count'];
$build['share'] = ''; //分享链接
$build['author'] = false; // 作者信息(接口暂未上线)
$data['ps']['infos'][] = $build;
}
$brandInfo = array();
... ...