Authored by Rock Zhang

添加楼层处理类

  1 +<?php
  2 +
  3 +namespace Plugin;
  4 +
  5 +/**
  6 + * 楼层数据处理类
  7 + */
  8 +class FloorProcess
  9 +{
  10 +
  11 + /**
  12 + * 焦点图数据处理方法
  13 + * @param array $data 焦点图数据
  14 + * @return array 处理之后的焦点图数据
  15 + */
  16 + public static function focus($data)
  17 + {
  18 + $result = array();
  19 +
  20 + foreach ($data as &$one) {
  21 + $one['img'] = Helpers::getImageUrl($one['src'], 750, 364, 1);
  22 + unset($one['src']);
  23 + }
  24 + $result['list'] = $data;
  25 +
  26 + return $result;
  27 + }
  28 +
  29 + /**
  30 + * 图标列表数据处理方法
  31 + * @param array $data 图标列表数据
  32 + * @return array 处理之后的图标列表数据
  33 + */
  34 + public static function app_icon_list($data)
  35 + {
  36 + $result = array();
  37 +
  38 + foreach ($data as &$one) {
  39 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  40 + unset($one['src']);
  41 + }
  42 + $result['list'] = $data;
  43 +
  44 + return $result;
  45 + }
  46 +
  47 + /**
  48 + * 单图片数据处理方法
  49 + * @param array $data 单图片数据
  50 + * @return array 处理之后的单图片数据
  51 + */
  52 + public static function single_image($data)
  53 + {
  54 + $result = array();
  55 +
  56 + foreach ($data as &$one) {
  57 + $one['img'] = Helpers::getImageUrl($one['src'], 750, 364, 1);
  58 + }
  59 + $result['list'] = $data;
  60 +
  61 + return $result;
  62 + }
  63 +
  64 + /**
  65 + * 带标题的12个小图推荐数据处理方法
  66 + * @param array $data 带标题的12个小图推荐数据
  67 + * @return array 处理之后的带标题的12个小图推荐数据
  68 + */
  69 + public static function recommend_content_five($data)
  70 + {
  71 + $result = array();
  72 +
  73 + foreach ($data['list'] as &$one) {
  74 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  75 + unset($one['src']);
  76 + }
  77 + $result = $data;
  78 +
  79 + return $result;
  80 + }
  81 +
  82 + /**
  83 + * 推荐品牌数据处理方法
  84 + * @param array $data 推荐品牌数据
  85 + * @return array 处理之后的推荐品牌数据
  86 + */
  87 + public static function app_hot_brands($data)
  88 + {
  89 + $result = array();
  90 +
  91 + $data['name'] = $data['title']['title'];
  92 + unset($data['title']);
  93 + foreach ($data['list'] as &$one) {
  94 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  95 + unset($one['src']);
  96 + }
  97 + $result = $data;
  98 +
  99 + return $result;
  100 + }
  101 +
  102 + /**
  103 + * 潮人·搭配数据处理方法
  104 + * @param array $data 潮人·搭配数据
  105 + * @return array 处理之后的潮人·搭配数据
  106 + */
  107 + public static function trendsetter_collocation($data)
  108 + {
  109 + $result = array();
  110 +
  111 + foreach ($data['article'] as &$one) {
  112 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  113 + unset($one['src']);
  114 + }
  115 + foreach ($data['recommend_collocation'] as &$one) {
  116 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  117 + unset($one['src']);
  118 + }
  119 + $result = $data;
  120 +
  121 + return $result;
  122 + }
  123 +
  124 + /**
  125 + * 潮品·话题数据处理方法
  126 + * @param array $data 潮品·话题数据
  127 + * @return array 处理之后的潮品·话题数据
  128 + */
  129 + public static function trendgoods_topic($data)
  130 + {
  131 + $result = array();
  132 +
  133 + foreach ($data['list'] as &$one) {
  134 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  135 + unset($one['src']);
  136 + }
  137 + $result = $data;
  138 +
  139 + return $result;
  140 + }
  141 +
  142 + /**
  143 + * 一张大图一个大的推荐和4个小图推荐数据处理方法
  144 + * @param array $data 一张大图一个大的推荐和4个小图推荐数据
  145 + * @return array 处理之后的一张大图一个大的推荐和4个小图推荐数据
  146 + */
  147 + public static function recommend_content_one($data)
  148 + {
  149 + $result = array();
  150 +
  151 + foreach ($data['big_image'] as &$one) {
  152 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  153 + unset($one['src']);
  154 + }
  155 + foreach ($data['list'] as &$one) {
  156 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  157 + unset($one['src']);
  158 + }
  159 + $result = $data;
  160 +
  161 + return $result;
  162 + }
  163 +
  164 + /**
  165 + * 一张大图和6个小图推荐数据处理方法
  166 + * @param array $data 一张大图和6个小图推荐数据
  167 + * @return array 处理之后的一张大图和6个小图推荐数据
  168 + */
  169 + public static function recommend_content_two($data)
  170 + {
  171 + $result = array();
  172 +
  173 + foreach ($data['big_image'] as &$one) {
  174 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  175 + unset($one['src']);
  176 + }
  177 + foreach ($data['list'] as &$one) {
  178 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  179 + unset($one['src']);
  180 + }
  181 + $result = $data;
  182 +
  183 + return $result;
  184 + }
  185 +
  186 + /**
  187 + * 小图片数据处理方法
  188 + * @param array $data 小图片数据
  189 + * @return array 处理之后的小图片数据
  190 + */
  191 + public static function small_pic($data)
  192 + {
  193 + $result = array();
  194 +
  195 + foreach ($data as &$one) {
  196 + $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
  197 + unset($one['src']);
  198 + }
  199 + $result = $data;
  200 +
  201 + return $result;
  202 + }
  203 +}
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 use Action\AbstractAction; 3 use Action\AbstractAction;
4 use LibModels\Wap\Home\IndexData; 4 use LibModels\Wap\Home\IndexData;
5 use Plugin\Helpers; 5 use Plugin\Helpers;
  6 +use Plugin\FloorProcess;
