...
|
...
|
@@ -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&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo","param":{"id":285}},"requesturl":{"url":"\/guang\/api\/v1\/favorite\/togglebrand","param":{"brand_id":"701"}},"priority":"Y"}}";
|
|
|
$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&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo","param":{"id":285}},"requesturl":{"url":"\/guang\/api\/v1\/favorite\/togglebrand","param":{"brand_id":"701"}},"priority":"Y"}}";
|
|
|
$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();
|
|
|
|
...
|
...
|
|