|
@@ -2,6 +2,10 @@ |
|
@@ -2,6 +2,10 @@ |
2
|
use Action\WebAction;
|
2
|
use Action\WebAction;
|
3
|
use LibModels\Web\Product\BrandData;
|
3
|
use LibModels\Web\Product\BrandData;
|
4
|
|
4
|
|
|
|
5
|
+use LibModels\Web\Product\HotrankData;
|
|
|
6
|
+use product\HotrankModel;
|
|
|
7
|
+use LibModels\Web\Home\IndexData;
|
|
|
8
|
+
|
5
|
class IndexController extends WebAction
|
9
|
class IndexController extends WebAction
|
6
|
{
|
10
|
{
|
7
|
/**
|
11
|
/**
|
|
@@ -47,5 +51,240 @@ class IndexController extends WebAction |
|
@@ -47,5 +51,240 @@ class IndexController extends WebAction |
47
|
//渲染模板
|
51
|
//渲染模板
|
48
|
$this->_view->display('list',$data);
|
52
|
$this->_view->display('list',$data);
|
49
|
}
|
53
|
}
|
|
|
54
|
+
|
|
|
55
|
+ public function hotrankAction() {
|
|
|
56
|
+ $this->setWebNavHeader(\Index\HomeModel::COOKIE_NAME_LIFESTYLE);
|
|
|
57
|
+ $data = array(
|
|
|
58
|
+ 'hotrankPage' => true,
|
|
|
59
|
+ 'hotrank' => array(
|
|
|
60
|
+ array(
|
|
|
61
|
+ 'slide' => array(
|
|
|
62
|
+ 'list' => array(
|
|
|
63
|
+ array(
|
|
|
64
|
+ 'href' => '/?gender=1,3',
|
|
|
65
|
+ 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
66
|
+ ),
|
|
|
67
|
+ array(
|
|
|
68
|
+ 'href' => '/?gender=1,3',
|
|
|
69
|
+ 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
70
|
+ ),
|
|
|
71
|
+ array(
|
|
|
72
|
+ 'href' => '/?gender=1,3',
|
|
|
73
|
+ 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
74
|
+ ),
|
|
|
75
|
+ array(
|
|
|
76
|
+ 'href' => '/?gender=1,3',
|
|
|
77
|
+ 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
78
|
+ ),
|
|
|
79
|
+ array(
|
|
|
80
|
+ 'href' => '/?gender=1,3',
|
|
|
81
|
+ 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
82
|
+ ),
|
|
|
83
|
+ array(
|
|
|
84
|
+ 'href' => '/?gender=1,3',
|
|
|
85
|
+ 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
86
|
+ ),
|
|
|
87
|
+ array(
|
|
|
88
|
+ 'href' => '/?gender=1,3',
|
|
|
89
|
+ 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
90
|
+ ),
|
|
|
91
|
+ array(
|
|
|
92
|
+ 'href' => '/?gender=1,3',
|
|
|
93
|
+ 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
94
|
+ )
|
|
|
95
|
+ )
|
|
|
96
|
+ )
|
|
|
97
|
+ ),
|
|
|
98
|
+ array(
|
|
|
99
|
+ 'popular' => array(
|
|
|
100
|
+ 'name' => '人气单品',
|
|
|
101
|
+ 'list' => array(
|
|
|
102
|
+ array(
|
|
|
103
|
+ 'href' => '',
|
|
|
104
|
+ 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
105
|
+ 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
106
|
+ 'price' => '399',
|
|
|
107
|
+ 'sPrice' => '199',
|
|
|
108
|
+ 'rank' => '1'
|
|
|
109
|
+ ),
|
|
|
110
|
+ array(
|
|
|
111
|
+ 'href' => '',
|
|
|
112
|
+ 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
113
|
+ 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
114
|
+ 'price' => '399',
|
|
|
115
|
+ 'sPrice' => '199',
|
|
|
116
|
+ 'rank' => '2'
|
|
|
117
|
+ ),
|
|
|
118
|
+ array(
|
|
|
119
|
+ 'href' => '',
|
|
|
120
|
+ 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
121
|
+ 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
122
|
+ 'price' => '399',
|
|
|
123
|
+ 'sPrice' => '199',
|
|
|
124
|
+ 'rank' => '3'
|
|
|
125
|
+ ),
|
|
|
126
|
+ array(
|
|
|
127
|
+ 'href' => '',
|
|
|
128
|
+ 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
129
|
+ 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
130
|
+ 'price' => '399',
|
|
|
131
|
+ 'sPrice' => '199',
|
|
|
132
|
+ 'rank' => '4'
|
|
|
133
|
+ ),
|
|
|
134
|
+ array(
|
|
|
135
|
+ 'href' => '',
|
|
|
136
|
+ 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
137
|
+ 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
138
|
+ 'price' => '399',
|
|
|
139
|
+ 'sPrice' => '199',
|
|
|
140
|
+ 'rank' => '5'
|
|
|
141
|
+ ),
|
|
|
142
|
+ array(
|
|
|
143
|
+ 'href' => '',
|
|
|
144
|
+ 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
145
|
+ 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
146
|
+ 'price' => '399',
|
|
|
147
|
+ 'sPrice' => '199',
|
|
|
148
|
+ 'rank' => '6'
|
|
|
149
|
+ ),
|
|
|
150
|
+ array(
|
|
|
151
|
+ 'href' => '',
|
|
|
152
|
+ 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
153
|
+ 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
154
|
+ 'price' => '399',
|
|
|
155
|
+ 'sPrice' => '199',
|
|
|
156
|
+ 'rank' => '7'
|
|
|
157
|
+ ),
|
|
|
158
|
+ array(
|
|
|
159
|
+ 'href' => '',
|
|
|
160
|
+ 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
161
|
+ 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
162
|
+ 'price' => '399',
|
|
|
163
|
+ 'sPrice' => '199',
|
|
|
164
|
+ 'rank' => '8'
|
|
|
165
|
+ ),
|
|
|
166
|
+ array(
|
|
|
167
|
+ 'href' => '',
|
|
|
168
|
+ 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
169
|
+ 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
170
|
+ 'price' => '399',
|
|
|
171
|
+ 'sPrice' => '199',
|
|
|
172
|
+ 'rank' => '9'
|
|
|
173
|
+ ),
|
|
|
174
|
+ array(
|
|
|
175
|
+ 'href' => '',
|
|
|
176
|
+ 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
177
|
+ 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
178
|
+ 'price' => '399',
|
|
|
179
|
+ 'sPrice' => '199',
|
|
|
180
|
+ 'rank' => '10'
|
|
|
181
|
+ )
|
|
|
182
|
+ )
|
|
|
183
|
+
|
|
|
184
|
+ )
|
|
|
185
|
+ ),
|
|
|
186
|
+ array(
|
|
|
187
|
+ 'hotBrands' => array(
|
|
|
188
|
+ 'name' => '热门品牌',
|
|
|
189
|
+ )
|
|
|
190
|
+ ),
|
|
|
191
|
+ array(
|
|
|
192
|
+ 'hotWeek' => array(
|
|
|
193
|
+ 'name' => '一周热卖',
|
|
|
194
|
+ 'nav' => array(
|
|
|
195
|
+ array(
|
|
|
196
|
+ 'textCn' => 'TOP100',
|
|
|
197
|
+ 'url' => '',
|
|
|
198
|
+ 'sid' => 1
|
|
|
199
|
+ ),
|
|
|
200
|
+ array(
|
|
|
201
|
+ 'textCn' => '上装',
|
|
|
202
|
+ 'url' => '',
|
|
|
203
|
+ 'sid' => 2
|
|
|
204
|
+ ),
|
|
|
205
|
+ array(
|
|
|
206
|
+ 'textCn' => '男生测试',
|
|
|
207
|
+ 'url' => '',
|
|
|
208
|
+ 'sid' => 3
|
|
|
209
|
+ ),
|
|
|
210
|
+ array(
|
|
|
211
|
+ 'textCn' => '配饰',
|
|
|
212
|
+ 'url' => '',
|
|
|
213
|
+ 'sid' => 4
|
|
|
214
|
+ )
|
|
|
215
|
+ ),
|
|
|
216
|
+ 'list' => array(
|
|
|
217
|
+ array(
|
|
|
218
|
+ 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
219
|
+ 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
220
|
+ 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
221
|
+ 'marketPrice' => '109',
|
|
|
222
|
+ 'salePrice' => '129'
|
|
|
223
|
+ ),
|
|
|
224
|
+ array(
|
|
|
225
|
+ 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
226
|
+ 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
227
|
+ 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
228
|
+ 'marketPrice' => '109',
|
|
|
229
|
+ 'salePrice' => '129'
|
|
|
230
|
+ ),
|
|
|
231
|
+ array(
|
|
|
232
|
+ 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
233
|
+ 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
234
|
+ 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
235
|
+ 'marketPrice' => '109',
|
|
|
236
|
+ 'salePrice' => '129'
|
|
|
237
|
+ ),
|
|
|
238
|
+ array(
|
|
|
239
|
+ 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
240
|
+ 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
241
|
+ 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
242
|
+ 'marketPrice' => '109',
|
|
|
243
|
+ 'salePrice' => '129'
|
|
|
244
|
+ ),
|
|
|
245
|
+ array(
|
|
|
246
|
+ 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
247
|
+ 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
248
|
+ 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
249
|
+ 'marketPrice' => '109',
|
|
|
250
|
+ 'salePrice' => '129'
|
|
|
251
|
+ ),
|
|
|
252
|
+ array(
|
|
|
253
|
+ 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
254
|
+ 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
255
|
+ 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
256
|
+ 'marketPrice' => '109',
|
|
|
257
|
+ 'salePrice' => '129'
|
|
|
258
|
+ ),
|
|
|
259
|
+ )
|
|
|
260
|
+ )
|
|
|
261
|
+ )
|
|
|
262
|
+ )
|
|
|
263
|
+ );
|
|
|
264
|
+ $data = array( 'hotrankPage' => true,
|
|
|
265
|
+ 'footerTop'=> true,
|
|
|
266
|
+ 'hotrank' => array()
|
|
|
267
|
+ );
|
|
|
268
|
+ //焦点图 热门品牌
|
|
|
269
|
+ $focus = \Index\HomeModel::getChannelResource('lifestyle', 'd131aba83a84a6977eee3a7403a713de');
|
|
|
270
|
+ //print_r($focus);
|
|
|
271
|
+ $data['hotrank']['slide'] = $focus[0]['slide'];
|
|
|
272
|
+ $data['hotrank']['hotBrands'] = $focus[1]['hotBrands'];
|
|
|
273
|
+
|
|
|
274
|
+ //人气单品 一周热卖
|
|
|
275
|
+ $page = 1;
|
|
|
276
|
+ $param = array('order'=>'s_n_desc','viewNum'=>60,'page'=>1,'stocknumber'=>1,'status'=>1,'gender'=>'','attribute_not'=>2);
|
|
|
277
|
+ $publiclist = \product\HotrankModel::getSearchData($param,$page);
|
|
|
278
|
+ $data['hotrank']['popular'] = $publiclist['popular'];
|
|
|
279
|
+ $data['hotrank']['hotWeek'] = $publiclist['hotWeek'];
|
|
|
280
|
+ //print_r($publiclist);
|
|
|
281
|
+
|
|
|
282
|
+ //分类标签
|
|
|
283
|
+ $classes = array('gender' => 2);
|
|
|
284
|
+ $nav = \product\HotrankModel::getHotranktag($classes);
|
|
|
285
|
+ $data['hotrank']['hotWeek']['nav'] = $nav;
|
|
|
286
|
+ //print_r($data);
|
|
|
287
|
+ $this->_view->display('hotrank', $data);
|
|
|
288
|
+ }
|
50
|
}
|
289
|
}
|
51
|
?> |
290
|
?> |