Showing
12 changed files
with
253 additions
and
1245 deletions
@@ -167,18 +167,6 @@ class AbstractAction extends Controller_Abstract | @@ -167,18 +167,6 @@ class AbstractAction extends Controller_Abstract | ||
167 | return $this->request->getCookie($name, $default); | 167 | return $this->request->getCookie($name, $default); |
168 | } | 168 | } |
169 | 169 | ||
170 | - /** | ||
171 | - * 返回顶部软件下载有关数据 | ||
172 | - * @return array 下载有关数据 | ||
173 | - */ | ||
174 | - protected function getHeaderDownload() | ||
175 | - { | ||
176 | - return array( | ||
177 | - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', | ||
178 | - 'url' => 'http://www.baidu.com' | ||
179 | - ); | ||
180 | - } | ||
181 | - | ||
182 | /* | 170 | /* |
183 | * 设置网站SEO的标题 | 171 | * 设置网站SEO的标题 |
184 | * | 172 | * |
@@ -336,4 +324,30 @@ class AbstractAction extends Controller_Abstract | @@ -336,4 +324,30 @@ class AbstractAction extends Controller_Abstract | ||
336 | )); | 324 | )); |
337 | } | 325 | } |
338 | 326 | ||
327 | + /** | ||
328 | + * 设置首页以及频道页顶部信息 | ||
329 | + * | ||
330 | + * @return void | ||
331 | + */ | ||
332 | + protected function setHomeChannelHeader() | ||
333 | + { | ||
334 | + $header['searchUrl'] = ''; | ||
335 | + | ||
336 | + $this->_view->assign('homeHeader', $header); | ||
337 | + } | ||
338 | + | ||
339 | + /** | ||
340 | + * 返回顶部软件下载有关数据 | ||
341 | + * @return array 下载有关数据 | ||
342 | + */ | ||
343 | + protected function setHeaderDownload() | ||
344 | + { | ||
345 | + $download = array( | ||
346 | + 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', | ||
347 | + 'url' => 'http://www.baidu.com' | ||
348 | + ); | ||
349 | + | ||
350 | + $this->_view->assign('headerDownload', $download); | ||
351 | + } | ||
352 | + | ||
339 | } | 353 | } |
@@ -22,11 +22,12 @@ class RecomData | @@ -22,11 +22,12 @@ class RecomData | ||
22 | * | 22 | * |
23 | * @param string $gender "1,3"表示男, "2,3"表示女 | 23 | * @param string $gender "1,3"表示男, "2,3"表示女 |
24 | * @param string $channel 1表示男, 2表示女 | 24 | * @param string $channel 1表示男, 2表示女 |
25 | + * @param boolean $returnJson 是否返回json | ||
25 | * @param int $page 分页第几页, 默认第1页 | 26 | * @param int $page 分页第几页, 默认第1页 |
26 | * @param int $limit 查询返回的最大限制数, 默认为50 | 27 | * @param int $limit 查询返回的最大限制数, 默认为50 |
27 | * @return array | 28 | * @return array |
28 | */ | 29 | */ |
29 | - public static function mayLike($gender, $channel, $page = 1, $limit = 50) | 30 | + public static function mayLike($gender, $channel, $returnJson = true, $page = 1, $limit = 50) |
30 | { | 31 | { |
31 | $param = Yohobuy::param(); | 32 | $param = Yohobuy::param(); |
32 | $param['method'] = 'app.search.last7day'; | 33 | $param['method'] = 'app.search.last7day'; |
@@ -36,7 +37,7 @@ class RecomData | @@ -36,7 +37,7 @@ class RecomData | ||
36 | $param['yh_channel'] = $channel; | 37 | $param['yh_channel'] = $channel; |
37 | $param['client_secret'] = Sign::getSign($param); | 38 | $param['client_secret'] = Sign::getSign($param); |
38 | 39 | ||
39 | - return Yohobuy::get(Yohobuy::API_URL, $param, true); | 40 | + return Yohobuy::get(Yohobuy::API_URL, $param, $returnJson); |
40 | } | 41 | } |
41 | 42 | ||
42 | /** | 43 | /** |
@@ -9,11 +9,36 @@ class FloorProcess | @@ -9,11 +9,36 @@ class FloorProcess | ||
9 | { | 9 | { |
10 | 10 | ||
11 | /** | 11 | /** |
12 | + * 处理首页内容 | ||
13 | + * @param $data | ||
14 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
15 | + */ | ||
16 | + public static function getContent($data, $type = 1) | ||
17 | + { | ||
18 | + $result = array(); | ||
19 | + if(empty($data['list'])){ | ||
20 | + return $result; | ||
21 | + } | ||
22 | + foreach ($data['list'] as $v){ | ||
23 | + $fun = $v['template_name']; | ||
24 | + | ||
25 | + $data = self::$fun($v['data'],$type); | ||
26 | + if(empty($data)){ | ||
27 | + continue; | ||
28 | + } | ||
29 | + $result[] = $data; | ||
30 | + } | ||
31 | + return $result; | ||
32 | + | ||
33 | + } | ||
34 | + | ||
35 | + /** | ||
12 | * 焦点图数据处理方法 | 36 | * 焦点图数据处理方法 |
13 | * @param array $data 焦点图数据 | 37 | * @param array $data 焦点图数据 |
38 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
14 | * @return array 处理之后的焦点图数据 | 39 | * @return array 处理之后的焦点图数据 |
15 | */ | 40 | */ |
16 | - public static function focus($data) | 41 | + private static function focus($data, $type) |
17 | { | 42 | { |
18 | $result = array(); | 43 | $result = array(); |
19 | 44 | ||
@@ -23,15 +48,16 @@ class FloorProcess | @@ -23,15 +48,16 @@ class FloorProcess | ||
23 | } | 48 | } |
24 | $result['list'] = $data; | 49 | $result['list'] = $data; |
25 | 50 | ||
26 | - return $result; | 51 | + return array('bannerTop'=>$result); |
27 | } | 52 | } |
28 | 53 | ||
29 | /** | 54 | /** |
30 | * 图标列表数据处理方法 | 55 | * 图标列表数据处理方法 |
31 | * @param array $data 图标列表数据 | 56 | * @param array $data 图标列表数据 |
57 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
32 | * @return array 处理之后的图标列表数据 | 58 | * @return array 处理之后的图标列表数据 |
33 | */ | 59 | */ |
34 | - public static function app_icon_list($data) | 60 | + private static function app_icon_list($data, $type) |
35 | { | 61 | { |
36 | $result = array(); | 62 | $result = array(); |
37 | 63 | ||
@@ -41,15 +67,16 @@ class FloorProcess | @@ -41,15 +67,16 @@ class FloorProcess | ||
41 | } | 67 | } |
42 | $result['list'] = $data; | 68 | $result['list'] = $data; |
43 | 69 | ||
44 | - return $result; | 70 | + return array('iconsEnter'=>$result); |
45 | } | 71 | } |
46 | 72 | ||
47 | /** | 73 | /** |
48 | * 单图片数据处理方法 | 74 | * 单图片数据处理方法 |
49 | * @param array $data 单图片数据 | 75 | * @param array $data 单图片数据 |
76 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
50 | * @return array 处理之后的单图片数据 | 77 | * @return array 处理之后的单图片数据 |
51 | */ | 78 | */ |
52 | - public static function single_image($data) | 79 | + private static function single_image($data, $type) |
53 | { | 80 | { |
54 | $result = array(); | 81 | $result = array(); |
55 | 82 | ||
@@ -58,15 +85,16 @@ class FloorProcess | @@ -58,15 +85,16 @@ class FloorProcess | ||
58 | } | 85 | } |
59 | $result['list'] = $data; | 86 | $result['list'] = $data; |
60 | 87 | ||
61 | - return $result; | 88 | + return array('singleImage'=>$result); |
62 | } | 89 | } |
63 | 90 | ||
64 | /** | 91 | /** |
65 | * 带标题的12个小图推荐数据处理方法 | 92 | * 带标题的12个小图推荐数据处理方法 |
66 | * @param array $data 带标题的12个小图推荐数据 | 93 | * @param array $data 带标题的12个小图推荐数据 |
94 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
67 | * @return array 处理之后的带标题的12个小图推荐数据 | 95 | * @return array 处理之后的带标题的12个小图推荐数据 |
68 | */ | 96 | */ |
69 | - public static function recommend_content_five($data) | 97 | + private static function recommend_content_five($data, $type) |
70 | { | 98 | { |
71 | $result = array(); | 99 | $result = array(); |
72 | 100 | ||
@@ -79,19 +107,20 @@ class FloorProcess | @@ -79,19 +107,20 @@ class FloorProcess | ||
79 | unset($data['title']); | 107 | unset($data['title']); |
80 | $result = $data; | 108 | $result = $data; |
81 | 109 | ||
82 | - return $result; | 110 | + return array('hotCategory'=>$result); |
83 | } | 111 | } |
84 | 112 | ||
85 | /** | 113 | /** |
86 | * 推荐品牌数据处理方法 | 114 | * 推荐品牌数据处理方法 |
87 | * @param array $data 推荐品牌数据 | 115 | * @param array $data 推荐品牌数据 |
116 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
88 | * @return array 处理之后的推荐品牌数据 | 117 | * @return array 处理之后的推荐品牌数据 |
89 | */ | 118 | */ |
90 | - public static function app_hot_brands($data) | 119 | + private static function app_hot_brands($data, $type) |
91 | { | 120 | { |
92 | $result = array(); | 121 | $result = array(); |
93 | 122 | ||
94 | - $data['is_show_name'] = $data['is_show_name'] == 'Y' ? 1 : 0; | 123 | + $data['is_show_name'] = (isset($data['is_show_name']) && $data['is_show_name'] == 'Y') ? 1 : 0; |
95 | $data['name'] = $data['title']['title']; | 124 | $data['name'] = $data['title']['title']; |
96 | unset($data['title']); | 125 | unset($data['title']); |
97 | foreach ($data['list'] as &$one) { | 126 | foreach ($data['list'] as &$one) { |
@@ -100,15 +129,16 @@ class FloorProcess | @@ -100,15 +129,16 @@ class FloorProcess | ||
100 | } | 129 | } |
101 | $result = $data; | 130 | $result = $data; |
102 | 131 | ||
103 | - return $result; | 132 | + return array('hotBrands'=>$result); |
104 | } | 133 | } |
105 | 134 | ||
106 | /** | 135 | /** |
107 | * 潮人·搭配数据处理方法 | 136 | * 潮人·搭配数据处理方法 |
108 | * @param array $data 潮人·搭配数据 | 137 | * @param array $data 潮人·搭配数据 |
138 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
109 | * @return array 处理之后的潮人·搭配数据 | 139 | * @return array 处理之后的潮人·搭配数据 |
110 | */ | 140 | */ |
111 | - public static function trendsetter_collocation($data) | 141 | + private static function trendsetter_collocation($data, $type) |
112 | { | 142 | { |
113 | $result = array(); | 143 | $result = array(); |
114 | 144 | ||
@@ -122,15 +152,16 @@ class FloorProcess | @@ -122,15 +152,16 @@ class FloorProcess | ||
122 | } | 152 | } |
123 | $result = $data; | 153 | $result = $data; |
124 | 154 | ||
125 | - return $result; | 155 | + return array('trendColloaction'=>$result); |
126 | } | 156 | } |
127 | 157 | ||
128 | /** | 158 | /** |
129 | * 潮品·话题数据处理方法 | 159 | * 潮品·话题数据处理方法 |
130 | * @param array $data 潮品·话题数据 | 160 | * @param array $data 潮品·话题数据 |
161 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
131 | * @return array 处理之后的潮品·话题数据 | 162 | * @return array 处理之后的潮品·话题数据 |
132 | */ | 163 | */ |
133 | - public static function trendgoods_topic($data) | 164 | + private static function trendgoods_topic($data, $type) |
134 | { | 165 | { |
135 | $result = array(); | 166 | $result = array(); |
136 | 167 | ||
@@ -140,15 +171,16 @@ class FloorProcess | @@ -140,15 +171,16 @@ class FloorProcess | ||
140 | } | 171 | } |
141 | $result = $data; | 172 | $result = $data; |
142 | 173 | ||
143 | - return $result; | 174 | + return array('trendTopics'=>$result); |
144 | } | 175 | } |
145 | 176 | ||
146 | /** | 177 | /** |
147 | * 一张大图一个大的推荐和4个小图推荐数据处理方法 | 178 | * 一张大图一个大的推荐和4个小图推荐数据处理方法 |
148 | * @param array $data 一张大图一个大的推荐和4个小图推荐数据 | 179 | * @param array $data 一张大图一个大的推荐和4个小图推荐数据 |
180 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
149 | * @return array 处理之后的一张大图一个大的推荐和4个小图推荐数据 | 181 | * @return array 处理之后的一张大图一个大的推荐和4个小图推荐数据 |
150 | */ | 182 | */ |
151 | - public static function recommend_content_one($data) | 183 | + private static function recommend_content_one($data, $type) |
152 | { | 184 | { |
153 | $result = array(); | 185 | $result = array(); |
154 | 186 | ||
@@ -165,15 +197,16 @@ class FloorProcess | @@ -165,15 +197,16 @@ class FloorProcess | ||
165 | } | 197 | } |
166 | $result = $data; | 198 | $result = $data; |
167 | 199 | ||
168 | - return $result; | 200 | + return array('goodsCategory'=>$result); |
169 | } | 201 | } |
170 | 202 | ||
171 | /** | 203 | /** |
172 | * 一张大图和6个小图推荐数据处理方法 | 204 | * 一张大图和6个小图推荐数据处理方法 |
173 | * @param array $data 一张大图和6个小图推荐数据 | 205 | * @param array $data 一张大图和6个小图推荐数据 |
206 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
174 | * @return array 处理之后的一张大图和6个小图推荐数据 | 207 | * @return array 处理之后的一张大图和6个小图推荐数据 |
175 | */ | 208 | */ |
176 | - public static function recommend_content_two($data) | 209 | + private static function recommend_content_two($data, $type) |
177 | { | 210 | { |
178 | $result = array(); | 211 | $result = array(); |
179 | 212 | ||
@@ -197,9 +230,10 @@ class FloorProcess | @@ -197,9 +230,10 @@ class FloorProcess | ||
197 | /** | 230 | /** |
198 | * 小图片数据处理方法 | 231 | * 小图片数据处理方法 |
199 | * @param array $data 小图片数据 | 232 | * @param array $data 小图片数据 |
233 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
200 | * @return array 处理之后的小图片数据 | 234 | * @return array 处理之后的小图片数据 |
201 | */ | 235 | */ |
202 | - public static function small_pic($data) | 236 | + private static function small_pic($data, $type) |
203 | { | 237 | { |
204 | $result = array(); | 238 | $result = array(); |
205 | 239 | ||
@@ -209,23 +243,37 @@ class FloorProcess | @@ -209,23 +243,37 @@ class FloorProcess | ||
209 | } | 243 | } |
210 | $result = $data; | 244 | $result = $data; |
211 | 245 | ||
212 | - return $result; | 246 | + return array('small_pic'=>$result); |
213 | } | 247 | } |
214 | 248 | ||
215 | /** | 249 | /** |
216 | * 也许喜欢数据处理方法 | 250 | * 也许喜欢数据处理方法 |
217 | * @param array $data 也许喜欢数据 | 251 | * @param array $data 也许喜欢数据 |
252 | + * @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle | ||
218 | * @return array 处理之后的也许喜欢数据 | 253 | * @return array 处理之后的也许喜欢数据 |
219 | */ | 254 | */ |
220 | - public static function maybeLike($data) | 255 | + private static function maybeLike($data, $type) |
221 | { | 256 | { |
222 | - $result = array(); | ||
223 | - | ||
224 | - foreach ($data as &$one) { | ||
225 | - $one['img'] = Helpers::getImageUrl($one['src'], 235, 314, 1); | ||
226 | - unset($one['src']); | 257 | + $result = array('goods'=>array()); |
258 | + | ||
259 | + foreach ($data as $one) { | ||
260 | + $product = array(); | ||
261 | + $product['id'] = $one['brand_id']; | ||
262 | + $product['thumb'] = Helpers::getImageUrl($one['default_images'], 235, 314, 1); | ||
263 | + $product['price'] = $one['market_price']; | ||
264 | + $product['salePrice'] = $one['sales_price']; | ||
265 | + // 处理tags | ||
266 | + $product['tags'] = array(); | ||
267 | + foreach ($one['tags'] as $val) { | ||
268 | + $product['tags'][$val] = 1; | ||
269 | + } | ||
270 | + $product['is_soon_sold_out'] = $one['is_soon_sold_out']; | ||
271 | + | ||
272 | + $product['name'] = $one['product_name']; | ||
273 | + $product['url'] = $one['product_skn']; | ||
274 | + | ||
275 | + $result['goods'][] = $product; | ||
227 | } | 276 | } |
228 | - $result = $data; | ||
229 | 277 | ||
230 | return $result; | 278 | return $result; |
231 | } | 279 | } |
@@ -13,15 +13,15 @@ | @@ -13,15 +13,15 @@ | ||
13 | {{> common/content}} | 13 | {{> common/content}} |
14 | 14 | ||
15 | 15 | ||
16 | - {{! 商品列表}} | ||
17 | - {{# twoColumnGoods}} | ||
18 | - {{> common/two_column_goods}} | ||
19 | - {{/ twoColumnGoods}} | ||
20 | - | ||
21 | - {{! 底部banner}} | ||
22 | - {{# bannerBottom}} | ||
23 | - {{> common/banner_bottom}} | ||
24 | - {{/ bannerBottom}} | 16 | + {{! 商品列表}} |
17 | + {{# twoColumnGoods}} | ||
18 | + {{> common/two_column_goods}} | ||
19 | + {{/ twoColumnGoods}} | ||
20 | + | ||
21 | + {{! 底部banner}} | ||
22 | + {{# bannerBottom}} | ||
23 | + {{> common/banner_bottom}} | ||
24 | + {{/ bannerBottom}} | ||
25 | 25 | ||
26 | <div class="overlay"></div> | 26 | <div class="overlay"></div> |
27 | </div> | 27 | </div> |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="mobile-wrap lifestyle-wrap"> | 2 | <div class="mobile-wrap lifestyle-wrap"> |
3 | + | ||
4 | + {{# headerDownload}} | ||
5 | + {{> common/header_download}} | ||
6 | + {{/ headerDownload}} | ||
7 | + | ||
3 | {{! 首页header}} | 8 | {{! 首页header}} |
4 | {{# homeHeader}} | 9 | {{# homeHeader}} |
5 | {{> common/home_header}} | 10 | {{> common/home_header}} |
1 | <div class="good-info" data-id="{{id}}"> | 1 | <div class="good-info" data-id="{{id}}"> |
2 | <div class="tag-container clearfix"> | 2 | <div class="tag-container clearfix"> |
3 | {{# tags}} | 3 | {{# tags}} |
4 | - {{# isNew}} | 4 | + {{# is_new}} |
5 | <p class="good-tag new-tag">NEW</p> | 5 | <p class="good-tag new-tag">NEW</p> |
6 | - {{/ isNew}} | ||
7 | - {{# isReNew}} | 6 | + {{/ is_new}} |
7 | + {{# is_advance}} | ||
8 | <p class="good-tag renew-tag">再到着</p> | 8 | <p class="good-tag renew-tag">再到着</p> |
9 | - {{/ isReNew}} | ||
10 | - {{# isSale}} | 9 | + {{/ is_advance}} |
10 | + {{# is_discount}} | ||
11 | <p class="good-tag sale-tag">SALE</p> | 11 | <p class="good-tag sale-tag">SALE</p> |
12 | - {{/ isSale}} | ||
13 | - {{# isYohood}} | 12 | + {{/ is_discount}} |
13 | + {{# is_yohoood}} | ||
14 | <div class="good-tag yohood-tag"></div> | 14 | <div class="good-tag yohood-tag"></div> |
15 | - {{/ isYohood}} | ||
16 | - {{# isLimit}} | 15 | + {{/ is_yohoood}} |
16 | + {{# is_limited}} | ||
17 | <p class="good-tag limit-tag">限量商品</p> | 17 | <p class="good-tag limit-tag">限量商品</p> |
18 | - {{/ isLimit}} | 18 | + {{/ is_limited}} |
19 | {{/ tags}} | 19 | {{/ tags}} |
20 | </div> | 20 | </div> |
21 | <div class="good-detail-img"> | 21 | <div class="good-detail-img"> |
22 | - <a class="good-islike {{# isLike}}good-like{{/ isLike}} iconfont" href="{{likeUrl}}"></a> | 22 | + <a class="good-islike {{# is_like}}good-like{{/ is_like}} iconfont" href="{{likeUrl}}"></a> |
23 | <a class="good-thumb" href="{{url}}"> | 23 | <a class="good-thumb" href="{{url}}"> |
24 | <img class="lazy" data-original="{{thumb}}"> | 24 | <img class="lazy" data-original="{{thumb}}"> |
25 | </a> | 25 | </a> |
26 | - {{# isFew}} | 26 | + {{# is_soon_sold_out}} |
27 | <p class="few-tag">即将售罄</p> | 27 | <p class="few-tag">即将售罄</p> |
28 | - {{/ isFew}} | 28 | + {{/ is_soon_sold_out}} |
29 | </div> | 29 | </div> |
30 | <div class="good-detail-text"> | 30 | <div class="good-detail-text"> |
31 | <div class="name"> | 31 | <div class="name"> |
32 | - <a href="{{url}}">{{name}}</a> | 32 | + <a href="{{url}}">{{product_name}}</a> |
33 | </div> | 33 | </div> |
34 | <div class="price"> | 34 | <div class="price"> |
35 | - <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> | ||
36 | - {{#price}} | 35 | + <span class="sale-price {{^market_price}}no-price{{/market_price}}">¥{{sales_price}}</span> |
36 | + {{#market_price}} | ||
37 | <span class="market-price">¥{{.}}</span> | 37 | <span class="market-price">¥{{.}}</span> |
38 | - {{/price}} | 38 | + {{/market_price}} |
39 | </div> | 39 | </div> |
40 | </div> | 40 | </div> |
41 | </div> | 41 | </div> |
1 | <div class="good-info" data-id="{{id}}"> | 1 | <div class="good-info" data-id="{{id}}"> |
2 | <div class="tag-container clearfix"> | 2 | <div class="tag-container clearfix"> |
3 | {{# tags}} | 3 | {{# tags}} |
4 | - {{# isNew}} | 4 | + {{# is_new}} |
5 | <p class="good-tag new-tag">NEW</p> | 5 | <p class="good-tag new-tag">NEW</p> |
6 | - {{/ isNew}} | ||
7 | - {{# isReNew}} | 6 | + {{/ is_new}} |
7 | + {{# is_advance}} | ||
8 | <p class="good-tag renew-tag">再到着</p> | 8 | <p class="good-tag renew-tag">再到着</p> |
9 | - {{/ isReNew}} | ||
10 | - {{# isSale}} | 9 | + {{/ is_advance}} |
10 | + {{# is_discount}} | ||
11 | <p class="good-tag sale-tag">SALE</p> | 11 | <p class="good-tag sale-tag">SALE</p> |
12 | - {{/ isSale}} | ||
13 | - {{# isNewFestival}} | ||
14 | - <p class="good-tag new-festival-tag">新品节</p> | ||
15 | - {{/ isNewFestival}} | ||
16 | - {{# isLimit}} | 12 | + {{/ is_discount}} |
13 | + {{# is_yohoood}} | ||
14 | + <div class="good-tag yohood-tag"></div> | ||
15 | + {{/ is_yohoood}} | ||
16 | + {{# is_limited}} | ||
17 | <p class="good-tag limit-tag">限量商品</p> | 17 | <p class="good-tag limit-tag">限量商品</p> |
18 | - {{/ isLimit}} | 18 | + {{/ is_limited}} |
19 | {{/ tags}} | 19 | {{/ tags}} |
20 | </div> | 20 | </div> |
21 | <div class="good-detail-img"> | 21 | <div class="good-detail-img"> |
22 | <a class="good-thumb" href="{{url}}"> | 22 | <a class="good-thumb" href="{{url}}"> |
23 | <img class="lazy" data-original="{{thumb}}"> | 23 | <img class="lazy" data-original="{{thumb}}"> |
24 | </a> | 24 | </a> |
25 | - {{# isFew}} | 25 | + {{# is_soon_sold_out}} |
26 | <p class="few-tag">即将售罄</p> | 26 | <p class="few-tag">即将售罄</p> |
27 | - {{/ isFew}} | 27 | + {{/ is_soon_sold_out}} |
28 | </div> | 28 | </div> |
29 | <div class="good-detail-text"> | 29 | <div class="good-detail-text"> |
30 | <div class="name"> | 30 | <div class="name"> |
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use Action\AbstractAction; | 3 | use Action\AbstractAction; |
4 | -use LibModels\Wap\Home\IndexData as Index; | 4 | +use LibModels\Wap\Home\IndexData; |
5 | +use Plugin\FloorProcess; | ||
5 | /** | 6 | /** |
6 | * 男生首页 | 7 | * 男生首页 |
7 | */ | 8 | */ |
8 | class BoysController extends AbstractAction | 9 | class BoysController extends AbstractAction |
9 | { | 10 | { |
10 | 11 | ||
11 | - public function indexAction() | ||
12 | - { | ||
13 | - // 频道数据 | ||
14 | - $channelData = Index::getUserChannelData(0, '1,3', '201504091403001'); | ||
15 | - | ||
16 | - echo '<pre>'; | ||
17 | - print_r($channelData); | ||
18 | - | ||
19 | - $this->_view->assign('title', 'YOHO!有货'); | ||
20 | - $this->_view->display('index', compact('channelData')); | ||
21 | - | ||
22 | - $data = array( | ||
23 | - 'headerDownload' => array( | ||
24 | - 'img' => "http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480", | ||
25 | - 'url' => 'http://www.baidu.com' | ||
26 | - ), | ||
27 | - 'homeHeader' => array( | ||
28 | - 'searchUrl' => '' | ||
29 | - ), | ||
30 | - 'sideNav' => array( | ||
31 | - array( | ||
32 | - 'textCn' => '男生', | ||
33 | - 'textEn' => 'BOYS', | ||
34 | - 'styleClass' => 'boys', | ||
35 | - 'url' => '' | ||
36 | - ), | ||
37 | - array( | ||
38 | - 'textCn' => '女生', | ||
39 | - 'textEn' => 'GIRLS', | ||
40 | - 'styleClass' => 'girls', | ||
41 | - 'url' => '' | ||
42 | - ), | ||
43 | - array( | ||
44 | - 'textCn' => '潮童', | ||
45 | - 'textEn' => 'KIDS', | ||
46 | - 'styleClass' => 'kids', | ||
47 | - 'url' => '' | ||
48 | - ), | ||
49 | - array( | ||
50 | - 'textCn' => '创意生活', | ||
51 | - 'textEn' => 'LIFE STYLE', | ||
52 | - 'styleClass' => 'life', | ||
53 | - 'url' => '' | ||
54 | - ), | ||
55 | - | ||
56 | - array( | ||
57 | - 'textCn' => '逛', | ||
58 | - 'textEn' => 'TRENDFINDER', | ||
59 | - 'styleClass' => 'guang', | ||
60 | - 'subNav' => array( | ||
61 | - 'list' => array( | ||
62 | - array( | ||
63 | - 'textCn' => '逛', | ||
64 | - 'textEn' => 'TrendFinder', | ||
65 | - 'back' => true | ||
66 | - ), | ||
67 | - array( | ||
68 | - 'textCn' => '查看全部', | ||
69 | - 'url' => '' | ||
70 | - ), | ||
71 | - array( | ||
72 | - 'textCn' => '只看男生', | ||
73 | - 'textEn' => 'Boys', | ||
74 | - 'url' => '', | ||
75 | - 'isSelect' => true | ||
76 | - ), | ||
77 | - array( | ||
78 | - 'textCn' => '只看女生', | ||
79 | - 'textEn' => 'Girls', | ||
80 | - 'url' => '' | ||
81 | - ) | ||
82 | - ) | ||
83 | - | ||
84 | - ) | ||
85 | - ) | ||
86 | - ), | ||
87 | - | ||
88 | - | ||
89 | - | ||
90 | -'content' => array( | ||
91 | - 'bannerTop' => array( | ||
92 | - 'list' => array( | ||
93 | - array( | ||
94 | - 'url' => '', | ||
95 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg' | ||
96 | - ), | ||
97 | - array( | ||
98 | - 'url' => '', | ||
99 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg' | ||
100 | - ), | ||
101 | - array( | ||
102 | - 'url' => '', | ||
103 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg' | ||
104 | - ) | ||
105 | - ) | ||
106 | - ), | ||
107 | - 'iconsEnter' => array( | ||
108 | - 'list' => array( | ||
109 | - array( | ||
110 | - 'url' => '', | ||
111 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
112 | - 'text' => '新品到着' | ||
113 | - ), | ||
114 | - array( | ||
115 | - 'url' => '', | ||
116 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
117 | - 'text' => '全球优选' | ||
118 | - ), | ||
119 | - array( | ||
120 | - 'url' => '', | ||
121 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
122 | - 'text' => '明星潮牌' | ||
123 | - ), | ||
124 | - array( | ||
125 | - 'url' => '', | ||
126 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
127 | - 'text' => '全部品类' | ||
128 | - ), | ||
129 | - array( | ||
130 | - 'url' => '', | ||
131 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
132 | - 'text' => '逛' | ||
133 | - ), | ||
134 | - array( | ||
135 | - 'url' => '', | ||
136 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
137 | - 'text' => '搭配指南' | ||
138 | - ), | ||
139 | - array( | ||
140 | - 'url' => '', | ||
141 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
142 | - 'text' => '潮品推荐' | ||
143 | - ), | ||
144 | - array( | ||
145 | - 'url' => '', | ||
146 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
147 | - 'text' => '折扣精选' | ||
148 | - ) | ||
149 | - ) | ||
150 | - ), | ||
151 | - 'hotCategory' => array( | ||
152 | - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', | ||
153 | - 'url' => 'http://www.baidu.com', | ||
154 | - 'list' => array( | ||
155 | - array( | ||
156 | - 'textCn' => '打底衫', | ||
157 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
158 | - 'url' => '' | ||
159 | - ), | ||
160 | - array( | ||
161 | - 'textCn' => '打底衫', | ||
162 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
163 | - 'url' => '' | ||
164 | - ), | ||
165 | - array( | ||
166 | - 'textCn' => '打底衫', | ||
167 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
168 | - 'url' => '' | ||
169 | - ), | ||
170 | - array( | ||
171 | - 'textCn' => '打底衫', | ||
172 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
173 | - 'url' => '' | ||
174 | - ), | ||
175 | - array( | ||
176 | - 'textCn' => '打底衫', | ||
177 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
178 | - 'url' => '' | ||
179 | - ), | ||
180 | - array( | ||
181 | - 'textCn' => '打底衫', | ||
182 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
183 | - 'url' => '' | ||
184 | - ), | ||
185 | - array( | ||
186 | - 'textCn' => '打底衫', | ||
187 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
188 | - 'url' => '' | ||
189 | - ), | ||
190 | - array( | ||
191 | - 'textCn' => '打底衫', | ||
192 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
193 | - 'url' => '' | ||
194 | - ), | ||
195 | - array( | ||
196 | - 'textCn' => '打底衫', | ||
197 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
198 | - 'url' => '' | ||
199 | - ) | ||
200 | - ) | ||
201 | - ), | ||
202 | - 'hotBrandsScroll' => array( | ||
203 | - 'name' => '热门品牌', | ||
204 | - 'list' => array( | ||
205 | - array( | ||
206 | - 'textCn' => 'Moussy', | ||
207 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
208 | - 'url' => '' | ||
209 | - ), | ||
210 | - array( | ||
211 | - 'textCn' => 'Moussy', | ||
212 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
213 | - 'url' => '' | ||
214 | - ), | ||
215 | - array( | ||
216 | - 'textCn' => 'Moussy', | ||
217 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
218 | - 'url' => '' | ||
219 | - ), | ||
220 | - array( | ||
221 | - 'textCn' => 'Moussy', | ||
222 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
223 | - 'url' => '' | ||
224 | - ), | ||
225 | - array( | ||
226 | - 'textCn' => 'Moussy', | ||
227 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
228 | - 'url' => '' | ||
229 | - ), | ||
230 | - array( | ||
231 | - 'textCn' => 'Moussy', | ||
232 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
233 | - 'url' => '' | ||
234 | - ), | ||
235 | - array( | ||
236 | - 'textCn' => 'Moussy', | ||
237 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
238 | - 'url' => '' | ||
239 | - ), | ||
240 | - array( | ||
241 | - 'textCn' => 'Moussy', | ||
242 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
243 | - 'url' => '' | ||
244 | - ), | ||
245 | - array( | ||
246 | - 'textCn' => 'Moussy', | ||
247 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
248 | - 'url' => '' | ||
249 | - ) | ||
250 | - ) | ||
251 | - ), | ||
252 | - 'hotBrands' => array( | ||
253 | - 'name' => '热门品牌', | ||
254 | - 'more' => 'www.baidu.com', | ||
255 | - 'brands' => array( | ||
256 | - array( | ||
257 | - 'name' => 'Front Row Shop', | ||
258 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
259 | - 'url' => '' | ||
260 | - ), | ||
261 | - array( | ||
262 | - 'name' => 'dress lab', | ||
263 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
264 | - 'url' => '' | ||
265 | - ), | ||
266 | - array( | ||
267 | - 'name' => 'DEVIL NUT', | ||
268 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
269 | - 'url' => '' | ||
270 | - ), | ||
271 | - array( | ||
272 | - 'name' => 'casselini', | ||
273 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
274 | - 'url' => '' | ||
275 | - ), | ||
276 | - array( | ||
277 | - 'name' => 'haso', | ||
278 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
279 | - 'url' => '' | ||
280 | - ), | ||
281 | - array( | ||
282 | - 'name' => 'EVISU', | ||
283 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
284 | - 'url' => '' | ||
285 | - ) | ||
286 | - ) | ||
287 | - ), | ||
288 | - 'trendColloaction' => array( | ||
289 | - 'name' => '潮人 ▪ 搭配', | ||
290 | - 'more' => '', | ||
291 | - 'leftspan' => array( | ||
292 | - 'url' => '', | ||
293 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg' | ||
294 | - ), | ||
295 | - 'rightspan' => array( | ||
296 | - 'url' => '', | ||
297 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg' | ||
298 | - ), | ||
299 | - 'recommendlist' => array( | ||
300 | - array( | ||
301 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
302 | - 'url' => '' | ||
303 | - ), | ||
304 | - array( | ||
305 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
306 | - 'url' => '' | ||
307 | - ), | ||
308 | - array( | ||
309 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
310 | - 'url' => '' | ||
311 | - ), | ||
312 | - array( | ||
313 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
314 | - 'url' => '' | ||
315 | - ), | ||
316 | - array( | ||
317 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
318 | - 'url' => '' | ||
319 | - ) | ||
320 | - ) | ||
321 | - ), | ||
322 | - 'trendTopics' => array( | ||
323 | - 'name' => '潮品 ▪ 话题', | ||
324 | - 'more' => '', | ||
325 | - 'list' => array( | ||
326 | - array( | ||
327 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
328 | - 'url' => '', | ||
329 | - 'title' => '现代裁剪', | ||
330 | - 'time' => '2月13日 12:34' | ||
331 | - ), | ||
332 | - array( | ||
333 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
334 | - 'url' => '', | ||
335 | - 'title' => '现代裁剪', | ||
336 | - 'time' => '2月13日 12:34' | ||
337 | - ), | ||
338 | - array( | ||
339 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
340 | - 'url' => '', | ||
341 | - 'title' => '现代裁剪', | ||
342 | - 'time' => '2月13日 12:34' | ||
343 | - ) | ||
344 | - ) | ||
345 | - ), | ||
346 | - 'goodsCategory' => array( | ||
347 | - 'name' => '经典裤装', | ||
348 | - 'more' => '', | ||
349 | - 'banner' => array( | ||
350 | - 'list' => array( | ||
351 | - array( | ||
352 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
353 | - 'url' => '' | ||
354 | - ) | ||
355 | - ) | ||
356 | - ), | ||
357 | - 'list' => array( | ||
358 | - array( | ||
359 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
360 | - 'url' => '', | ||
361 | - 'textCn' => '手表' | ||
362 | - ), | ||
363 | - array( | ||
364 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
365 | - 'url' => '', | ||
366 | - 'textCn' => '烛台' | ||
367 | - ), | ||
368 | - array( | ||
369 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
370 | - 'url' => '', | ||
371 | - 'textCn' => '围巾' | ||
372 | - ), | ||
373 | - array( | ||
374 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
375 | - 'url' => '', | ||
376 | - 'textCn' => '盘子' | ||
377 | - ), | ||
378 | - array( | ||
379 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
380 | - 'url' => '', | ||
381 | - 'textCn' => '耳机' | ||
382 | - ) | ||
383 | - ) | ||
384 | - ), | ||
385 | - 'goodsCategory' => array( | ||
386 | - 'name' => '时尚鞋履', | ||
387 | - 'more' => '', | ||
388 | - 'banner' => array( | ||
389 | - 'list' => array( | ||
390 | - array( | ||
391 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
392 | - 'url' => '' | ||
393 | - ) | ||
394 | - ) | ||
395 | - ), | ||
396 | - 'list' => array( | ||
397 | - array( | ||
398 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
399 | - 'url' => '', | ||
400 | - 'textCn' => '手表' | ||
401 | - ), | ||
402 | - array( | ||
403 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
404 | - 'url' => '', | ||
405 | - 'textCn' => '烛台' | ||
406 | - ), | ||
407 | - array( | ||
408 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
409 | - 'url' => '', | ||
410 | - 'textCn' => '围巾' | ||
411 | - ), | ||
412 | - array( | ||
413 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
414 | - 'url' => '', | ||
415 | - 'textCn' => '盘子' | ||
416 | - ), | ||
417 | - array( | ||
418 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
419 | - 'url' => '', | ||
420 | - 'textCn' => '耳机' | ||
421 | - ) | ||
422 | - ) | ||
423 | - ), | ||
424 | - 'goodsCategory' => array( | ||
425 | - 'name' => '潮人配饰', | ||
426 | - 'more' => '', | ||
427 | - 'banner' => array( | ||
428 | - 'list' => array( | ||
429 | - array( | ||
430 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
431 | - 'url' => '' | ||
432 | - ) | ||
433 | - ) | ||
434 | - ), | ||
435 | - 'list' => array( | ||
436 | - array( | ||
437 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
438 | - 'url' => '', | ||
439 | - 'textCn' => '手表' | ||
440 | - ), | ||
441 | - array( | ||
442 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
443 | - 'url' => '', | ||
444 | - 'textCn' => '烛台' | ||
445 | - ), | ||
446 | - array( | ||
447 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
448 | - 'url' => '', | ||
449 | - 'textCn' => '围巾' | ||
450 | - ), | ||
451 | - array( | ||
452 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
453 | - 'url' => '', | ||
454 | - 'textCn' => '盘子' | ||
455 | - ), | ||
456 | - array( | ||
457 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
458 | - 'url' => '', | ||
459 | - 'textCn' => '耳机' | ||
460 | - ) | ||
461 | - ) | ||
462 | - ), | ||
463 | - | ||
464 | -'bannerCenter' => array( | ||
465 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg', | ||
466 | - 'url' => '' | ||
467 | - ), | ||
468 | - | ||
469 | - 'creativeLife' => array( | ||
470 | - 'name' => '创意生活', | ||
471 | - 'more' => '', | ||
472 | - 'url' => '', | ||
473 | - 'banner' => 'http://img10.static.yhbimg.com/yhb-img01/2015/07/09/18/0119ffceddb0819d36d74b408bd743b4a9.jpg?imageView/2/w/640/h/640', | ||
474 | - 'classify' => array( | ||
475 | - array( | ||
476 | - 'url' => '', | ||
477 | - 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/04/10/05/029bef1041343ea2e31dc0423f2f176589.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
478 | - 'name' => '手表' | ||
479 | - ), array( | ||
480 | - 'url' => '', | ||
481 | - 'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/07/07/09/02271a775d17649860abec4387b4559e26.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
482 | - 'name' => '烛台' | ||
483 | - ), array( | ||
484 | - 'url' => '', | ||
485 | - 'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/05/19/07/02a269d20ed44803eee33e255fe88d7873.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
486 | - 'name' => '围巾' | ||
487 | - ), array( | ||
488 | - 'url' => '', | ||
489 | - 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/06/01/07/02fe94083352435ce53b5d90812cc5bdbd.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
490 | - 'name' => '盘子' | ||
491 | - ), array( | ||
492 | - 'url' => '', | ||
493 | - 'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/07/08/07/028db8a2afbe4ecbf37bebc7e98e8e1e80.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
494 | - 'name' => '耳机' | ||
495 | - ), array( | ||
496 | - 'url' => '', | ||
497 | - 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/04/22/02/02a1b688b6dafd786f391e0624aea1e93b.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
498 | - 'name' => '生活' | ||
499 | - ) | ||
500 | - ) | ||
501 | - ), | ||
502 | - | ||
503 | - | ||
504 | -'plusStar' => array( | ||
505 | - 'name' => 'PLUS 全球优选', | ||
506 | - 'url' => '', | ||
507 | - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/13/15/014f7ba48071160053ac3b8f045b9fc264.jpg?imageView/2/w/640/h/640' | ||
508 | - | ||
509 | - ), | ||
510 | - | ||
511 | - 'bannerCenter' => array( | ||
512 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg', | ||
513 | - 'url' => '' | ||
514 | - ), | ||
515 | - | ||
516 | - 'plusStar' => array( | ||
517 | - 'name' => 'STAR 明星潮牌', | ||
518 | - 'url' => '', | ||
519 | - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/13/15/014f7ba48071160053ac3b8f045b9fc264.jpg?imageView/2/w/640/h/640' | ||
520 | - | ||
521 | - ), | ||
522 | - 'bannerCenter' => array( | ||
523 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg', | ||
524 | - 'url' => '' | ||
525 | - ), | ||
526 | - | ||
527 | -'maybeLike' => array( | ||
528 | - 'goods' => array( | ||
529 | - array( | ||
530 | - 'id' => 1, | ||
531 | - 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/03/02/07/01ebfb219e22770ffb0c2c3a2cbb2b4bef.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
532 | - 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
533 | - 'isLike' => false, | ||
534 | - 'price' => 1268, | ||
535 | - 'salePrice' => 589, | ||
536 | - 'isSale' => true, | ||
537 | - 'isFew' => true, | ||
538 | - 'isNew' => false, | ||
539 | - 'url' => '' | ||
540 | - ), array( | ||
541 | - 'id' => 2, | ||
542 | - 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/03/08/023d70c59e81ccbfb39404487aaf642da2.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
543 | - 'name' => 'CLOTtee 撞色连帽外套', | ||
544 | - 'isLike' => false, | ||
545 | - 'price' => 488, | ||
546 | - 'salePrice' => 139, | ||
547 | - 'isSale' => true, | ||
548 | - 'isFew' => true, | ||
549 | - 'isNew' => false, | ||
550 | - 'url' => '' | ||
551 | - ), array( | ||
552 | - 'id' => 3, | ||
553 | - 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/03/02/08/02e2d44125e95495e3152aa459fa6b9b0c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
554 | - 'name' => 'HALFGIRL 插肩棒球服短裙套装', | ||
555 | - 'isLike' => true, | ||
556 | - 'price' => 478, | ||
557 | - 'salePrice' => 208, | ||
558 | - 'isSale' => true, | ||
559 | - 'isFew' => true, | ||
560 | - 'isNew' => false, | ||
561 | - 'url' => '' | ||
562 | - ), array( | ||
563 | - 'id' => 4, | ||
564 | - 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/03/03/08/022f25fbe177ee12803c522f04fcce06d0.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
565 | - 'name' => '黄伟文Wyman X yohood联名商品YYYOHOOD连帽卫衣', | ||
566 | - 'isLike' => false, | ||
567 | - 'salePrice' => 148, | ||
568 | - 'isSale' => false, | ||
569 | - 'isFew' => false, | ||
570 | - 'isNew' => true, | ||
571 | - 'url' => '' | ||
572 | - ) | ||
573 | - ) | ||
574 | -), | ||
575 | - | ||
576 | -'bannerBottom' => array( | ||
577 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg', | ||
578 | - 'url' => '' | ||
579 | - ) | ||
580 | - | ||
581 | - | ||
582 | - ), | ||
583 | -); | ||
584 | - | ||
585 | - | ||
586 | - $this->_view->assign('title', '首页'); | ||
587 | - $this->_view->display('index', $data); | ||
588 | - } | 12 | + public function indexAction() |
13 | + { | ||
14 | + // 显示侧边栏 | ||
15 | + $this->setNavSide(); | ||
16 | + | ||
17 | + // 显示顶部下载 | ||
18 | + $this->setHeaderDownload(); | ||
19 | + // 设置顶部信息(搜索) | ||
20 | + $this->setHomeChannelHeader(); | ||
21 | + | ||
22 | + $data = array( | ||
23 | + 'sideNav' => array(), | ||
24 | + 'content' => array() | ||
25 | + ); | ||
26 | + | ||
27 | + $sideDatas = IndexData::getHomeChannels(); | ||
28 | + if($sideDatas['code'] == 200) | ||
29 | + { | ||
30 | + $data['sideNav'] = $sideDatas['data']; | ||
31 | + } | ||
32 | + | ||
33 | + // 频道数据 | ||
34 | + $channelData = IndexData::getUserChannelData(0, '1,3', '201504091403001'); | ||
35 | + $channels = array(); | ||
36 | + if($channelData['code'] == 200) | ||
37 | + { | ||
38 | + $data['content'] = FloorProcess::getContent($channelData['data']); | ||
39 | + } | ||
40 | + | ||
41 | + $this->_view->assign('title', '首页'); | ||
42 | + $this->_view->display('index', $data); | ||
43 | + } | ||
589 | } | 44 | } |
@@ -2,8 +2,6 @@ | @@ -2,8 +2,6 @@ | ||
2 | 2 | ||
3 | use Action\AbstractAction; | 3 | use Action\AbstractAction; |
4 | use LibModels\Wap\Home\IndexData; | 4 | use LibModels\Wap\Home\IndexData; |
5 | -use LibModels\Wap\Product\RecomData; | ||
6 | -use Plugin\Helpers; | ||
7 | use Plugin\FloorProcess; | 5 | use Plugin\FloorProcess; |
8 | /** | 6 | /** |
9 | * 女生首页 | 7 | * 女生首页 |
@@ -16,13 +14,12 @@ class GirlsController extends AbstractAction | @@ -16,13 +14,12 @@ class GirlsController extends AbstractAction | ||
16 | // 显示侧边栏 | 14 | // 显示侧边栏 |
17 | $this->setNavSide(); | 15 | $this->setNavSide(); |
18 | 16 | ||
17 | + // 显示顶部下载 | ||
18 | + $this->setHeaderDownload(); | ||
19 | + // 设置顶部信息(搜索) | ||
20 | + $this->setHomeChannelHeader(); | ||
21 | + | ||
19 | $data = array( | 22 | $data = array( |
20 | - 'headerDownload' => $this->getHeaderDownload(), | ||
21 | - 'homeHeader' => array( | ||
22 | - 'bgColor' => '#FF88AE', | ||
23 | - 'searchUrl' => '' | ||
24 | - ), | ||
25 | - 'searchUrl' => '', | ||
26 | 'sideNav' => array(), | 23 | 'sideNav' => array(), |
27 | 'content' => array() | 24 | 'content' => array() |
28 | ); | 25 | ); |
@@ -38,568 +35,18 @@ class GirlsController extends AbstractAction | @@ -38,568 +35,18 @@ class GirlsController extends AbstractAction | ||
38 | $channels = array(); | 35 | $channels = array(); |
39 | if($channelData['code'] == 200) | 36 | if($channelData['code'] == 200) |
40 | { | 37 | { |
41 | - $content = array(); | ||
42 | - $bannerTop = array(); | ||
43 | - $iconsEnter = array(); | ||
44 | - $singleImage = array(); | ||
45 | - $hotCategory = array(); | ||
46 | - $hotBrands = array(); | ||
47 | - $trendColloaction = array(); | ||
48 | - $trendTopics = array(); | ||
49 | - $goodsCategory = array(); | ||
50 | - $recommend_content_two = array(); | ||
51 | - $small_pic = array(); | ||
52 | - | ||
53 | - foreach ($channelData['data']['list'] as $val) { | ||
54 | - $template = $val['template_name']; | ||
55 | - $floorData = $val['data']; | ||
56 | - | ||
57 | - switch ($template) { | ||
58 | - case 'focus': // 焦点图 | ||
59 | - $oneFocus = FloorProcess::$template($floorData); | ||
60 | - $bannerTop[] = $oneFocus; | ||
61 | - break; | ||
62 | - case 'app_icon_list': // 图标列表 | ||
63 | - $oneIcon = FloorProcess::$template($floorData); | ||
64 | - $iconsEnter[] = $oneIcon; | ||
65 | - break; | ||
66 | - case 'single_image': // 单图片 | ||
67 | - $oneImage = FloorProcess::$template($floorData); | ||
68 | - $singleImage[] = $oneImage; | ||
69 | - break; | ||
70 | - case 'recommend_content_five': // 带标题的12个小图推荐 | ||
71 | - $oneHot = FloorProcess::$template($floorData); | ||
72 | - $hotCategory[] = $oneHot; | ||
73 | - break; | ||
74 | - case 'app_hot_brands': // 推荐品牌 | ||
75 | - $oneHotBrand = FloorProcess::$template($floorData); | ||
76 | - $hotBrands[] = $oneHotBrand; | ||
77 | - break; | ||
78 | - case 'trendsetter_collocation': // 潮人·搭配 | ||
79 | - $oneTrendSetter = FloorProcess::$template($floorData); | ||
80 | - $trendColloaction[] = $oneTrendSetter; | ||
81 | - break; | ||
82 | - case 'trendgoods_topic': // 潮品·话题 | ||
83 | - $oneTopic = FloorProcess::$template($floorData); | ||
84 | - $trendTopics[] = $oneTopic; | ||
85 | - break; | ||
86 | - case 'recommend_content_one': // 一张大图一个大的推荐和4个小图推荐 | ||
87 | - $oneGoodCategory = FloorProcess::$template($floorData); | ||
88 | - $goodsCategory[] = $oneGoodCategory; | ||
89 | - break; | ||
90 | - case 'recommend_content_two': // 一张大图和6个小图推荐 | ||
91 | - $oneRecoContTwo = FloorProcess::$template($floorData); | ||
92 | - $recommend_content_two[] = $oneRecoContTwo; | ||
93 | - break; | ||
94 | - case 'small_pic': // 小图片 | ||
95 | - $oneSmallPic = FloorProcess::$template($floorData); | ||
96 | - $small_pic[] = $oneSmallPic; | ||
97 | - break; | ||
98 | - default: | ||
99 | - break; | ||
100 | - } | ||
101 | - } | ||
102 | - | ||
103 | - $content = array( | ||
104 | - 'bannerTop' => $bannerTop, | ||
105 | - 'iconsEnter' => $iconsEnter, | ||
106 | - 'hotCategory' => $hotCategory, | ||
107 | - 'hotBrands' => $hotBrands, | ||
108 | - 'trendColloaction' => $trendColloaction, | ||
109 | - 'trendTopics' => $trendTopics, | ||
110 | - 'goodsCategory' => $goodsCategory | ||
111 | - ); | ||
112 | - | ||
113 | - $data['content'] = $content; | 38 | + $data['content'] = FloorProcess::getContent($channelData['data'], 2); |
114 | } | 39 | } |
115 | 40 | ||
116 | - // 也许喜欢 | ||
117 | - $maybeLikeData = RecomData::mayLike('2,3', 2); | 41 | + /*// 也许喜欢 |
42 | + $maybeLikeData = RecomData::mayLike('2,3', 2, false); | ||
118 | $maybeLike = array(); | 43 | $maybeLike = array(); |
119 | - if($maybeLike['code'] == 200) | 44 | + if($maybeLikeData['code'] == 200) |
120 | { | 45 | { |
121 | - $maybeLike = $maybeLike['data']['product_list']; | ||
122 | - } | ||
123 | - | ||
124 | - /*$data = array( | ||
125 | - 'headerDownload' => array( | ||
126 | - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', | ||
127 | - 'url' => 'http://www.baidu.com' | ||
128 | - ), | ||
129 | - 'homeHeader' => array( | ||
130 | - 'bgColor' => '#FF88AE', | ||
131 | - 'searchUrl' => '' | ||
132 | - ), | ||
133 | - 'sideNav' => array( | ||
134 | - array( | ||
135 | - 'textCn' => '男生', | ||
136 | - 'textEn' => 'Boys', | ||
137 | - 'styleClass' => 'boys', | ||
138 | - 'url' => '' | ||
139 | - ), | ||
140 | - array( | ||
141 | - 'textCn' => '女生', | ||
142 | - 'textEn' => 'GIRLS', | ||
143 | - 'styleClass' => 'girls', | ||
144 | - 'url' => '' | ||
145 | - ), | ||
146 | - array( | ||
147 | - 'textCn' => '潮童', | ||
148 | - 'textEn' => 'KIDS', | ||
149 | - 'styleClass' => 'kids', | ||
150 | - 'url' => '' | ||
151 | - ), | ||
152 | - array( | ||
153 | - 'textCn' => '创意生活', | ||
154 | - 'textEn' => 'LIFE STYLE', | ||
155 | - 'styleClass' => 'life', | ||
156 | - 'url' => '' | ||
157 | - ), | ||
158 | - array( | ||
159 | - 'textCn' => '逛', | ||
160 | - 'textEn' => 'TRENDFINDER', | ||
161 | - 'styleClass' => 'guang', | ||
162 | - 'subNav' => array( | ||
163 | - 'list' => array( | ||
164 | - array( | ||
165 | - 'textCn' => '逛', | ||
166 | - 'textEn' => 'TrendFinder', | ||
167 | - 'back' => true, | ||
168 | - 'bgColor' => '#fd307f' | ||
169 | - ), | ||
170 | - array( | ||
171 | - 'textCn' => '查看全部', | ||
172 | - 'url' => '' | ||
173 | - ), | ||
174 | - array( | ||
175 | - 'textCn' => '只看男生', | ||
176 | - 'textEn' => 'Boys', | ||
177 | - 'url' => '' | ||
178 | - ), | ||
179 | - array( | ||
180 | - 'textCn' => '只看女生', | ||
181 | - 'textEn' => 'Girls', | ||
182 | - 'url' => '', | ||
183 | - 'isSelect' => true | ||
184 | - ) | ||
185 | - ) | ||
186 | - ) | ||
187 | - ) | ||
188 | - ), | ||
189 | - 'content' => array( | ||
190 | - 'bannerTop' => array( | ||
191 | - 'list' => array( | ||
192 | - array( | ||
193 | - 'url' => '', | ||
194 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg' | ||
195 | - ), | ||
196 | - array( | ||
197 | - 'url' => '', | ||
198 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg' | ||
199 | - ), | ||
200 | - array( | ||
201 | - 'url' => '', | ||
202 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg' | ||
203 | - ) | ||
204 | - ) | ||
205 | - ), | ||
206 | - 'iconsEnter' => array( | ||
207 | - 'list' => array( | ||
208 | - array( | ||
209 | - 'url' => '', | ||
210 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
211 | - 'text' => '新品到着' | ||
212 | - ), | ||
213 | - array( | ||
214 | - 'url' => '', | ||
215 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
216 | - 'text' => '全球优选' | ||
217 | - ), | ||
218 | - array( | ||
219 | - 'url' => '', | ||
220 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
221 | - 'text' => '明星潮牌' | ||
222 | - ), | ||
223 | - array( | ||
224 | - 'url' => '', | ||
225 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
226 | - 'text' => '全部品类' | ||
227 | - ), | ||
228 | - array( | ||
229 | - 'url' => '', | ||
230 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
231 | - 'text' => '逛' | ||
232 | - ), | ||
233 | - array( | ||
234 | - 'url' => '', | ||
235 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
236 | - 'text' => '搭配指南' | ||
237 | - ), | ||
238 | - array( | ||
239 | - 'url' => '', | ||
240 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
241 | - 'text' => '潮品推荐' | ||
242 | - ), | ||
243 | - array( | ||
244 | - 'url' => '', | ||
245 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', | ||
246 | - 'text' => '折扣精选' | ||
247 | - ) | ||
248 | - ) | ||
249 | - ), | ||
250 | - 'hotCategory' => array( | ||
251 | - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', | ||
252 | - 'url' => 'http://www.baidu.com', | ||
253 | - 'list' => array( | ||
254 | - array( | ||
255 | - 'textCn' => '打底衫', | ||
256 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
257 | - 'url' => '' | ||
258 | - ), | ||
259 | - array( | ||
260 | - 'textCn' => '打底衫', | ||
261 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
262 | - 'url' => '' | ||
263 | - ), | ||
264 | - array( | ||
265 | - 'textCn' => '打底衫', | ||
266 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
267 | - 'url' => '' | ||
268 | - ), | ||
269 | - array( | ||
270 | - 'textCn' => '打底衫', | ||
271 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
272 | - 'url' => '' | ||
273 | - ), | ||
274 | - array( | ||
275 | - 'textCn' => '打底衫', | ||
276 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
277 | - 'url' => '' | ||
278 | - ), | ||
279 | - array( | ||
280 | - 'textCn' => '打底衫', | ||
281 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
282 | - 'url' => '' | ||
283 | - ), | ||
284 | - array( | ||
285 | - 'textCn' => '打底衫', | ||
286 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
287 | - 'url' => '' | ||
288 | - ), | ||
289 | - array( | ||
290 | - 'textCn' => '打底衫', | ||
291 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
292 | - 'url' => '' | ||
293 | - ), | ||
294 | - array( | ||
295 | - 'textCn' => '打底衫', | ||
296 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
297 | - 'url' => '' | ||
298 | - ) | ||
299 | - ) | ||
300 | - ), | ||
301 | - 'hotBrandsScroll' => array( | ||
302 | - 'name' => '热门品牌', | ||
303 | - 'list' => array( | ||
304 | - array( | ||
305 | - 'textCn' => 'Moussy', | ||
306 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
307 | - 'url' => '' | ||
308 | - ), | ||
309 | - array( | ||
310 | - 'textCn' => 'Moussy', | ||
311 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
312 | - 'url' => '' | ||
313 | - ), | ||
314 | - array( | ||
315 | - 'textCn' => 'Moussy', | ||
316 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
317 | - 'url' => '' | ||
318 | - ), | ||
319 | - array( | ||
320 | - 'textCn' => 'Moussy', | ||
321 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
322 | - 'url' => '' | ||
323 | - ), | ||
324 | - array( | ||
325 | - 'textCn' => 'Moussy', | ||
326 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
327 | - 'url' => '' | ||
328 | - ), | ||
329 | - array( | ||
330 | - 'textCn' => 'Moussy', | ||
331 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
332 | - 'url' => '' | ||
333 | - ), | ||
334 | - array( | ||
335 | - 'textCn' => 'Moussy', | ||
336 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
337 | - 'url' => '' | ||
338 | - ), | ||
339 | - array( | ||
340 | - 'textCn' => 'Moussy', | ||
341 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
342 | - 'url' => '' | ||
343 | - ), | ||
344 | - array( | ||
345 | - 'textCn' => 'Moussy', | ||
346 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
347 | - 'url' => '' | ||
348 | - ) | ||
349 | - ) | ||
350 | - ), | ||
351 | - 'hotBrands' => array( | ||
352 | - 'name' => '热门品牌', | ||
353 | - 'more' => 'www.baidu.com', | ||
354 | - 'brands' => array( | ||
355 | - array( | ||
356 | - 'name' => 'Front Row Shop', | ||
357 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
358 | - 'url' => '' | ||
359 | - ), | ||
360 | - array( | ||
361 | - 'name' => 'dress lab', | ||
362 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
363 | - 'url' => '' | ||
364 | - ), | ||
365 | - array( | ||
366 | - 'name' => 'DEVIL NUT', | ||
367 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
368 | - 'url' => '' | ||
369 | - ), | ||
370 | - array( | ||
371 | - 'name' => 'casselini', | ||
372 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
373 | - 'url' => '' | ||
374 | - ), | ||
375 | - array( | ||
376 | - 'name' => 'haso', | ||
377 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
378 | - 'url' => '' | ||
379 | - ), | ||
380 | - array( | ||
381 | - 'name' => 'EVISU', | ||
382 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
383 | - 'url' => '' | ||
384 | - ) | ||
385 | - ) | ||
386 | - ), | ||
387 | - 'trendColloaction' => array( | ||
388 | - 'name' => '潮人 ▪ 搭配', | ||
389 | - 'more' => '', | ||
390 | - 'leftspan' => array( | ||
391 | - 'url' => '', | ||
392 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg' | ||
393 | - ), | ||
394 | - 'rightspan' => array( | ||
395 | - 'url' => '', | ||
396 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg' | ||
397 | - ), | ||
398 | - 'recommendlist' => array( | ||
399 | - array( | ||
400 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
401 | - 'url' => '' | ||
402 | - ), | ||
403 | - array( | ||
404 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
405 | - 'url' => '' | ||
406 | - ), | ||
407 | - array( | ||
408 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
409 | - 'url' => '' | ||
410 | - ), | ||
411 | - array( | ||
412 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
413 | - 'url' => '' | ||
414 | - ), | ||
415 | - array( | ||
416 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
417 | - 'url' => '' | ||
418 | - ) | ||
419 | - ) | ||
420 | - ), | ||
421 | - 'trendTopics' => array( | ||
422 | - 'name' => '潮品 ▪ 话题', | ||
423 | - 'more' => '', | ||
424 | - 'list' => array( | ||
425 | - array( | ||
426 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
427 | - 'url' => '', | ||
428 | - 'title' => '现代裁剪', | ||
429 | - 'time' => '2月13日 12:34' | ||
430 | - ), | ||
431 | - array( | ||
432 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
433 | - 'url' => '', | ||
434 | - 'title' => '现代裁剪', | ||
435 | - 'time' => '2月13日 12:34' | ||
436 | - ), | ||
437 | - array( | ||
438 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
439 | - 'url' => '', | ||
440 | - 'title' => '现代裁剪', | ||
441 | - 'time' => '2月13日 12:34' | ||
442 | - ) | ||
443 | - ) | ||
444 | - ), | ||
445 | - 'goodsCategory' => array( | ||
446 | - 'name' => '经典裤装', | ||
447 | - 'more' => '', | ||
448 | - 'banner' => array( | ||
449 | - 'list' => array( | ||
450 | - array( | ||
451 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
452 | - 'url' => '' | ||
453 | - ) | ||
454 | - ) | ||
455 | - ), | ||
456 | - 'list' => array( | ||
457 | - array( | ||
458 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
459 | - 'url' => '', | ||
460 | - 'textCn' => '手表' | ||
461 | - ), | ||
462 | - array( | ||
463 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
464 | - 'url' => '', | ||
465 | - 'textCn' => '烛台' | ||
466 | - ), | ||
467 | - array( | ||
468 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
469 | - 'url' => '', | ||
470 | - 'textCn' => '围巾' | ||
471 | - ), | ||
472 | - array( | ||
473 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
474 | - 'url' => '', | ||
475 | - 'textCn' => '盘子' | ||
476 | - ), | ||
477 | - array( | ||
478 | - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', | ||
479 | - 'url' => '', | ||
480 | - 'textCn' => '耳机' | ||
481 | - ) | ||
482 | - ) | ||
483 | - ), | ||
484 | - | ||
485 | - | ||
486 | - 'bannerCenter' => array( | ||
487 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg', | ||
488 | - 'url' => '' | ||
489 | - ), | ||
490 | - | ||
491 | - 'creativeLife' => array( | ||
492 | - 'name' => '创意生活', | ||
493 | - 'more' => '', | ||
494 | - 'url' => '', | ||
495 | - 'banner' => 'http://img10.static.yhbimg.com/yhb-img01/2015/07/09/18/0119ffceddb0819d36d74b408bd743b4a9.jpg?imageView/2/w/640/h/640', | ||
496 | - 'classify' => array( | ||
497 | - array( | ||
498 | - 'url' => '', | ||
499 | - 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/04/10/05/029bef1041343ea2e31dc0423f2f176589.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
500 | - 'name' => '手表' | ||
501 | - ), array( | ||
502 | - 'url' => '', | ||
503 | - 'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/07/07/09/02271a775d17649860abec4387b4559e26.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
504 | - 'name' => '烛台' | ||
505 | - ), array( | ||
506 | - 'url' => '', | ||
507 | - 'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/05/19/07/02a269d20ed44803eee33e255fe88d7873.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
508 | - 'name' => '围巾' | ||
509 | - ), array( | ||
510 | - 'url' => '', | ||
511 | - 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/06/01/07/02fe94083352435ce53b5d90812cc5bdbd.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
512 | - 'name' => '盘子' | ||
513 | - ), array( | ||
514 | - 'url' => '', | ||
515 | - 'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/07/08/07/028db8a2afbe4ecbf37bebc7e98e8e1e80.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
516 | - 'name' => '耳机' | ||
517 | - ), array( | ||
518 | - 'url' => '', | ||
519 | - 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/04/22/02/02a1b688b6dafd786f391e0624aea1e93b.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
520 | - 'name' => '生活' | ||
521 | - ) | ||
522 | - ) | ||
523 | - ), | ||
524 | - | ||
525 | - | ||
526 | - 'plusStar' => array( | ||
527 | - 'name' => 'PLUS 全球优选', | ||
528 | - 'url' => '', | ||
529 | - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/13/15/014f7ba48071160053ac3b8f045b9fc264.jpg?imageView/2/w/640/h/640' | ||
530 | - ), | ||
531 | - | ||
532 | - 'bannerCenter' => array( | ||
533 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg', | ||
534 | - 'url' => '' | ||
535 | - ), | ||
536 | - | ||
537 | - 'plusStar' => array( | ||
538 | - 'name' => 'STAR 明星潮牌', | ||
539 | - 'url' => '', | ||
540 | - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/13/15/014f7ba48071160053ac3b8f045b9fc264.jpg?imageView/2/w/640/h/640' | ||
541 | - | ||
542 | - ), | ||
543 | - 'bannerCenter' => array( | ||
544 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg', | ||
545 | - 'url' => '' | ||
546 | - ), | ||
547 | - | ||
548 | - 'maybeLike' => array( | ||
549 | - 'goods' => array( | ||
550 | - array( | ||
551 | - 'id' => 1, | ||
552 | - 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/03/02/07/01ebfb219e22770ffb0c2c3a2cbb2b4bef.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
553 | - 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣', | ||
554 | - 'isLike' => false, | ||
555 | - 'price' => 1268, | ||
556 | - 'salePrice' => 589, | ||
557 | - 'isSale' => true, | ||
558 | - 'isFew' => true, | ||
559 | - 'isNew' => false, | ||
560 | - 'url' => '' | ||
561 | - ), array( | ||
562 | - 'id' => 2, | ||
563 | - 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/03/08/023d70c59e81ccbfb39404487aaf642da2.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
564 | - 'name' => 'CLOTtee 撞色连帽外套', | ||
565 | - 'isLike' => false, | ||
566 | - 'price' => 488, | ||
567 | - 'salePrice' => 139, | ||
568 | - 'isSale' => true, | ||
569 | - 'isFew' => true, | ||
570 | - 'isNew' => false, | ||
571 | - 'url' => '' | ||
572 | - ), array( | ||
573 | - 'id' => 3, | ||
574 | - 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/03/02/08/02e2d44125e95495e3152aa459fa6b9b0c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
575 | - 'name' => 'HALFGIRL 插肩棒球服短裙套装', | ||
576 | - 'isLike' => true, | ||
577 | - 'price' => 478, | ||
578 | - 'salePrice' => 208, | ||
579 | - 'isSale' => true, | ||
580 | - 'isFew' => true, | ||
581 | - 'isNew' => false, | ||
582 | - 'url' => '' | ||
583 | - ), array( | ||
584 | - 'id' => 4, | ||
585 | - 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/03/03/08/022f25fbe177ee12803c522f04fcce06d0.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
586 | - 'name' => '黄伟文Wyman X yohood联名商品YYYOHOOD连帽卫衣', | ||
587 | - 'isLike' => false, | ||
588 | - 'salePrice' => 148, | ||
589 | - 'isSale' => false, | ||
590 | - 'isFew' => false, | ||
591 | - 'isNew' => true, | ||
592 | - 'url' => '' | ||
593 | - ) | ||
594 | - ) | ||
595 | - ), | ||
596 | - | ||
597 | - 'bannerBottom' => array( | ||
598 | - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg', | ||
599 | - 'url' => '' | ||
600 | - ) | ||
601 | - | ||
602 | - ));*/ | 46 | + $maybeLike = FloorProcess::maybeLike($maybeLikeData['data']['product_list']); |
47 | + $num = count($data['content']); | ||
48 | + $data['content'][] = array('maybeLike' =>$maybeLike); | ||
49 | + }*/ | ||
603 | 50 | ||
604 | $this->_view->assign('title', 'YOHO!有货'); | 51 | $this->_view->assign('title', 'YOHO!有货'); |
605 | $this->_view->display('index', $data); | 52 | $this->_view->display('index', $data); |
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use Action\AbstractAction; | 3 | use Action\AbstractAction; |
4 | -use LibModels\Wap\Home\IndexData as Index; | 4 | +use LibModels\Wap\Home\IndexData; |
5 | +use Plugin\FloorProcess; | ||
5 | /** | 6 | /** |
6 | * 潮童首页 | 7 | * 潮童首页 |
7 | */ | 8 | */ |
@@ -10,16 +11,34 @@ class KidsController extends AbstractAction | @@ -10,16 +11,34 @@ class KidsController extends AbstractAction | ||
10 | 11 | ||
11 | public function indexAction() | 12 | public function indexAction() |
12 | { | 13 | { |
13 | - // 频道数据 | ||
14 | - $channelData = Index::getUserChannelData(0, '', 'e9875682c1599a886bfbdb965b740022'); | ||
15 | - | ||
16 | - echo '<pre>'; | ||
17 | - print_r($channelData); | ||
18 | - | ||
19 | - $this->_view->assign('title', 'YOHO!有货'); | ||
20 | - $this->_view->display('kids', compact('channelData')); | ||
21 | - | ||
22 | // 显示侧边栏 | 14 | // 显示侧边栏 |
23 | $this->setNavSide(); | 15 | $this->setNavSide(); |
16 | + | ||
17 | + // 显示顶部下载 | ||
18 | + $this->setHeaderDownload(); | ||
19 | + // 设置顶部信息(搜索) | ||
20 | + $this->setHomeChannelHeader(); | ||
21 | + | ||
22 | + $data = array( | ||
23 | + 'sideNav' => array(), | ||
24 | + 'content' => array() | ||
25 | + ); | ||
26 | + | ||
27 | + $sideDatas = IndexData::getHomeChannels(); | ||
28 | + if($sideDatas['code'] == 200) | ||
29 | + { | ||
30 | + $data['sideNav'] = $sideDatas['data']; | ||
31 | + } | ||
32 | + | ||
33 | + // 频道数据 | ||
34 | + $channelData = IndexData::getUserChannelData(0, '', 'e9875682c1599a886bfbdb965b740022'); | ||
35 | + $channels = array(); | ||
36 | + if($channelData['code'] == 200) | ||
37 | + { | ||
38 | + $data['content'] = FloorProcess::getContent($channelData['data'], 3); | ||
39 | + } | ||
40 | + | ||
41 | + $this->_view->assign('title', 'YOHO!有货'); | ||
42 | + $this->_view->display('index', $data); | ||
24 | } | 43 | } |
25 | } | 44 | } |
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use Action\AbstractAction; | 3 | use Action\AbstractAction; |
4 | -use LibModels\Wap\Home\IndexData as Index; | 4 | +use LibModels\Wap\Home\IndexData; |
5 | +use Plugin\FloorProcess; | ||
5 | 6 | ||
6 | /** | 7 | /** |
7 | * 创意生活首页 | 8 | * 创意生活首页 |
@@ -11,17 +12,35 @@ class LifestyleController extends AbstractAction | @@ -11,17 +12,35 @@ class LifestyleController extends AbstractAction | ||
11 | 12 | ||
12 | public function indexAction() | 13 | public function indexAction() |
13 | { | 14 | { |
14 | - // 频道数据 | ||
15 | - $channelData = Index::getUserChannelData(0, '1,3', '9aa25f5133f011ec96c2045eb15ae425'); | 15 | + // 显示侧边栏 |
16 | + $this->setNavSide(); | ||
16 | 17 | ||
17 | - echo '<pre>'; | ||
18 | - print_r($channelData); | 18 | + // 显示顶部下载 |
19 | + $this->setHeaderDownload(); | ||
20 | + // 设置顶部信息(搜索) | ||
21 | + $this->setHomeChannelHeader(); | ||
19 | 22 | ||
20 | - $this->_view->assign('title', 'YOHO!有货'); | ||
21 | - $this->_view->display('lifestyle', compact('channelData')); | 23 | + $data = array( |
24 | + 'sideNav' => array(), | ||
25 | + 'content' => array() | ||
26 | + ); | ||
22 | 27 | ||
23 | - // 显示侧边栏 | ||
24 | - $this->setNavSide(); | 28 | + $sideDatas = IndexData::getHomeChannels(); |
29 | + if($sideDatas['code'] == 200) | ||
30 | + { | ||
31 | + $data['sideNav'] = $sideDatas['data']; | ||
32 | + } | ||
33 | + | ||
34 | + // 频道数据 | ||
35 | + $channelData = IndexData::getUserChannelData(0, '1,3', '9aa25f5133f011ec96c2045eb15ae425'); | ||
36 | + $channels = array(); | ||
37 | + if($channelData['code'] == 200) | ||
38 | + { | ||
39 | + $data['content'] = FloorProcess::getContent($channelData['data'], 4); | ||
40 | + } | ||
41 | + | ||
42 | + $this->_view->assign('title', 'YOHO!有货'); | ||
43 | + $this->_view->display('index', $data); | ||
25 | } | 44 | } |
26 | 45 | ||
27 | } | 46 | } |
-
Please register or login to post a comment