6 /** 7 /**
7 * 女生首页 8 * 女生首页
8 */ 9 */
@@ -45,102 +46,57 @@ class GirlsController extends AbstractAction @@ -45,102 +46,57 @@ class GirlsController extends AbstractAction
45 $recommend_content_two = array(); 46 $recommend_content_two = array();
46 $small_pic = array(); 47 $small_pic = array();
47 48
48 - foreach ($channelData['data']['list'] as $key => $val) {  
49 - switch ($val['template_name']) { 49 + foreach ($channelData['data']['list'] as $val) {
  50 + $template = $val['template_name'];
  51 + $floorData = $val['data'];
  52 +
  53 + switch ($template) {
50 case 'focus': // 焦点图 54 case 'focus': // 焦点图
51 - $oneFocus = array();  
52 - foreach ($val['data'] as &$one) {  
53 - $one['img'] = Helpers::getImageUrl($one['src'], 750, 364, 1);  
54 - }  
55 - $oneFocus['list'] = $val['data']; 55 + $oneFocus = FloorProcess::$template($floorData);
56 $bannerTop[] = $oneFocus; 56 $bannerTop[] = $oneFocus;
57 break; 57 break;
58 case 'app_icon_list': // 图标列表 58 case 'app_icon_list': // 图标列表
59 - $oneIcon = array();  
60 - foreach ($val['data'] as &$one) {  
61 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
62 - }  
63 - $oneIcon['list'] = $val['data']; 59 + $oneIcon = FloorProcess::$template($floorData);
64 $iconsEnter[] = $oneIcon; 60 $iconsEnter[] = $oneIcon;
65 break; 61 break;
66 case 'single_image': // 单图片 62 case 'single_image': // 单图片
67 - $oneImage = array();  
68 - foreach ($val['data'] as &$one) {  
69 - $one['img'] = Helpers::getImageUrl($one['src'], 750, 364, 1);  
70 - }  
71 - $oneImage['list'] = $val['data']; 63 + $oneImage = FloorProcess::$template($floorData);
72 $singleImage[] = $oneImage; 64 $singleImage[] = $oneImage;
73 break; 65 break;
74 case 'recommend_content_five': // 带标题的12个小图推荐 66 case 'recommend_content_five': // 带标题的12个小图推荐
75 - $oneHot = array();  
76 - foreach ($val['data']['list'] as &$one) {  
77 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
78 - }  
79 - $oneHot = $val['data']; 67 + $oneHot = FloorProcess::$template($floorData);
80 $hotCategory[] = $oneHot; 68 $hotCategory[] = $oneHot;
81 break; 69 break;
82 case 'app_hot_brands': // 推荐品牌 70 case 'app_hot_brands': // 推荐品牌
83 - $oneHotBrand = array();  
84 - foreach ($val['data']['list'] as &$one) {  
85 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
86 - }  
87 - $oneHotBrand = $val['data']; 71 + $oneHotBrand = FloorProcess::$template($floorData);
88 $hotBrandsScroll[] = $oneHotBrand; 72 $hotBrandsScroll[] = $oneHotBrand;
89 break; 73 break;
90 case 'trendsetter_collocation': // 潮人·搭配 74 case 'trendsetter_collocation': // 潮人·搭配
91 - $oneTrendSetter = array();  
92 - foreach ($val['data']['article'] as &$one) {  
93 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
94 - }  
95 - foreach ($val['data']['recommend_collocation'] as &$one) {  
96 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
97 - }  
98 - $oneTrendSetter = $val['data']; 75 + $oneTrendSetter = FloorProcess::$template($floorData);
99 $trendColloaction[] = $oneTrendSetter; 76 $trendColloaction[] = $oneTrendSetter;
100 break; 77 break;
101 case 'trendgoods_topic': // 潮品·话题 78 case 'trendgoods_topic': // 潮品·话题
102 - $oneTopic = array();  
103 - foreach ($val['data']['list'] as &$one) {  
104 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
105 - }  
106 - $oneTopic = $val['data']; 79 + $oneTopic = FloorProcess::$template($floorData);
107 $trendTopics[] = $oneTopic; 80 $trendTopics[] = $oneTopic;
108 break; 81 break;
109 case 'recommend_content_one': // 一张大图一个大的推荐和4个小图推荐 82 case 'recommend_content_one': // 一张大图一个大的推荐和4个小图推荐
110 - $oneGoodCategory = array();  
111 - foreach ($val['data']['big_image'] as &$one) {  
112 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
113 - }  
114 - foreach ($val['data']['list'] as &$one) {  
115 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
116 - }  
117 - $oneGoodCategory = $val['data']; 83 + $oneGoodCategory = FloorProcess::$template($floorData);
118 $goodsCategory[] = $oneGoodCategory; 84 $goodsCategory[] = $oneGoodCategory;
119 break; 85 break;
120 case 'recommend_content_two': // 一张大图和6个小图推荐 86 case 'recommend_content_two': // 一张大图和6个小图推荐
121 - $oneRecoContTwo = array();  
122 - foreach ($val['data']['big_image'] as &$one) {  
123 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
124 - }  
125 - foreach ($val['data']['list'] as &$one) {  
126 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
127 - }  
128 - $oneRecoContTwo = $val['data']; 87 + $oneRecoContTwo = FloorProcess::$template($floorData);
129 $recommend_content_two[] = $oneRecoContTwo; 88 $recommend_content_two[] = $oneRecoContTwo;
130 break; 89 break;
131 case 'small_pic': // 小图片 90 case 'small_pic': // 小图片
132 - $oneSmallPic = array();  
133 - foreach ($val['data'] as &$one) {  
134 - $one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);  
135 - }  
136 - $oneSmallPic = $val['data']; 91 + $oneSmallPic = FloorProcess::$template($floorData);
137 $small_pic[] = $oneSmallPic; 92 $small_pic[] = $oneSmallPic;
138 break; 93 break;
139 default: 94 default:
140 break; 95 break;
141 } 96 }
  97 + }
