Showing
5 changed files
with
15 additions
and
40 deletions
@@ -73,7 +73,7 @@ class Bootstrap extends Bootstrap_Abstract | @@ -73,7 +73,7 @@ class Bootstrap extends Bootstrap_Abstract | ||
73 | $action = 'Index'; | 73 | $action = 'Index'; |
74 | 74 | ||
75 | // 二级域名 | 75 | // 二级域名 |
76 | - if (2 === $level) { | 76 | + if (3 === $level) { |
77 | $subDomain = strval($hostParts[0]); | 77 | $subDomain = strval($hostParts[0]); |
78 | switch (strtolower($subDomain)) { | 78 | switch (strtolower($subDomain)) { |
79 | case 'www': // 主站 | 79 | case 'www': // 主站 |
@@ -70,18 +70,14 @@ class BrandsModel { | @@ -70,18 +70,14 @@ class BrandsModel { | ||
70 | 70 | ||
71 | //获取静态内容(20141219-100447) | 71 | //获取静态内容(20141219-100447) |
72 | if($node){ | 72 | if($node){ |
73 | - $nodeContent = BrandData::getByNodeContent($node); | ||
74 | - if(isset($nodeContent['code']) && $nodeContent['code'] === 200){ | ||
75 | - $result = $nodeContent['data']; | ||
76 | - //接口返回html格式,非前端需要格式。 | ||
77 | - } | 73 | + $nodeContent = HelperSearch::formatNodeContent($node); |
74 | + $data['list']['leftContent'][]['picLink']['list'] = $nodeContent; | ||
78 | } | 75 | } |
79 | 76 | ||
80 | return $data; | 77 | return $data; |
81 | } | 78 | } |
82 | 79 | ||
83 | 80 | ||
84 | - | ||
85 | /** | 81 | /** |
86 | * 获取品牌首页banner条 | 82 | * 获取品牌首页banner条 |
87 | * @string $domain 品牌域名 | 83 | * @string $domain 品牌域名 |
@@ -103,24 +99,17 @@ class BrandsModel { | @@ -103,24 +99,17 @@ class BrandsModel { | ||
103 | $intro = BrandData::getBrandIntro($brandId, $uid); | 99 | $intro = BrandData::getBrandIntro($brandId, $uid); |
104 | } | 100 | } |
105 | $is_favorite = false; | 101 | $is_favorite = false; |
106 | - $logo = false; | ||
107 | $shopName = false; | 102 | $shopName = false; |
108 | - | ||
109 | - do { | ||
110 | - if (!isset($intro['data'])) { | ||
111 | - break; | ||
112 | - } | 103 | + if(isset($intro['data'])){ |
113 | // 获取是否收藏 | 104 | // 获取是否收藏 |
114 | if ($intro['data']['is_favorite'] == 'Y') { | 105 | if ($intro['data']['is_favorite'] == 'Y') { |
115 | $is_favorite = true; | 106 | $is_favorite = true; |
116 | } elseif ($intro['data']['is_favorite'] == 'N') { | 107 | } elseif ($intro['data']['is_favorite'] == 'N') { |
117 | $is_favorite = false; | 108 | $is_favorite = false; |
118 | } | 109 | } |
119 | - // 获取品牌logo | ||
120 | - $logo = Helpers::getImageUrl($intro['data']['brand_ico'], 80, 50); | ||
121 | // 获取品牌名 | 110 | // 获取品牌名 |
122 | self::$shopName = $intro['data']['brand_name']; | 111 | self::$shopName = $intro['data']['brand_name']; |
123 | - } while (false); | 112 | + } |
124 | 113 | ||
125 | // 返回banner数据 | 114 | // 返回banner数据 |
126 | return array( | 115 | return array( |
@@ -128,21 +117,6 @@ class BrandsModel { | @@ -128,21 +117,6 @@ class BrandsModel { | ||
128 | 'bannerHeight' => '150', | 117 | 'bannerHeight' => '150', |
129 | 'coled' => $is_favorite, | 118 | 'coled' => $is_favorite, |
130 | 'banner' => $bannerImg | 119 | 'banner' => $bannerImg |
131 | - ), | ||
132 | - 'shopEntry' => array( | ||
133 | - 'home' => self::$home, | ||
134 | - 'logo' => $logo, | ||
135 | - 'shopName' => self::$shopName, | ||
136 | - 'sort' => array( | ||
137 | - array( | ||
138 | - 'href' => '', | ||
139 | - 'name' => 'T恤' | ||
140 | - ), | ||
141 | - array( | ||
142 | - 'href' => '', | ||
143 | - 'name' => '卫衣' | ||
144 | - ) | ||
145 | - ) | ||
146 | ) | 120 | ) |
147 | ); | 121 | ); |
148 | } | 122 | } |
@@ -158,6 +132,8 @@ class BrandsModel { | @@ -158,6 +132,8 @@ class BrandsModel { | ||
158 | $result['list'][$key]['src'] = $value['brand_sort_ico']; | 132 | $result['list'][$key]['src'] = $value['brand_sort_ico']; |
159 | } | 133 | } |
160 | } | 134 | } |
135 | + $result['picTitle'] = '经典系列'; | ||
136 | + | ||
161 | return $result; | 137 | return $result; |
162 | } | 138 | } |
163 | 139 |
@@ -58,10 +58,9 @@ class SaleModel | @@ -58,10 +58,9 @@ class SaleModel | ||
58 | $data['newSale']['saleTitle']['count'] = $data['newSale']['totalCount']; | 58 | $data['newSale']['saleTitle']['count'] = $data['newSale']['totalCount']; |
59 | 59 | ||
60 | 60 | ||
61 | - //获取广告位 | 61 | + //获取广告位数据 |
62 | $nodeContent = HelperSearch::formatNodeContent($special['left_ad_code']); | 62 | $nodeContent = HelperSearch::formatNodeContent($special['left_ad_code']); |
63 | - $data['newSale']['leftContent'][]['picLink'][] = $nodeContent; | ||
64 | - | 63 | + $data['newSale']['leftContent'][]['picLink']['list'] = $nodeContent; |
65 | 64 | ||
66 | return $data; | 65 | return $data; |
67 | } | 66 | } |
@@ -55,6 +55,7 @@ class IndexController extends WebAction | @@ -55,6 +55,7 @@ class IndexController extends WebAction | ||
55 | } | 55 | } |
56 | //传品牌ID参数 | 56 | //传品牌ID参数 |
57 | $condition['brand'] = $brandId; | 57 | $condition['brand'] = $brandId; |
58 | + | ||
58 | //获取性别数据 | 59 | //获取性别数据 |
59 | $gender = $this->get('gender') ? ($this->get('gender') == '2,3' ? 2 : 1) : (!isset($_COOKIE['_Gender']) ? '3' : ($_COOKIE['_Gender']=='2,3' ? 2 : 1)); | 60 | $gender = $this->get('gender') ? ($this->get('gender') == '2,3' ? 2 : 1) : (!isset($_COOKIE['_Gender']) ? '3' : ($_COOKIE['_Gender']=='2,3' ? 2 : 1)); |
60 | $condition['gender'] = $gender; | 61 | $condition['gender'] = $gender; |
@@ -13,15 +13,13 @@ class SaleController extends WebAction | @@ -13,15 +13,13 @@ class SaleController extends WebAction | ||
13 | public function indexAction() | 13 | public function indexAction() |
14 | { | 14 | { |
15 | //获取专区ID | 15 | //获取专区ID |
16 | - $specialsaleId = $this->Param('specialsaleId'); | 16 | + $specialsaleId = $this->param('specialsaleId'); |
17 | $specialsaleId = 1; //测试数据 | 17 | $specialsaleId = 1; //测试数据 |
18 | $specialInfo = SaleData::getSpecial($specialsaleId); | 18 | $specialInfo = SaleData::getSpecial($specialsaleId); |
19 | $special = $specialInfo['data']; | 19 | $special = $specialInfo['data']; |
20 | -// if (empty($specialsale_id)) { | ||
21 | -// $specialsale_id = str_replace('specialsale', '', explode('.', $_SERVER['HTTP_HOST'])[0]); | ||
22 | -// } | 20 | + |
23 | //获取促销ID | 21 | //获取促销ID |
24 | - $promotion = $this->Param('promotion'); | 22 | + $promotion = $this->param('promotion'); |
25 | 23 | ||
26 | //专区ID和促销ID都为空时,跳转到主页 | 24 | //专区ID和促销ID都为空时,跳转到主页 |
27 | if (empty($specialsaleId) && empty($promotion)) { | 25 | if (empty($specialsaleId) && empty($promotion)) { |
@@ -64,6 +62,8 @@ class SaleController extends WebAction | @@ -64,6 +62,8 @@ class SaleController extends WebAction | ||
64 | //传促销id | 62 | //传促销id |
65 | if(!empty($special['ispromotion'])){ | 63 | if(!empty($special['ispromotion'])){ |
66 | //$condition['promotion'] = $special['ispromotion']; | 64 | //$condition['promotion'] = $special['ispromotion']; |
65 | + }else{ | ||
66 | + $condition['promotion'] = $promotion; | ||
67 | } | 67 | } |
68 | 68 | ||
69 | //获取性别数据 | 69 | //获取性别数据 |
@@ -108,7 +108,6 @@ class SaleController extends WebAction | @@ -108,7 +108,6 @@ class SaleController extends WebAction | ||
108 | $params = array_filter($params); | 108 | $params = array_filter($params); |
109 | 109 | ||
110 | $data = Product\SaleModel::getSaleSearchData($params, $options, $specialInfo); | 110 | $data = Product\SaleModel::getSaleSearchData($params, $options, $specialInfo); |
111 | - | ||
112 | $cate = array('boys', 'girls', 'kids', 'lifestyle'); | 111 | $cate = array('boys', 'girls', 'kids', 'lifestyle'); |
113 | $this->setWebNavHeader($cate[$gender - 1]); | 112 | $this->setWebNavHeader($cate[$gender - 1]); |
114 | //渲染模板 | 113 | //渲染模板 |
-
Please register or login to post a comment