Authored by 郝肖肖

店铺装修 基础模板banner

... ... @@ -17,6 +17,8 @@
.brand-banner {
position: relative;
height: 150px;
overflow: hidden;
.opt-wrap {
position: absolute;
... ...
... ... @@ -208,8 +208,8 @@ class ItemModel
case 2:
//单品店显示新版的店铺banner
$basisData = ShopModel::basisTemplate($domainBrand['shopId']);
$banner['bgImg'] = empty($basisData['shopTopBanner']['banner']) ?
$banner['bgImg'] : $basisData['shopTopBanner']['banner'];
$banner['bgImg'] = empty($basisData['shopTopBanner_base']['banner']) ?
$banner['bgImg'] : $basisData['shopTopBanner_base']['banner'];
break;
}
}
... ...
... ... @@ -220,7 +220,7 @@ class ShopModel
/**
* 店铺Banner 资源位
* 店铺-经典Banner 资源位
* @param type $data []
*/
public static function shopTopBanner($data)
... ... @@ -231,21 +231,50 @@ class ShopModel
'bannerHeight' => 150
);
if (isset($data['resource_data'][0]['shopSrc'])) {
if (!empty($data['resource_data'][0]['shopSrc'])) {
$result['banner'] = self::imageView2($data['resource_data'][0]['shopSrc'], 1150, 150);
}
if (isset($data['resource_data'][0]['detailSrc'])) {
if (!empty($data['resource_data'][0]['detailSrc'])) {
$result['detailSrc'] = self::imageView2($data['resource_data'][0]['detailSrc'], 1150, 150);
}
if (isset($data['resource_data'][0]['isShowShopName'])) {
if (!empty($data['resource_data'][0]['isShowShopName'])) {
$result['isShowShopName'] = $data['resource_data'][0]['isShowShopName'] === 'Y';
}
return $result;
}
/**
* 店铺-基础Banner 资源位
* @param type $data
* @return type []
*/
public static function shopTopBanner_base($data)
{
$result = array(
'banner' => '',
'isShowShopName' => false,
'bannerHeight' => 150
);
if (!empty($data['resource_data'][0]['shopSrc'])) {
$result['banner'] = $data['resource_data'][0]['shopSrc'];
}
if (!empty($data['resource_data'][0]['detailSrc'])) {
$result['detailSrc'] = $data['resource_data'][0]['detailSrc'];
}
if (!empty($data['resource_data'][0]['isShowShopName'])) {
$result['isShowShopName'] = $data['resource_data'][0]['isShowShopName'] === 'Y';
}
return $result;
}
/**
* 导航栏 资源位
* @param type $data
* @return type []
... ... @@ -573,7 +602,7 @@ class ShopModel
if (is_callable("self::$fun")) {
$list = self::$fun(self::getResourceData($list), $parameters);
switch ($fun) {
case 'shopTopBanner':
case 'shopTopBanner_base':
case 'signboard':
$data[$fun] = $list;
break;
... ...
... ... @@ -54,8 +54,8 @@ class IndexController extends WebAction
//基础模板
if ($result['shopTemplateType'] === 1 && !empty($result['shopId'])) {
$basisData = ShopModel::basisTemplate($result['shopId']);
$result['brandBanner'] = empty($basisData['shopTopBanner']['banner']) ?
$result['brandBanner'] : $basisData['shopTopBanner']['banner'];
$result['brandBanner'] = empty($basisData['shopTopBanner_base']['banner']) ?
$result['brandBanner'] : $basisData['shopTopBanner_base']['banner'] . '?';
$result['signboard'] = $basisData['signboard'];
if (isset($result['node'])) {
unset($result['node']);
... ...