142 98
143 - $content[$key] = array( 99 + $content = array(
144 'bannerTop' => $bannerTop, 100 'bannerTop' => $bannerTop,
145 'iconsEnter' => $iconsEnter, 101 'iconsEnter' => $iconsEnter,
146 'hotCategory' => $hotCategory, 102 'hotCategory' => $hotCategory,
@@ -149,380 +105,11 @@ class GirlsController extends AbstractAction @@ -149,380 +105,11 @@ class GirlsController extends AbstractAction
149 'trendTopics' => $trendTopics, 105 'trendTopics' => $trendTopics,
150 'goodsCategory' => $goodsCategory 106 'goodsCategory' => $goodsCategory
151 ); 107 );
152 - }  
153 108
154 $data['content'] = $content; 109 $data['content'] = $content;
155 } 110 }
156 -  
157 - $this->_view->assign('title', 'YOHO!有货');  
158 - $this->_view->display('index', $data);  
159 -  
160 - // 显示侧边栏  
161 - $this->setNavSide();  
162 -  
163 - $data = array(  
164 - 'headerDownload' => array(  
165 - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',  
166 - 'url' => 'http://www.baidu.com'  
167 - ),  
168 - 'homeHeader' => array(  
169 - 'bgColor' => '#FF88AE',  
170 - 'searchUrl' => ''  
171 - ),  
172 - 'sideNav' => array(  
173 - array(  
174 - 'textCn' => '男生',  
175 - 'textEn' => 'Boys',  
176 - 'styleClass' => 'boys',  
177 - 'url' => ''  
178 - ),  
179 - array(  
180 - 'textCn' => '女生',  
181 - 'textEn' => 'GIRLS',  
182 - 'styleClass' => 'girls',  
183 - 'url' => ''  
184 - ),  
185 - array(  
186 - 'textCn' => '潮童',  
187 - 'textEn' => 'KIDS',  
188 - 'styleClass' => 'kids',  
189 - 'url' => ''  
190 - ),  
191 - array(  
192 - 'textCn' => '创意生活',  
193 - 'textEn' => 'LIFE STYLE',  
194 - 'styleClass' => 'life',  
195 - 'url' => ''  
196 - ),  
197 - array(  
198 - 'textCn' => '逛',  
199 - 'textEn' => 'TRENDFINDER',  
200 - 'styleClass' => 'guang',  
201 - 'subNav' => array(  
202 - 'list' => array(  
203 - array(  
204 - 'textCn' => '逛',  
205 - 'textEn' => 'TrendFinder',  
206 - 'back' => true,  
207 - 'bgColor' => '#fd307f'  
208 - ),  
209 - array(  
210 - 'textCn' => '查看全部',  
211 - 'url' => ''  
212 - ),  
213 - array(  
214 - 'textCn' => '只看男生',  
215 - 'textEn' => 'Boys',  
216 - 'url' => ''  
217 - ),  
218 - array(  
219 - 'textCn' => '只看女生',  
220 - 'textEn' => 'Girls',  
221 - 'url' => '',  
222 - 'isSelect' => true  
223 - )  
224 - )  
225 - )  
226 - )  
227 - ),  
228 - 'content' => array(  
229 - 'bannerTop' => array(  
230 - 'list' => array(  
231 - array(  
232 - 'url' => '',  
233 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'  
234 - ),  
235 - array(  
236 - 'url' => '',  
237 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'  
238 - ),  
239 - array(  
240 - 'url' => '',  
241 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'  
242 - )  
243 - )  
244 - ),  
245 - 'iconsEnter' => array(  
246 - 'list' => array(  
247 - array(  
248 - 'url' => '',  
249 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
250 - 'text' => '新品到着'  
251 - ),  
252 - array(  
253 - 'url' => '',  
254 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
255 - 'text' => '全球优选'  
256 - ),  
257 - array(  
258 - 'url' => '',  
259 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
260 - 'text' => '明星潮牌'  
261 - ),  
262 - array(  
263 - 'url' => '',  
264 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
265 - 'text' => '全部品类'  
266 - ),  
267 - array(  
268 - 'url' => '',  
269 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
270 - 'text' => '逛'  
271 - ),  
272 - array(  
273 - 'url' => '',  
274 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
275 - 'text' => '搭配指南'  
276 - ),  
277 - array(  
278 - 'url' => '',  
279 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
280 - 'text' => '潮品推荐'  
281 - ),  
282 - array(  
283 - 'url' => '',  
284 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
285 - 'text' => '折扣精选'  
286 - )  
287 - )  
288 - ),  
289 - 'hotCategory' => array(  
290 - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',  
291 - 'url' => 'http://www.baidu.com',  
292 - 'list' => array(  
293 - array(  
294 - 'textCn' => '打底衫',  
295 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
296 - 'url' => ''  
297 - ),  
298 - array(  
299 - 'textCn' => '打底衫',  
300 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
301 - 'url' => ''  
302 - ),  
303 - array(  
304 - 'textCn' => '打底衫',  
305 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
306 - 'url' => ''  
307 - ),  
308 - array(  
309 - 'textCn' => '打底衫',  
310 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
311 - 'url' => ''  
312 - ),  
313 - array(  
314 - 'textCn' => '打底衫',  
315 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
316 - 'url' => ''  
317 - ),  
318 - array(  
319 - 'textCn' => '打底衫',  
320 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
321 - 'url' => ''  
322 - ),  
323 - array(  
324 - 'textCn' => '打底衫',  
325 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
326 - 'url' => ''  
327 - ),  
328 - array(  
329 - 'textCn' => '打底衫',  
330 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
331 - 'url' => ''  
332 - ),  
333 - array(  
334 - 'textCn' => '打底衫',  
335 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
336 - 'url' => ''  
337 - )  
338 - )  
339 - ),  
340 - 'hotBrandsScroll' => array(  
341 - 'name' => '热门品牌',  
342 - 'list' => array(  
343 - array(  
344 - 'textCn' => 'Moussy',  
345 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
346 - 'url' => ''  
347 - ),  
348 - array(  
349 - 'textCn' => 'Moussy',  
350 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
351 - 'url' => ''  
352 - ),  
353 - array(  
354 - 'textCn' => 'Moussy',  
355 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
356 - 'url' => ''  
357 - ),  
358 - array(  
359 - 'textCn' => 'Moussy',  
360 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
361 - 'url' => ''  
362 - ),  
363 - array(  
364 - 'textCn' => 'Moussy',  
365 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
366 - 'url' => ''  
367 - ),  
368 - array(  
369 - 'textCn' => 'Moussy',  
370 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
371 - 'url' => ''  
372 - ),  
373 - array(  
374 - 'textCn' => 'Moussy',  
375 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
376 - 'url' => ''  
377 - ),  
378 - array(  
379 - 'textCn' => 'Moussy',  
380 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
381 - 'url' => ''  
382 - ),  
383 - array(  
384 - 'textCn' => 'Moussy',  
385 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
386 - 'url' => ''  
387 - )  
388 - )  
389 - ),  
390 - 'hotBrands' => array(  
391 - 'name' => '热门品牌',  
392 - 'more' => 'www.baidu.com',  
393 - 'brands' => array(  
394 - array(  
395 - 'name' => 'Front Row Shop',  
396 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
397 - 'url' => ''  
398 - ),  
399 - array(  
400 - 'name' => 'dress lab',  
401 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
402 - 'url' => ''  
403 - ),  
404 - array(  
405 - 'name' => 'DEVIL NUT',  
406 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
407 - 'url' => ''  
408 - ),  
409 - array(  
410 - 'name' => 'casselini',  
411 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
412 - 'url' => ''  
413 - ),  
414 - array(  
415 - 'name' => 'haso',  
416 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
417 - 'url' => ''  
418 - ),  
419 - array(  
420 - 'name' => 'EVISU',  
421 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
422 - 'url' => ''  
423 - )  
424 - )  
425 - ),  
426 - 'trendColloaction' => array(  
427 - 'name' => '潮人 ▪ 搭配',  
428 - 'more' => '',  
429 - 'leftspan' => array(  
430 - 'url' => '',  
431 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'  
432 - ),  
433 - 'rightspan' => array(  
434 - 'url' => '',  
435 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'  
436 - ),  
437 - 'recommendlist' => array(  
438 - array(  
439 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
440 - 'url' => ''  
441 - ),  
442 - array(  
443 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
444 - 'url' => ''  
445 - ),  
446 - array(  
447 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
448 - 'url' => ''  
449 - ),  
450 - array(  
451 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
452 - 'url' => ''  
453 - ),  
454 - array(  
455 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
456 - 'url' => ''  
457 - )  
458 - )  
459 - ),  
460 - 'trendTopics' => array(  
461 - 'name' => '潮品 ▪ 话题',  
462 - 'more' => '',  
463 - 'list' => array(  
464 - array(  
465 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
466 - 'url' => '',  
467 - 'title' => '现代裁剪',  
468 - 'time' => '2月13日 12:34'  
469 - ),  
470 - array(  
471 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
472 - 'url' => '',  
473 - 'title' => '现代裁剪',  
474 - 'time' => '2月13日 12:34'  
475 - ),  
476 - array(  
477 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
478 - 'url' => '',  
479 - 'title' => '现代裁剪',  
480 - 'time' => '2月13日 12:34'  
481 - )  
482 - )  
483 - ),  
484 - 'goodsCategory' => array(  
485 - 'name' => '经典裤装',  
486 - 'more' => '',  
487 - 'banner' => array(  
488 - 'list' => array(  
489 - array(  
490 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
491 - 'url' => ''  
492 - )  
493 - )  
494 - ),  
495 - 'list' => array(  
496 - array(  
497 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
498 - 'url' => '',  
499 - 'textCn' => '手表'  
500 - ),  
501 - array(  
502 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
503 - 'url' => '',  
504 - 'textCn' => '烛台'  
505 - ),  
506 - array(  
507 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
508 - 'url' => '',  
509 - 'textCn' => '围巾'  
510 - ),  
511 - array(  
512 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
513 - 'url' => '',  
514 - 'textCn' => '盘子'  
515 - ),  
516 - array(  
517 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
518 - 'url' => '',  
519 - 'textCn' => '耳机'  
520 - )  
521 - )  
522 - )  
523 - ));  
524 -  
525 - 111 + echo '<pre>';
  112 + print_r($data);exit;
526 113
527 $this->_view->assign('title', 'YOHO!有货'); 114 $this->_view->assign('title', 'YOHO!有货');
528 $this->_view->display('index', $data); 115 $this->_view->display('index', $data);