Authored by 郝肖肖

店铺装修 基础模板banner

@@ -17,6 +17,8 @@ @@ -17,6 +17,8 @@
17 17
18 .brand-banner { 18 .brand-banner {
19 position: relative; 19 position: relative;
  20 + height: 150px;
  21 + overflow: hidden;
20 22
21 .opt-wrap { 23 .opt-wrap {
22 position: absolute; 24 position: absolute;
@@ -208,8 +208,8 @@ class ItemModel @@ -208,8 +208,8 @@ class ItemModel
208 case 2: 208 case 2:
209 //单品店显示新版的店铺banner 209 //单品店显示新版的店铺banner
210 $basisData = ShopModel::basisTemplate($domainBrand['shopId']); 210 $basisData = ShopModel::basisTemplate($domainBrand['shopId']);
211 - $banner['bgImg'] = empty($basisData['shopTopBanner']['banner']) ?  
212 - $banner['bgImg'] : $basisData['shopTopBanner']['banner']; 211 + $banner['bgImg'] = empty($basisData['shopTopBanner_base']['banner']) ?
  212 + $banner['bgImg'] : $basisData['shopTopBanner_base']['banner'];
213 break; 213 break;
214 } 214 }
215 } 215 }
@@ -220,7 +220,7 @@ class ShopModel @@ -220,7 +220,7 @@ class ShopModel
220 220
221 221
222 /** 222 /**
223 - * 店铺Banner 资源位 223 + * 店铺-经典Banner 资源位
224 * @param type $data [] 224 * @param type $data []
225 */ 225 */
226 public static function shopTopBanner($data) 226 public static function shopTopBanner($data)
@@ -231,21 +231,50 @@ class ShopModel @@ -231,21 +231,50 @@ class ShopModel
231 'bannerHeight' => 150 231 'bannerHeight' => 150
232 ); 232 );
233 233
234 - if (isset($data['resource_data'][0]['shopSrc'])) { 234 + if (!empty($data['resource_data'][0]['shopSrc'])) {
235 $result['banner'] = self::imageView2($data['resource_data'][0]['shopSrc'], 1150, 150); 235 $result['banner'] = self::imageView2($data['resource_data'][0]['shopSrc'], 1150, 150);
236 } 236 }
237 237
238 - if (isset($data['resource_data'][0]['detailSrc'])) { 238 + if (!empty($data['resource_data'][0]['detailSrc'])) {
239 $result['detailSrc'] = self::imageView2($data['resource_data'][0]['detailSrc'], 1150, 150); 239 $result['detailSrc'] = self::imageView2($data['resource_data'][0]['detailSrc'], 1150, 150);
240 } 240 }
241 241
242 - if (isset($data['resource_data'][0]['isShowShopName'])) { 242 + if (!empty($data['resource_data'][0]['isShowShopName'])) {
243 $result['isShowShopName'] = $data['resource_data'][0]['isShowShopName'] === 'Y'; 243 $result['isShowShopName'] = $data['resource_data'][0]['isShowShopName'] === 'Y';
244 } 244 }
245 return $result; 245 return $result;
246 246
247 } 247 }
248 /** 248 /**
  249 + * 店铺-基础Banner 资源位
  250 + * @param type $data
  251 + * @return type []
  252 + */
  253 + public static function shopTopBanner_base($data)
  254 + {
  255 + $result = array(
  256 + 'banner' => '',
  257 + 'isShowShopName' => false,
  258 + 'bannerHeight' => 150
  259 + );
  260 +
  261 + if (!empty($data['resource_data'][0]['shopSrc'])) {
  262 + $result['banner'] = $data['resource_data'][0]['shopSrc'];
  263 + }
  264 +
  265 + if (!empty($data['resource_data'][0]['detailSrc'])) {
  266 + $result['detailSrc'] = $data['resource_data'][0]['detailSrc'];
  267 + }
  268 +
  269 + if (!empty($data['resource_data'][0]['isShowShopName'])) {
  270 + $result['isShowShopName'] = $data['resource_data'][0]['isShowShopName'] === 'Y';
  271 + }
  272 +
  273 + return $result;
  274 +
  275 + }
  276 +
  277 + /**
249 * 导航栏 资源位 278 * 导航栏 资源位
250 * @param type $data 279 * @param type $data
251 * @return type [] 280 * @return type []
@@ -573,7 +602,7 @@ class ShopModel @@ -573,7 +602,7 @@ class ShopModel
573 if (is_callable("self::$fun")) { 602 if (is_callable("self::$fun")) {
574 $list = self::$fun(self::getResourceData($list), $parameters); 603 $list = self::$fun(self::getResourceData($list), $parameters);
575 switch ($fun) { 604 switch ($fun) {
576 - case 'shopTopBanner': 605 + case 'shopTopBanner_base':
577 case 'signboard': 606 case 'signboard':
578 $data[$fun] = $list; 607 $data[$fun] = $list;
579 break; 608 break;
@@ -54,8 +54,8 @@ class IndexController extends WebAction @@ -54,8 +54,8 @@ class IndexController extends WebAction
54 //基础模板 54 //基础模板
55 if ($result['shopTemplateType'] === 1 && !empty($result['shopId'])) { 55 if ($result['shopTemplateType'] === 1 && !empty($result['shopId'])) {
56 $basisData = ShopModel::basisTemplate($result['shopId']); 56 $basisData = ShopModel::basisTemplate($result['shopId']);
57 - $result['brandBanner'] = empty($basisData['shopTopBanner']['banner']) ?  
58 - $result['brandBanner'] : $basisData['shopTopBanner']['banner']; 57 + $result['brandBanner'] = empty($basisData['shopTopBanner_base']['banner']) ?
  58 + $result['brandBanner'] : $basisData['shopTopBanner_base']['banner'] . '?';
59 $result['signboard'] = $basisData['signboard']; 59 $result['signboard'] = $basisData['signboard'];
60 if (isset($result['node'])) { 60 if (isset($result['node'])) {
61 unset($result['node']); 61 unset($result['node']);