|
@@ -2,474 +2,364 @@ |
|
@@ -2,474 +2,364 @@ |
2
|
|
2
|
|
3
|
use Action\AbstractAction;
|
3
|
use Action\AbstractAction;
|
4
|
use LibModels\wap\Product\NewsaleData as Newsale;
|
4
|
use LibModels\wap\Product\NewsaleData as Newsale;
|
5
|
-use Plugin\Helpers;
|
5
|
+use Plugin\DataProcess\NewSaleProcess;
|
6
|
/**
|
6
|
/**
|
7
|
* 新品到着
|
7
|
* 新品到着
|
8
|
*/
|
8
|
*/
|
9
|
class NewsaleController extends AbstractAction
|
9
|
class NewsaleController extends AbstractAction
|
10
|
{
|
10
|
{
|
11
|
- public function indexAction()
|
|
|
12
|
- {
|
|
|
13
|
- /*$this->_view->assign('title', '新品到着');
|
11
|
+ public function indexAction()
|
|
|
12
|
+ {
|
14
|
|
13
|
|
15
|
- // 新品到着顶部焦点图
|
|
|
16
|
- $focusData = Newsale::getNewsaleFocus('a7989369aa86681c678bc40f171b8f1d');
|
|
|
17
|
- // 处理返回的数据
|
|
|
18
|
- $focus = array();
|
|
|
19
|
- if($focusData['code'] == 200)
|
|
|
20
|
- {
|
|
|
21
|
- foreach ($focusData['data'] as $single)
|
|
|
22
|
- {
|
|
|
23
|
- foreach ($single['data'] as $val) {
|
|
|
24
|
- $val['src'] = Helpers::getImageUrl($val['src'], 375, 667, 1);
|
|
|
25
|
- $focus[] = $val;
|
|
|
26
|
- }
|
|
|
27
|
- }
|
|
|
28
|
- }
|
14
|
+ $data = array(
|
|
|
15
|
+ 'newArrival' => true,
|
|
|
16
|
+ 'header' => array(
|
|
|
17
|
+ 'title' => '新品到着'
|
|
|
18
|
+ )
|
|
|
19
|
+ );
|
29
|
|
20
|
|
30
|
- // 批量获取新品到着商品数据
|
|
|
31
|
- $products = Newsale::getNewProducts('1,3', 1, 60);
|
|
|
32
|
- var_dump($focus);
|
21
|
+ // 新品到着顶部焦点图
|
|
|
22
|
+ $focusData = Newsale::getNewsaleFocus('a7989369aa86681c678bc40f171b8f1d');
|
|
|
23
|
+ // 处理返回的数据
|
|
|
24
|
+ $focus = array();
|
|
|
25
|
+ if($focusData['code'] == 200)
|
|
|
26
|
+ {
|
|
|
27
|
+ $focus = $focusData['data'];
|
|
|
28
|
+ }
|
33
|
|
29
|
|
34
|
- $this->_view->display('new', compact('focus', 'products'));*/
|
|
|
35
|
-
|
|
|
36
|
- $data = array(
|
|
|
37
|
- 'headerBanner' => array(
|
|
|
38
|
- 'list' => array(
|
|
|
39
|
- array(
|
|
|
40
|
- 'url' => '',
|
|
|
41
|
- 'img' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
42
|
- )
|
|
|
43
|
- )
|
|
|
44
|
- ),
|
|
|
45
|
- 'tabs' => array(
|
|
|
46
|
- array(
|
|
|
47
|
- 'title' => '10月15日',
|
|
|
48
|
- 'focus' => true
|
|
|
49
|
- ),
|
|
|
50
|
- array(
|
|
|
51
|
- 'title' => '本周上新'
|
|
|
52
|
- ),
|
|
|
53
|
- array(
|
|
|
54
|
- 'title' => '销量'
|
|
|
55
|
- )
|
|
|
56
|
- ),
|
|
|
57
|
- 'goodsContainer' => array(
|
|
|
58
|
- array(
|
|
|
59
|
- 'show' => 'true',
|
|
|
60
|
- 'goods' => array(
|
|
|
61
|
- array(
|
|
|
62
|
- 'id' => '',
|
|
|
63
|
- 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
64
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
65
|
- 'isLike' => false,
|
|
|
66
|
- 'price' => 1268,
|
|
|
67
|
- 'salePrice' => 589,
|
|
|
68
|
- 'isSale' => true,
|
|
|
69
|
- 'isFew' => true,
|
|
|
70
|
- 'isNew' => false,
|
|
|
71
|
- 'url' => ''
|
|
|
72
|
- ),
|
|
|
73
|
- array(
|
|
|
74
|
- 'id' => '',
|
|
|
75
|
- 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
76
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
77
|
- 'isLike' => false,
|
|
|
78
|
- 'price' => 1268,
|
|
|
79
|
- 'salePrice' => 589,
|
|
|
80
|
- 'isSale' => true,
|
|
|
81
|
- 'isFew' => true,
|
|
|
82
|
- 'isNew' => false,
|
|
|
83
|
- 'url' => ''
|
|
|
84
|
- ),
|
|
|
85
|
- array(
|
|
|
86
|
- 'id' => '',
|
|
|
87
|
- 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
88
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
89
|
- 'isLike' => false,
|
|
|
90
|
- 'price' => 1268,
|
|
|
91
|
- 'salePrice' => 589,
|
|
|
92
|
- 'isSale' => true,
|
|
|
93
|
- 'isFew' => true,
|
|
|
94
|
- 'isNew' => false,
|
|
|
95
|
- 'url' => ''
|
|
|
96
|
- ),
|
|
|
97
|
- array(
|
|
|
98
|
- 'id' => '',
|
|
|
99
|
- 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
100
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
101
|
- 'isLike' => false,
|
|
|
102
|
- 'price' => 1268,
|
|
|
103
|
- 'salePrice' => 589,
|
|
|
104
|
- 'isSale' => true,
|
|
|
105
|
- 'isFew' => true,
|
|
|
106
|
- 'isNew' => false,
|
|
|
107
|
- 'url' => ''
|
|
|
108
|
- )
|
|
|
109
|
-
|
|
|
110
|
- )
|
|
|
111
|
- ),
|
|
|
112
|
- array(
|
|
|
113
|
- 'goods' => array(
|
|
|
114
|
- array(
|
|
|
115
|
- 'id' => '',
|
|
|
116
|
- 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
117
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
118
|
- 'isLike' => false,
|
|
|
119
|
- 'price' => 1268,
|
|
|
120
|
- 'salePrice' => 589,
|
|
|
121
|
- 'isSale' => true,
|
|
|
122
|
- 'isFew' => true,
|
|
|
123
|
- 'isNew' => false,
|
|
|
124
|
- 'url' => ''
|
|
|
125
|
- ),
|
|
|
126
|
- array(
|
|
|
127
|
- 'id' => '',
|
|
|
128
|
- 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
129
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
130
|
- 'isLike' => false,
|
|
|
131
|
- 'price' => 1268,
|
|
|
132
|
- 'salePrice' => 589,
|
|
|
133
|
- 'isSale' => true,
|
|
|
134
|
- 'isFew' => true,
|
|
|
135
|
- 'isNew' => false,
|
|
|
136
|
- 'url' => ''
|
|
|
137
|
- ),
|
|
|
138
|
- array(
|
|
|
139
|
- 'id' => '',
|
|
|
140
|
- 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
141
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
142
|
- 'isLike' => false,
|
|
|
143
|
- 'price' => 1268,
|
|
|
144
|
- 'salePrice' => 589,
|
|
|
145
|
- 'isSale' => true,
|
|
|
146
|
- 'isFew' => true,
|
|
|
147
|
- 'isNew' => false,
|
|
|
148
|
- 'url' => ''
|
|
|
149
|
- ),
|
|
|
150
|
- array(
|
|
|
151
|
- 'id' => '',
|
|
|
152
|
- 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
153
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
154
|
- 'isLike' => false,
|
|
|
155
|
- 'price' => 1268,
|
|
|
156
|
- 'salePrice' => 589,
|
|
|
157
|
- 'isSale' => true,
|
|
|
158
|
- 'isFew' => true,
|
|
|
159
|
- 'isNew' => false,
|
|
|
160
|
- 'url' => ''
|
|
|
161
|
- )
|
|
|
162
|
-
|
|
|
163
|
- )
|
|
|
164
|
-
|
|
|
165
|
- ),
|
|
|
166
|
- array(
|
|
|
167
|
- 'goods' => array(
|
|
|
168
|
- array(
|
|
|
169
|
- 'id' => '',
|
|
|
170
|
- 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
171
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
172
|
- 'isLike' => false,
|
|
|
173
|
- 'price' => 1268,
|
|
|
174
|
- 'salePrice' => 589,
|
|
|
175
|
- 'isSale' => true,
|
|
|
176
|
- 'isFew' => true,
|
|
|
177
|
- 'isNew' => false,
|
|
|
178
|
- 'url' => ''
|
|
|
179
|
- ),
|
|
|
180
|
- array(
|
|
|
181
|
- 'id' => '',
|
|
|
182
|
- 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
183
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
184
|
- 'isLike' => false,
|
|
|
185
|
- 'price' => 1268,
|
|
|
186
|
- 'salePrice' => 589,
|
|
|
187
|
- 'isSale' => true,
|
|
|
188
|
- 'isFew' => true,
|
|
|
189
|
- 'isNew' => false,
|
|
|
190
|
- 'url' => ''
|
|
|
191
|
- ),
|
|
|
192
|
- array(
|
|
|
193
|
- 'id' => '',
|
|
|
194
|
- 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
195
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
196
|
- 'isLike' => false,
|
|
|
197
|
- 'price' => 1268,
|
|
|
198
|
- 'salePrice' => 589,
|
|
|
199
|
- 'isSale' => true,
|
|
|
200
|
- 'isFew' => true,
|
|
|
201
|
- 'isNew' => false,
|
|
|
202
|
- 'url' => ''
|
|
|
203
|
- ),
|
|
|
204
|
- array(
|
|
|
205
|
- 'id' => '',
|
|
|
206
|
- 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
207
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
208
|
- 'isLike' => false,
|
|
|
209
|
- 'price' => 1268,
|
|
|
210
|
- 'salePrice' => 589,
|
|
|
211
|
- 'isSale' => true,
|
|
|
212
|
- 'isFew' => true,
|
|
|
213
|
- 'isNew' => false,
|
|
|
214
|
- 'url' => ''
|
|
|
215
|
- )
|
|
|
216
|
-
|
|
|
217
|
- )
|
|
|
218
|
-
|
|
|
219
|
-
|
|
|
220
|
- )
|
|
|
221
|
-
|
|
|
222
|
- )
|
|
|
223
|
- );
|
30
|
+ // 批量获取新品到着商品数据
|
|
|
31
|
+ $products = Newsale::getNewProducts('1,3', 1, 60);
|
|
|
32
|
+ // 添加商品数据
|
|
|
33
|
+ $data += NewSaleProcess::newSaleData($focus, $products);
|
224
|
|
34
|
|
225
|
- $this->_view->assign('title', '新品到着');
|
|
|
226
|
- $this->_view->display('new', $data);
|
|
|
227
|
- }
|
35
|
+ /*echo '<pre>';
|
|
|
36
|
+ print_r($data);exit;*/
|
228
|
|
37
|
|
|
|
38
|
+ /*$data = array(
|
|
|
39
|
+ 'headerBanner' => array(
|
|
|
40
|
+ 'list' => array(
|
|
|
41
|
+ array(
|
|
|
42
|
+ 'url' => '',
|
|
|
43
|
+ 'img' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
44
|
+ )
|
|
|
45
|
+ )
|
|
|
46
|
+ ),
|
|
|
47
|
+ 'tabs' => array(
|
|
|
48
|
+ array(
|
|
|
49
|
+ 'title' => '10月15日',
|
|
|
50
|
+ 'focus' => true
|
|
|
51
|
+ ),
|
|
|
52
|
+ array(
|
|
|
53
|
+ 'title' => '本周上新'
|
|
|
54
|
+ ),
|
|
|
55
|
+ array(
|
|
|
56
|
+ 'title' => '销量'
|
|
|
57
|
+ )
|
|
|
58
|
+ ),
|
|
|
59
|
+ 'goodsContainer' => array(
|
|
|
60
|
+ array(
|
|
|
61
|
+ 'show' => 'true',
|
|
|
62
|
+ 'goods' => array(
|
|
|
63
|
+ array(
|
|
|
64
|
+ 'id' => '',
|
|
|
65
|
+ 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
66
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
67
|
+ 'isLike' => false,
|
|
|
68
|
+ 'price' => 1268,
|
|
|
69
|
+ 'salePrice' => 589,
|
|
|
70
|
+ 'isSale' => true,
|
|
|
71
|
+ 'isFew' => true,
|
|
|
72
|
+ 'isNew' => false,
|
|
|
73
|
+ 'url' => ''
|
|
|
74
|
+ ),
|
|
|
75
|
+ array(
|
|
|
76
|
+ 'id' => '',
|
|
|
77
|
+ 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
78
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
79
|
+ 'isLike' => false,
|
|
|
80
|
+ 'price' => 1268,
|
|
|
81
|
+ 'salePrice' => 589,
|
|
|
82
|
+ 'isSale' => true,
|
|
|
83
|
+ 'isFew' => true,
|
|
|
84
|
+ 'isNew' => false,
|
|
|
85
|
+ 'url' => ''
|
|
|
86
|
+ ),
|
|
|
87
|
+ array(
|
|
|
88
|
+ 'id' => '',
|
|
|
89
|
+ 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
90
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
91
|
+ 'isLike' => false,
|
|
|
92
|
+ 'price' => 1268,
|
|
|
93
|
+ 'salePrice' => 589,
|
|
|
94
|
+ 'isSale' => true,
|
|
|
95
|
+ 'isFew' => true,
|
|
|
96
|
+ 'isNew' => false,
|
|
|
97
|
+ 'url' => ''
|
|
|
98
|
+ ),
|
|
|
99
|
+ array(
|
|
|
100
|
+ 'id' => '',
|
|
|
101
|
+ 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
102
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
103
|
+ 'isLike' => false,
|
|
|
104
|
+ 'price' => 1268,
|
|
|
105
|
+ 'salePrice' => 589,
|
|
|
106
|
+ 'isSale' => true,
|
|
|
107
|
+ 'isFew' => true,
|
|
|
108
|
+ 'isNew' => false,
|
|
|
109
|
+ 'url' => ''
|
|
|
110
|
+ )
|
|
|
111
|
+
|
|
|
112
|
+ )
|
|
|
113
|
+ ),
|
|
|
114
|
+ array(
|
|
|
115
|
+ 'goods' => array(
|
|
|
116
|
+ array(
|
|
|
117
|
+ 'id' => '',
|
|
|
118
|
+ 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
119
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
120
|
+ 'isLike' => false,
|
|
|
121
|
+ 'price' => 1268,
|
|
|
122
|
+ 'salePrice' => 589,
|
|
|
123
|
+ 'isSale' => true,
|
|
|
124
|
+ 'isFew' => true,
|
|
|
125
|
+ 'isNew' => false,
|
|
|
126
|
+ 'url' => ''
|
|
|
127
|
+ ),
|
|
|
128
|
+ array(
|
|
|
129
|
+ 'id' => '',
|
|
|
130
|
+ 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
131
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
132
|
+ 'isLike' => false,
|
|
|
133
|
+ 'price' => 1268,
|
|
|
134
|
+ 'salePrice' => 589,
|
|
|
135
|
+ 'isSale' => true,
|
|
|
136
|
+ 'isFew' => true,
|
|
|
137
|
+ 'isNew' => false,
|
|
|
138
|
+ 'url' => ''
|
|
|
139
|
+ ),
|
|
|
140
|
+ array(
|
|
|
141
|
+ 'id' => '',
|
|
|
142
|
+ 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
143
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
144
|
+ 'isLike' => false,
|
|
|
145
|
+ 'price' => 1268,
|
|
|
146
|
+ 'salePrice' => 589,
|
|
|
147
|
+ 'isSale' => true,
|
|
|
148
|
+ 'isFew' => true,
|
|
|
149
|
+ 'isNew' => false,
|
|
|
150
|
+ 'url' => ''
|
|
|
151
|
+ ),
|
|
|
152
|
+ array(
|
|
|
153
|
+ 'id' => '',
|
|
|
154
|
+ 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
155
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
156
|
+ 'isLike' => false,
|
|
|
157
|
+ 'price' => 1268,
|
|
|
158
|
+ 'salePrice' => 589,
|
|
|
159
|
+ 'isSale' => true,
|
|
|
160
|
+ 'isFew' => true,
|
|
|
161
|
+ 'isNew' => false,
|
|
|
162
|
+ 'url' => ''
|
|
|
163
|
+ )
|
|
|
164
|
+
|
|
|
165
|
+ )
|
|
|
166
|
+
|
|
|
167
|
+ ),
|
|
|
168
|
+ array(
|
|
|
169
|
+ 'goods' => array(
|
|
|
170
|
+ array(
|
|
|
171
|
+ 'id' => '',
|
|
|
172
|
+ 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
173
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
174
|
+ 'isLike' => false,
|
|
|
175
|
+ 'price' => 1268,
|
|
|
176
|
+ 'salePrice' => 589,
|
|
|
177
|
+ 'isSale' => true,
|
|
|
178
|
+ 'isFew' => true,
|
|
|
179
|
+ 'isNew' => false,
|
|
|
180
|
+ 'url' => ''
|
|
|
181
|
+ ),
|
|
|
182
|
+ array(
|
|
|
183
|
+ 'id' => '',
|
|
|
184
|
+ 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
185
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
186
|
+ 'isLike' => false,
|
|
|
187
|
+ 'price' => 1268,
|
|
|
188
|
+ 'salePrice' => 589,
|
|
|
189
|
+ 'isSale' => true,
|
|
|
190
|
+ 'isFew' => true,
|
|
|
191
|
+ 'isNew' => false,
|
|
|
192
|
+ 'url' => ''
|
|
|
193
|
+ ),
|
|
|
194
|
+ array(
|
|
|
195
|
+ 'id' => '',
|
|
|
196
|
+ 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
197
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
198
|
+ 'isLike' => false,
|
|
|
199
|
+ 'price' => 1268,
|
|
|
200
|
+ 'salePrice' => 589,
|
|
|
201
|
+ 'isSale' => true,
|
|
|
202
|
+ 'isFew' => true,
|
|
|
203
|
+ 'isNew' => false,
|
|
|
204
|
+ 'url' => ''
|
|
|
205
|
+ ),
|
|
|
206
|
+ array(
|
|
|
207
|
+ 'id' => '',
|
|
|
208
|
+ 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
209
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
210
|
+ 'isLike' => false,
|
|
|
211
|
+ 'price' => 1268,
|
|
|
212
|
+ 'salePrice' => 589,
|
|
|
213
|
+ 'isSale' => true,
|
|
|
214
|
+ 'isFew' => true,
|
|
|
215
|
+ 'isNew' => false,
|
|
|
216
|
+ 'url' => ''
|
|
|
217
|
+ )
|
|
|
218
|
+
|
|
|
219
|
+ )
|
|
|
220
|
+
|
|
|
221
|
+
|
|
|
222
|
+ )
|
229
|
|
223
|
|
230
|
- /**
|
|
|
231
|
- * Ajax方式筛选新品到着、折扣专区商品
|
|
|
232
|
- *
|
|
|
233
|
- * @return array 根据指定条件筛选之后的商品
|
|
|
234
|
- */
|
|
|
235
|
- public function selectNewAction()
|
|
|
236
|
- {
|
|
|
237
|
- if($this->isAjax())
|
|
|
238
|
- {
|
|
|
239
|
- $gender = $this->get('gender', '1,3');
|
|
|
240
|
- $brand = $this->get('brand', null);
|
|
|
241
|
- $sort = $this->get('sort', null);
|
|
|
242
|
- $color = $this->get('color', null);
|
|
|
243
|
- $size = $this->get('size', null);
|
|
|
244
|
- $price = $this->get('price', null);
|
|
|
245
|
- $p_d = $this->get('p_d', null);
|
|
|
246
|
- $channel = $this->get('channel', '1');
|
|
|
247
|
- $dayLimit = $this->get('dayLimit', '1');
|
|
|
248
|
- $limit = $this->get('limit', 50);
|
|
|
249
|
- $page = $this->get('page', 1);
|
224
|
+ )
|
|
|
225
|
+ );*/
|
250
|
|
226
|
|
251
|
- $data = Newsale::selectNewSaleProducts($gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page);
|
227
|
+ $this->_view->assign('title', '新品到着');
|
|
|
228
|
+ $this->_view->display('new', $data);
|
|
|
229
|
+ }
|
252
|
|
230
|
|
253
|
- $this->returnJson(200, '获取成功', $data);
|
|
|
254
|
- }
|
|
|
255
|
- }
|
231
|
+ /**
|
|
|
232
|
+ * Ajax方式筛选新品到着、折扣专区商品
|
|
|
233
|
+ *
|
|
|
234
|
+ * @return array 根据指定条件筛选之后的商品
|
|
|
235
|
+ */
|
|
|
236
|
+ public function selectNewSaleAction()
|
|
|
237
|
+ {
|
|
|
238
|
+ /*if($this->isAjax())
|
|
|
239
|
+ {*/
|
|
|
240
|
+ $gender = $this->get('gender', '1,3');
|
|
|
241
|
+ $brand = $this->get('brand', null);
|
|
|
242
|
+ $sort = $this->get('sort', null);
|
|
|
243
|
+ $color = $this->get('color', null);
|
|
|
244
|
+ $size = $this->get('size', null);
|
|
|
245
|
+ $price = $this->get('price', null);
|
|
|
246
|
+ $p_d = $this->get('p_d', null);
|
|
|
247
|
+ $channel = $this->get('channel', '1');
|
|
|
248
|
+ $dayLimit = $this->get('dayLimit', '1');
|
|
|
249
|
+ $limit = $this->get('limit', 50);
|
|
|
250
|
+ $page = $this->get('page', 1);
|
256
|
|
251
|
|
|
|
252
|
+ $data = Newsale::selectNewSaleProducts($gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page);
|
257
|
|
253
|
|
258
|
- public function discountAction()
|
|
|
259
|
- {
|
254
|
+ $result = NewSaleProcess::selectData($data);
|
260
|
|
255
|
|
261
|
- $data = array(
|
|
|
262
|
- 'headerBanner' => array(
|
|
|
263
|
- 'url' => '',
|
|
|
264
|
- 'img' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480'
|
|
|
265
|
- ),
|
|
|
266
|
- 'tabs' => array(
|
|
|
267
|
- array(
|
|
|
268
|
- 'title' => '1-3折',
|
|
|
269
|
- 'focus' => true
|
|
|
270
|
- ),
|
|
|
271
|
- array(
|
|
|
272
|
- 'title' => '4-6折'
|
|
|
273
|
- ),
|
|
|
274
|
- array(
|
|
|
275
|
- 'title' => '7-9折'
|
|
|
276
|
- ),
|
|
|
277
|
- array(
|
|
|
278
|
- 'title' => 'ALL'
|
|
|
279
|
- )
|
|
|
280
|
- ),
|
|
|
281
|
- 'goodsContainer' => array(
|
|
|
282
|
- array(
|
|
|
283
|
- 'show' => 'true',
|
|
|
284
|
- 'goods' => array(
|
|
|
285
|
- array(
|
|
|
286
|
- 'id' => '',
|
|
|
287
|
- 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
288
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
289
|
- 'isLike' => false,
|
|
|
290
|
- 'price' => 1268,
|
|
|
291
|
- 'salePrice' => 589,
|
|
|
292
|
- 'isSale' => true,
|
|
|
293
|
- 'isFew' => true,
|
|
|
294
|
- 'isNew' => false,
|
|
|
295
|
- 'url' => ''
|
|
|
296
|
- ),
|
|
|
297
|
- array(
|
|
|
298
|
- 'id' => '',
|
|
|
299
|
- 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
300
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
301
|
- 'isLike' => false,
|
|
|
302
|
- 'price' => 1268,
|
|
|
303
|
- 'salePrice' => 589,
|
|
|
304
|
- 'isSale' => true,
|
|
|
305
|
- 'isFew' => true,
|
|
|
306
|
- 'isNew' => false,
|
|
|
307
|
- 'url' => ''
|
|
|
308
|
- ),
|
|
|
309
|
- array(
|
|
|
310
|
- 'id' => '',
|
|
|
311
|
- 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
312
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
313
|
- 'isLike' => false,
|
|
|
314
|
- 'price' => 1268,
|
|
|
315
|
- 'salePrice' => 589,
|
|
|
316
|
- 'isSale' => true,
|
|
|
317
|
- 'isFew' => true,
|
|
|
318
|
- 'isNew' => false,
|
|
|
319
|
- 'url' => ''
|
|
|
320
|
- ),
|
|
|
321
|
- array(
|
|
|
322
|
- 'id' => '',
|
|
|
323
|
- 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
324
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
325
|
- 'isLike' => false,
|
|
|
326
|
- 'price' => 1268,
|
|
|
327
|
- 'salePrice' => 589,
|
|
|
328
|
- 'isSale' => true,
|
|
|
329
|
- 'isFew' => true,
|
|
|
330
|
- 'isNew' => false,
|
|
|
331
|
- 'url' => ''
|
|
|
332
|
- )
|
|
|
333
|
-
|
|
|
334
|
- )
|
|
|
335
|
- ),
|
|
|
336
|
- array(
|
|
|
337
|
- 'goods' => array(
|
|
|
338
|
- array(
|
|
|
339
|
- 'id' => '',
|
|
|
340
|
- 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
341
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
342
|
- 'isLike' => false,
|
|
|
343
|
- 'price' => 1268,
|
|
|
344
|
- 'salePrice' => 589,
|
|
|
345
|
- 'isSale' => true,
|
|
|
346
|
- 'isFew' => true,
|
|
|
347
|
- 'isNew' => false,
|
|
|
348
|
- 'url' => ''
|
|
|
349
|
- ),
|
|
|
350
|
- array(
|
|
|
351
|
- 'id' => '',
|
|
|
352
|
- 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
353
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
354
|
- 'isLike' => false,
|
|
|
355
|
- 'price' => 1268,
|
|
|
356
|
- 'salePrice' => 589,
|
|
|
357
|
- 'isSale' => true,
|
|
|
358
|
- 'isFew' => true,
|
|
|
359
|
- 'isNew' => false,
|
|
|
360
|
- 'url' => ''
|
|
|
361
|
- ),
|
|
|
362
|
- array(
|
|
|
363
|
- 'id' => '',
|
|
|
364
|
- 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
365
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
366
|
- 'isLike' => false,
|
|
|
367
|
- 'price' => 1268,
|
|
|
368
|
- 'salePrice' => 589,
|
|
|
369
|
- 'isSale' => true,
|
|
|
370
|
- 'isFew' => true,
|
|
|
371
|
- 'isNew' => false,
|
|
|
372
|
- 'url' => ''
|
|
|
373
|
- ),
|
|
|
374
|
- array(
|
|
|
375
|
- 'id' => '',
|
|
|
376
|
- 'thumb' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
|
|
|
377
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
378
|
- 'isLike' => false,
|
|
|
379
|
- 'price' => 1268,
|
|
|
380
|
- 'salePrice' => 589,
|
|
|
381
|
- 'isSale' => true,
|
|
|
382
|
- 'isFew' => true,
|
|
|
383
|
- 'isNew' => false,
|
|
|
384
|
- 'url' => ''
|
|
|
385
|
- )
|
|
|
386
|
-
|
|
|
387
|
- )
|
|
|
388
|
-
|
|
|
389
|
- ),
|
|
|
390
|
- array(
|
|
|
391
|
- 'goods' => array(
|
|
|
392
|
- array(
|
|
|
393
|
- 'id' => '',
|
|
|
394
|
- 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
395
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
396
|
- 'isLike' => false,
|
|
|
397
|
- 'price' => 1268,
|
|
|
398
|
- 'salePrice' => 589,
|
|
|
399
|
- 'isSale' => true,
|
|
|
400
|
- 'isFew' => true,
|
|
|
401
|
- 'isNew' => false,
|
|
|
402
|
- 'url' => ''
|
|
|
403
|
- ),
|
|
|
404
|
- array(
|
|
|
405
|
- 'id' => '',
|
|
|
406
|
- 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
407
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
408
|
- 'isLike' => false,
|
|
|
409
|
- 'price' => 1268,
|
|
|
410
|
- 'salePrice' => 589,
|
|
|
411
|
- 'isSale' => true,
|
|
|
412
|
- 'isFew' => true,
|
|
|
413
|
- 'isNew' => false,
|
|
|
414
|
- 'url' => ''
|
|
|
415
|
- ),
|
|
|
416
|
- array(
|
|
|
417
|
- 'id' => '',
|
|
|
418
|
- 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
419
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
420
|
- 'isLike' => false,
|
|
|
421
|
- 'price' => 1268,
|
|
|
422
|
- 'salePrice' => 589,
|
|
|
423
|
- 'isSale' => true,
|
|
|
424
|
- 'isFew' => true,
|
|
|
425
|
- 'isNew' => false,
|
|
|
426
|
- 'url' => ''
|
|
|
427
|
- ),
|
|
|
428
|
- array(
|
|
|
429
|
- 'id' => '',
|
|
|
430
|
- 'thumb' => 'http://img11.static.yhbimg.com/yhb-img01/2015/09/17/09/015e14c53a41c7adf0bd039f6493b5a700.jpg?imageView/2/w/140/h/140',
|
|
|
431
|
- 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
432
|
- 'isLike' => false,
|
|
|
433
|
- 'price' => 1268,
|
|
|
434
|
- 'salePrice' => 589,
|
|
|
435
|
- 'isSale' => true,
|
|
|
436
|
- 'isFew' => true,
|
|
|
437
|
- 'isNew' => false,
|
|
|
438
|
- 'url' => ''
|
|
|
439
|
- )
|
|
|
440
|
-
|
|
|
441
|
- )
|
|
|
442
|
-
|
|
|
443
|
-
|
|
|
444
|
- )
|
|
|
445
|
-
|
|
|
446
|
- )
|
|
|
447
|
- );
|
|
|
448
|
-
|
|
|
449
|
- /*$this->_view->assign('title', '折扣专区');
|
256
|
+ $this->_view->display('product', $result);
|
|
|
257
|
+ // $this->returnJson(200, '获取成功', $data);
|
|
|
258
|
+ // }
|
|
|
259
|
+ }
|
450
|
|
260
|
|
451
|
- // 折扣专区顶部焦点图
|
|
|
452
|
- $focusData = Newsale::getNewsaleFocus('e9c9be32d72e2906d404a72ee24cb523');
|
|
|
453
|
- // 处理返回的数据
|
|
|
454
|
- $focus = array();
|
|
|
455
|
- if($focusData['code'] == 200)
|
|
|
456
|
- {
|
|
|
457
|
- foreach ($focusData['data'] as $single)
|
|
|
458
|
- {
|
|
|
459
|
- foreach ($single['data'] as $val) {
|
|
|
460
|
- $val['src'] = Helpers::getImageUrl($val['src'], 375, 667, 1);
|
|
|
461
|
- $focus[] = $val;
|
|
|
462
|
- }
|
|
|
463
|
- }
|
|
|
464
|
- }
|
261
|
+ /**
|
|
|
262
|
+ * 折扣专区
|
|
|
263
|
+ */
|
|
|
264
|
+ public function discountAction()
|
|
|
265
|
+ {
|
465
|
|
266
|
|
466
|
- // 折扣专区商品数据
|
|
|
467
|
- $products = Newsale::getNewProducts('1,3', 1, 60);
|
|
|
468
|
- var_dump($products);
|
267
|
+ /*$data = array(
|
|
|
268
|
+ 'header' => array(
|
|
|
269
|
+ 'title' => 'SALE'
|
|
|
270
|
+ ),
|
|
|
271
|
+
|
|
|
272
|
+ 'goodsContainer' => array(
|
|
|
273
|
+ 'goods' => array(
|
|
|
274
|
+ array(
|
|
|
275
|
+ 'id' => '',
|
|
|
276
|
+ 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
277
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
278
|
+ 'isLike' => false,
|
|
|
279
|
+ 'price' => 1268,
|
|
|
280
|
+ 'salePrice' => 589,
|
|
|
281
|
+ 'isSale' => true,
|
|
|
282
|
+ 'isFew' => true,
|
|
|
283
|
+ 'isNew' => false,
|
|
|
284
|
+ 'url' => ''
|
|
|
285
|
+ ),
|
|
|
286
|
+ array(
|
|
|
287
|
+ 'id' => '',
|
|
|
288
|
+ 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
289
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
290
|
+ 'isLike' => false,
|
|
|
291
|
+ 'price' => 1268,
|
|
|
292
|
+ 'salePrice' => 589,
|
|
|
293
|
+ 'isSale' => true,
|
|
|
294
|
+ 'isFew' => true,
|
|
|
295
|
+ 'isNew' => false,
|
|
|
296
|
+ 'url' => ''
|
|
|
297
|
+ ),
|
|
|
298
|
+ array(
|
|
|
299
|
+ 'id' => '',
|
|
|
300
|
+ 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
301
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
302
|
+ 'isLike' => false,
|
|
|
303
|
+ 'price' => 1268,
|
|
|
304
|
+ 'salePrice' => 589,
|
|
|
305
|
+ 'isSale' => true,
|
|
|
306
|
+ 'isFew' => true,
|
|
|
307
|
+ 'isNew' => false,
|
|
|
308
|
+ 'url' => ''
|
|
|
309
|
+ ),
|
|
|
310
|
+ array(
|
|
|
311
|
+ 'id' => '',
|
|
|
312
|
+ 'thumb' => 'http://img12.static.yhbimg.com/adpic/2015/08/14/12/0205a06e86edb30a7d1833477a9e886577.jpg?imageView/2/w/640/h/480',
|
|
|
313
|
+ 'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
|
|
|
314
|
+ 'isLike' => false,
|
|
|
315
|
+ 'price' => 1268,
|
|
|
316
|
+ 'salePrice' => 589,
|
|
|
317
|
+ 'isSale' => true,
|
|
|
318
|
+ 'isFew' => true,
|
|
|
319
|
+ 'isNew' => false,
|
|
|
320
|
+ 'url' => ''
|
|
|
321
|
+ )
|
|
|
322
|
+ )
|
|
|
323
|
+ )
|
|
|
324
|
+ );*/
|
469
|
|
325
|
|
470
|
- $this->_view->display('new', compact('focus', 'products'));*/
|
326
|
+ $data = array(
|
|
|
327
|
+ 'discount' => true,
|
|
|
328
|
+ 'header' => array(
|
|
|
329
|
+ 'title' => 'SALE'
|
|
|
330
|
+ )
|
|
|
331
|
+ );
|
471
|
|
332
|
|
472
|
- $this->_view->assign('title', '折扣专区');
|
|
|
473
|
- $this->_view->display('sale', $data);
|
|
|
474
|
- }
|
333
|
+ // 折扣专区顶部焦点图
|
|
|
334
|
+ $focusData = Newsale::getNewsaleFocus('e9c9be32d72e2906d404a72ee24cb523');
|
|
|
335
|
+ // 处理返回的数据
|
|
|
336
|
+ $focus = array();
|
|
|
337
|
+ if($focusData['code'] == 200)
|
|
|
338
|
+ {
|
|
|
339
|
+ $focus = $focusData['data'];
|
|
|
340
|
+ }
|
|
|
341
|
+
|
|
|
342
|
+ // 折扣专区商品数据
|
|
|
343
|
+ $products = Newsale::getSaleProducts('1,3', 1);
|
|
|
344
|
+ // 更新tabs
|
|
|
345
|
+ $tabs = array();
|
|
|
346
|
+ foreach (array_keys($products) as $key => $value) {
|
|
|
347
|
+ $tabItem = array();
|
|
|
348
|
+ $tabItem['title'] = $value;
|
|
|
349
|
+ if($key === 0)
|
|
|
350
|
+ {
|
|
|
351
|
+ $tabItem['focus'] = true;
|
|
|
352
|
+ }
|
|
|
353
|
+ $tabs[] = $tabItem;
|
|
|
354
|
+ }
|
|
|
355
|
+ $data += array('tabs' => $tabs);
|
|
|
356
|
+ // 添加商品数据
|
|
|
357
|
+ $data += NewSaleProcess::newSaleData($focus, $products);
|
|
|
358
|
+
|
|
|
359
|
+ echo '<pre>';
|
|
|
360
|
+ print_r($data);exit;
|
|
|
361
|
+
|
|
|
362
|
+ $this->_view->assign('title', '折扣专区');
|
|
|
363
|
+ $this->_view->display('sale', $data);
|
|
|
364
|
+ }
|
475
|
} |
365
|
} |