Authored by 郝肖肖

获取店铺信息 判断是否是基础模板

... ... @@ -695,7 +695,7 @@ class ShopModel
public static function getIntro($shopId, $uid)
{
$data = array('brandName' => '', 'brandCont' => '', 'domain'=> '', 'logo'=> '', 'is_favorite'=> false);
$data = array('brandName' => '', 'brandCont' => '', 'domain'=> '', 'logo'=> '', 'is_favorite'=> false, 'multBrandShopType' => 0);
$intro = ShopData::getIntro($shopId, $uid);
... ... @@ -706,7 +706,7 @@ class ShopModel
'domain'=> $intro['data']['shop_domain'],
'logo'=> $intro['data']['shop_logo'],
'isFavorite'=> ($intro['data']['is_favorite'] === 'Y'),
'multBrandShopType'=> $intro['data']['mult_brand_shop_type']
'multBrandShopType'=> intval($intro['data']['mult_brand_shop_type'])
);
}
... ...
... ... @@ -27,7 +27,11 @@ class IndexController extends WebAction
if (!$result) {
$this->go(SITE_MAIN);
}
//获取uid
$uid = $this->getUid();
$type = intval(isset($result['type']) ? $result['type'] : '');
switch ($type) {
case 1:
... ... @@ -36,6 +40,13 @@ class IndexController extends WebAction
//无单品店有多品店:1--->搜索页
$this->go('http://search.yohobuy.com/?query=' . $domain);
} else {
$shopIntro = ShopModel::getIntro($shopId, $uid);
if (!empty($shopIntro['multBrandShopType']) && $shopIntro['multBrandShopType'] === 1) {
//基础模板多个品牌
$result['shopTemplateType'] = $shopIntro['multBrandShopType'];
$result['shopId'] = $shopIntro['shopId'];
break;
}
$this->shopHome($shopId);
}
exit(0);
... ... @@ -47,21 +58,19 @@ class IndexController extends WebAction
$this->shopHome($result['shopId']);
exit(0);
}
//基础模板
if ($result['shopTemplateType'] === 1 && !empty($result['shopId'])) {
$basisData = ShopModel::basisTemplate($result['shopId']);
$result['brandBanner'] = empty($basisData['shopTopBanner_base']['banner']) ?
$result['brandBanner'] : $basisData['shopTopBanner_base']['banner'] . '?';
$result['signboard'] = $basisData['signboard'];
if (isset($result['node'])) {
unset($result['node']);
}
}
break;
}
//获取uid
$uid = $this->getUid();
//基础模板
if (!empty($result['shopTemplateType']) && $result['shopTemplateType'] === 1 && !empty($result['shopId'])) {
$basisData = ShopModel::basisTemplate($result['shopId']);
$result['brandBanner'] = empty($basisData['shopTopBanner_base']['banner']) ?
$result['brandBanner'] : $basisData['shopTopBanner_base']['banner'] . '?';
$result['signboard'] = $basisData['signboard'];
if (isset($result['node'])) {
unset($result['node']);
}
}
//传品牌ID参数
$condition = array();
... ...