|
@@ -56,241 +56,36 @@ class IndexController extends WebAction |
|
@@ -56,241 +56,36 @@ class IndexController extends WebAction |
56
|
$this->_view->display('list',$data);
|
56
|
$this->_view->display('list',$data);
|
57
|
}
|
57
|
}
|
58
|
|
58
|
|
59
|
- public function hotrankAction() {
|
|
|
60
|
-
|
|
|
61
|
- $data = array(
|
|
|
62
|
- 'hotrankPage' => true,
|
|
|
63
|
- 'hotrank' => array(
|
|
|
64
|
- array(
|
|
|
65
|
- 'slide' => array(
|
|
|
66
|
- 'list' => array(
|
|
|
67
|
- array(
|
|
|
68
|
- 'href' => '/?gender=1,3',
|
|
|
69
|
- 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
70
|
- ),
|
|
|
71
|
- array(
|
|
|
72
|
- 'href' => '/?gender=1,3',
|
|
|
73
|
- 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
74
|
- ),
|
|
|
75
|
- array(
|
|
|
76
|
- 'href' => '/?gender=1,3',
|
|
|
77
|
- 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
78
|
- ),
|
|
|
79
|
- array(
|
|
|
80
|
- 'href' => '/?gender=1,3',
|
|
|
81
|
- 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
82
|
- ),
|
|
|
83
|
- array(
|
|
|
84
|
- 'href' => '/?gender=1,3',
|
|
|
85
|
- 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
86
|
- ),
|
|
|
87
|
- array(
|
|
|
88
|
- 'href' => '/?gender=1,3',
|
|
|
89
|
- 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
90
|
- ),
|
|
|
91
|
- array(
|
|
|
92
|
- 'href' => '/?gender=1,3',
|
|
|
93
|
- 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
94
|
- ),
|
|
|
95
|
- array(
|
|
|
96
|
- 'href' => '/?gender=1,3',
|
|
|
97
|
- 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
98
|
- )
|
|
|
99
|
- )
|
|
|
100
|
- )
|
|
|
101
|
- ),
|
|
|
102
|
- array(
|
|
|
103
|
- 'popular' => array(
|
|
|
104
|
- 'name' => '人气单品',
|
|
|
105
|
- 'list' => array(
|
|
|
106
|
- array(
|
|
|
107
|
- 'href' => '',
|
|
|
108
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
109
|
- 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
110
|
- 'price' => '399',
|
|
|
111
|
- 'sPrice' => '199',
|
|
|
112
|
- 'rank' => '1'
|
|
|
113
|
- ),
|
|
|
114
|
- array(
|
|
|
115
|
- 'href' => '',
|
|
|
116
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
117
|
- 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
118
|
- 'price' => '399',
|
|
|
119
|
- 'sPrice' => '199',
|
|
|
120
|
- 'rank' => '2'
|
|
|
121
|
- ),
|
|
|
122
|
- array(
|
|
|
123
|
- 'href' => '',
|
|
|
124
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
125
|
- 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
126
|
- 'price' => '399',
|
|
|
127
|
- 'sPrice' => '199',
|
|
|
128
|
- 'rank' => '3'
|
|
|
129
|
- ),
|
|
|
130
|
- array(
|
|
|
131
|
- 'href' => '',
|
|
|
132
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
133
|
- 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
134
|
- 'price' => '399',
|
|
|
135
|
- 'sPrice' => '199',
|
|
|
136
|
- 'rank' => '4'
|
|
|
137
|
- ),
|
|
|
138
|
- array(
|
|
|
139
|
- 'href' => '',
|
|
|
140
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
141
|
- 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
142
|
- 'price' => '399',
|
|
|
143
|
- 'sPrice' => '199',
|
|
|
144
|
- 'rank' => '5'
|
|
|
145
|
- ),
|
|
|
146
|
- array(
|
|
|
147
|
- 'href' => '',
|
|
|
148
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
149
|
- 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
150
|
- 'price' => '399',
|
|
|
151
|
- 'sPrice' => '199',
|
|
|
152
|
- 'rank' => '6'
|
|
|
153
|
- ),
|
|
|
154
|
- array(
|
|
|
155
|
- 'href' => '',
|
|
|
156
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
157
|
- 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
158
|
- 'price' => '399',
|
|
|
159
|
- 'sPrice' => '199',
|
|
|
160
|
- 'rank' => '7'
|
|
|
161
|
- ),
|
|
|
162
|
- array(
|
|
|
163
|
- 'href' => '',
|
|
|
164
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
165
|
- 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
166
|
- 'price' => '399',
|
|
|
167
|
- 'sPrice' => '199',
|
|
|
168
|
- 'rank' => '8'
|
|
|
169
|
- ),
|
|
|
170
|
- array(
|
|
|
171
|
- 'href' => '',
|
|
|
172
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
173
|
- 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
174
|
- 'price' => '399',
|
|
|
175
|
- 'sPrice' => '199',
|
|
|
176
|
- 'rank' => '9'
|
|
|
177
|
- ),
|
|
|
178
|
- array(
|
|
|
179
|
- 'href' => '',
|
|
|
180
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
181
|
- 'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
182
|
- 'price' => '399',
|
|
|
183
|
- 'sPrice' => '199',
|
|
|
184
|
- 'rank' => '10'
|
|
|
185
|
- )
|
|
|
186
|
- )
|
|
|
187
|
-
|
|
|
188
|
- )
|
|
|
189
|
- ),
|
|
|
190
|
- array(
|
|
|
191
|
- 'hotBrands' => array(
|
|
|
192
|
- 'name' => '热门品牌',
|
|
|
193
|
- )
|
|
|
194
|
- ),
|
|
|
195
|
- array(
|
|
|
196
|
- 'hotWeek' => array(
|
|
|
197
|
- 'name' => '一周热卖',
|
|
|
198
|
- 'nav' => array(
|
|
|
199
|
- array(
|
|
|
200
|
- 'textCn' => 'TOP100',
|
|
|
201
|
- 'url' => '',
|
|
|
202
|
- 'sid' => 1
|
|
|
203
|
- ),
|
|
|
204
|
- array(
|
|
|
205
|
- 'textCn' => '上装',
|
|
|
206
|
- 'url' => '',
|
|
|
207
|
- 'sid' => 2
|
|
|
208
|
- ),
|
|
|
209
|
- array(
|
|
|
210
|
- 'textCn' => '男生测试',
|
|
|
211
|
- 'url' => '',
|
|
|
212
|
- 'sid' => 3
|
|
|
213
|
- ),
|
|
|
214
|
- array(
|
|
|
215
|
- 'textCn' => '配饰',
|
|
|
216
|
- 'url' => '',
|
|
|
217
|
- 'sid' => 4
|
|
|
218
|
- )
|
|
|
219
|
- ),
|
|
|
220
|
- 'list' => array(
|
|
|
221
|
- array(
|
|
|
222
|
- 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
223
|
- 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
224
|
- 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
225
|
- 'marketPrice' => '109',
|
|
|
226
|
- 'salePrice' => '129'
|
|
|
227
|
- ),
|
|
|
228
|
- array(
|
|
|
229
|
- 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
230
|
- 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
231
|
- 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
232
|
- 'marketPrice' => '109',
|
|
|
233
|
- 'salePrice' => '129'
|
|
|
234
|
- ),
|
|
|
235
|
- array(
|
|
|
236
|
- 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
237
|
- 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
238
|
- 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
239
|
- 'marketPrice' => '109',
|
|
|
240
|
- 'salePrice' => '129'
|
|
|
241
|
- ),
|
|
|
242
|
- array(
|
|
|
243
|
- 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
244
|
- 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
245
|
- 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
246
|
- 'marketPrice' => '109',
|
|
|
247
|
- 'salePrice' => '129'
|
|
|
248
|
- ),
|
|
|
249
|
- array(
|
|
|
250
|
- 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
251
|
- 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
252
|
- 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
253
|
- 'marketPrice' => '109',
|
|
|
254
|
- 'salePrice' => '129'
|
|
|
255
|
- ),
|
|
|
256
|
- array(
|
|
|
257
|
- 'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
258
|
- 'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
259
|
- 'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
260
|
- 'marketPrice' => '109',
|
|
|
261
|
- 'salePrice' => '129'
|
|
|
262
|
- ),
|
|
|
263
|
- )
|
|
|
264
|
- )
|
|
|
265
|
- )
|
|
|
266
|
- )
|
|
|
267
|
- );
|
|
|
268
|
-
|
|
|
269
|
-
|
59
|
+ /**
|
|
|
60
|
+ * 热销排行
|
|
|
61
|
+ */
|
|
|
62
|
+ public function hotrankAction()
|
|
|
63
|
+ {
|
|
|
64
|
+ //获取频道
|
270
|
$cookie = $this->getCookie('_Channel');
|
65
|
$cookie = $this->getCookie('_Channel');
|
271
|
- $cookie = 'lifestyle';
|
|
|
272
|
$this->channel = isset($cookie) ? $cookie : 'boys';
|
66
|
$this->channel = isset($cookie) ? $cookie : 'boys';
|
273
|
- switch ($this->channel){
|
|
|
274
|
- case 'boys' :
|
|
|
275
|
- $this->gender = '1,3';
|
|
|
276
|
- $this->road = 1;
|
|
|
277
|
- $this->code = '80d772d8dff25300a2a2e4c97165330c';
|
|
|
278
|
- break;
|
|
|
279
|
- case 'girls' :
|
|
|
280
|
- $this->gender = '2,3';
|
|
|
281
|
- $this->road = 2;
|
|
|
282
|
- $this->code = '8df64e505e94edb9881fd1e7efb702e9';
|
|
|
283
|
- break;
|
|
|
284
|
- case 'lifestyle' :
|
|
|
285
|
- $this->gender = '';
|
|
|
286
|
- $this->road = 4;
|
|
|
287
|
- $this->code = 'd131aba83a84a6977eee3a7403a713de';
|
|
|
288
|
- break;
|
|
|
289
|
- case 'kids' :
|
|
|
290
|
- $this->gender = '';
|
|
|
291
|
- $this->road = 3;
|
|
|
292
|
- $this->code = 'bd6a06a08f8ca9b0db762f78e0bc5b68';
|
|
|
293
|
- break;
|
67
|
+ switch ($this->channel)
|
|
|
68
|
+ {
|
|
|
69
|
+ case 'boys' :
|
|
|
70
|
+ $this->gender = '1,3';
|
|
|
71
|
+ $this->road = 1;
|
|
|
72
|
+ $this->code = '80d772d8dff25300a2a2e4c97165330c';
|
|
|
73
|
+ break;
|
|
|
74
|
+ case 'girls' :
|
|
|
75
|
+ $this->gender = '2,3';
|
|
|
76
|
+ $this->road = 2;
|
|
|
77
|
+ $this->code = '8df64e505e94edb9881fd1e7efb702e9';
|
|
|
78
|
+ break;
|
|
|
79
|
+ case 'lifestyle' :
|
|
|
80
|
+ $this->gender = '';
|
|
|
81
|
+ $this->road = 4;
|
|
|
82
|
+ $this->code = 'd131aba83a84a6977eee3a7403a713de';
|
|
|
83
|
+ break;
|
|
|
84
|
+ case 'kids' :
|
|
|
85
|
+ $this->gender = '';
|
|
|
86
|
+ $this->road = 3;
|
|
|
87
|
+ $this->code = 'bd6a06a08f8ca9b0db762f78e0bc5b68';
|
|
|
88
|
+ break;
|
294
|
|
89
|
|
295
|
}
|
90
|
}
|
296
|
$this->setWebNavHeader(\Index\HomeModel::$this->channel);
|
91
|
$this->setWebNavHeader(\Index\HomeModel::$this->channel);
|
|
@@ -298,6 +93,7 @@ class IndexController extends WebAction |
|
@@ -298,6 +93,7 @@ class IndexController extends WebAction |
298
|
'footerTop'=> true,
|
93
|
'footerTop'=> true,
|
299
|
'hotrank' => array()
|
94
|
'hotrank' => array()
|
300
|
);
|
95
|
);
|
|
|
96
|
+
|
301
|
//焦点图 热门品牌
|
97
|
//焦点图 热门品牌
|
302
|
$focus = \Index\HomeModel::getChannelResource($this->channel, $this->code);
|
98
|
$focus = \Index\HomeModel::getChannelResource($this->channel, $this->code);
|
303
|
$data['hotrank']['slide'] = $focus[0]['slide'];
|
99
|
$data['hotrank']['slide'] = $focus[0]['slide'];
|
|
@@ -308,13 +104,15 @@ class IndexController extends WebAction |
|
@@ -308,13 +104,15 @@ class IndexController extends WebAction |
308
|
$sort_id = $this->get('sid',0);
|
104
|
$sort_id = $this->get('sid',0);
|
309
|
$viewNum = 60;
|
105
|
$viewNum = 60;
|
310
|
$param = array('order'=>'s_n_desc','viewNum'=>$viewNum,'page'=>$page,'stocknumber'=>1,'status'=>1,'gender'=>$this->gender,'attribute_not'=>2);
|
106
|
$param = array('order'=>'s_n_desc','viewNum'=>$viewNum,'page'=>$page,'stocknumber'=>1,'status'=>1,'gender'=>$this->gender,'attribute_not'=>2);
|
311
|
- if($sort_id != 0){
|
|
|
312
|
- $param['sort'] = $sort_id;
|
107
|
+ if($sort_id != 0)
|
|
|
108
|
+ {
|
|
|
109
|
+ $param['sort'] = $sort_id;
|
313
|
}
|
110
|
}
|
314
|
- if($this->road == 3){
|
|
|
315
|
- $param['msort'] = 365;
|
111
|
+ if($this->road == 3)
|
|
|
112
|
+ {
|
|
|
113
|
+ $param['msort'] = 365;
|
316
|
}elseif($this->road == 4){
|
114
|
}elseif($this->road == 4){
|
317
|
- $param['msort'] = 10;
|
115
|
+ $param['msort'] = 10;
|
318
|
}else{
|
116
|
}else{
|
319
|
$param['not_maxSortId'] = '10,365';
|
117
|
$param['not_maxSortId'] = '10,365';
|
320
|
}
|
118
|
}
|
|
@@ -352,10 +150,9 @@ class IndexController extends WebAction |
|
@@ -352,10 +150,9 @@ class IndexController extends WebAction |
352
|
$sort = $info['data']['category_id'];
|
150
|
$sort = $info['data']['category_id'];
|
353
|
}
|
151
|
}
|
354
|
}
|
152
|
}
|
355
|
- $viewNum = 60;
|
|
|
356
|
- //过滤掉赠品
|
|
|
357
|
- $param = array('order'=>'s_n_desc','viewNum'=>$viewNum,'page'=>$page,'sort'=>$sort,'stocknumber'=>1,'status'=>1,'gender'=>$this->gender,
|
|
|
358
|
- 'attribute_not'=>2);
|
153
|
+ $viewNum = 60;
|
|
|
154
|
+ $param = array('order'=>'s_n_desc','viewNum'=>$viewNum,'page'=>$page,'sort'=>$sort,'stocknumber'=>1,'status'=>1,
|
|
|
155
|
+ 'gender'=>$this->gender,'attribute_not'=>2);
|
359
|
if(empty($param['sort']))
|
156
|
if(empty($param['sort']))
|
360
|
{
|
157
|
{
|
361
|
if($this->road == 3)
|
158
|
if($this->road == 3)
|
|
@@ -367,7 +164,7 @@ class IndexController extends WebAction |
|
@@ -367,7 +164,7 @@ class IndexController extends WebAction |
367
|
$param['not_maxSortId'] = '10,365';
|
164
|
$param['not_maxSortId'] = '10,365';
|
368
|
}
|
165
|
}
|
369
|
}
|
166
|
}
|
370
|
-
|
167
|
+ //一周热卖
|
371
|
$list = \product\HotrankModel::getSearchData($param, $page, 1);
|
168
|
$list = \product\HotrankModel::getSearchData($param, $page, 1);
|
372
|
$lister = $list['hotWeek']['list'];
|
169
|
$lister = $list['hotWeek']['list'];
|
373
|
$lister = array_values($lister);
|
170
|
$lister = array_values($lister);
|
|
@@ -377,12 +174,8 @@ class IndexController extends WebAction |
|
@@ -377,12 +174,8 @@ class IndexController extends WebAction |
377
|
}else{
|
174
|
}else{
|
378
|
$lister = array_slice($lister, 0, 50);
|
175
|
$lister = array_slice($lister, 0, 50);
|
379
|
}
|
176
|
}
|
380
|
- $data = array(
|
|
|
381
|
- 'code'=>200,
|
|
|
382
|
- 'data'=>$lister,
|
|
|
383
|
- );
|
177
|
+ $data = array( 'code'=>200, 'data'=>$lister,);
|
384
|
echo json_encode($data);
|
178
|
echo json_encode($data);
|
385
|
exit;
|
179
|
exit;
|
386
|
}
|
180
|
}
|
387
|
-}
|
|
|
388
|
-?> |
|
|
|
|
181
|
+} |