|
@@ -16,382 +16,51 @@ class DetailController extends AbstractAction |
|
@@ -16,382 +16,51 @@ class DetailController extends AbstractAction |
16
|
*/
|
16
|
*/
|
17
|
public function indexAction()
|
17
|
public function indexAction()
|
18
|
{
|
18
|
{
|
19
|
- $productId = $this->param('productId', 123);
|
|
|
20
|
- $goodsId = $this->param('goodsId', 3241);
|
19
|
+ $productId = $this->param('productId');
|
|
|
20
|
+ $productId = 22399;
|
|
|
21
|
+ if (!is_numeric($productId)) {
|
|
|
22
|
+ $this->error();
|
|
|
23
|
+ }
|
|
|
24
|
+ $goodsId = $this->param('goodsId');
|
|
|
25
|
+ $goodsId = 32443;
|
|
|
26
|
+ if (!is_numeric($goodsId)) {
|
|
|
27
|
+ $this->error();
|
|
|
28
|
+ }
|
21
|
$uid = $this->getUid();
|
29
|
$uid = $this->getUid();
|
22
|
|
30
|
|
|
|
31
|
+ $data = \Product\DetailModel::getBaseInfo($productId, $goodsId, $uid);
|
|
|
32
|
+ if (array() === $data) {
|
|
|
33
|
+ $this->error();
|
|
|
34
|
+ }
|
|
|
35
|
+ $data['goodsDetailPage'] = true;
|
23
|
|
36
|
|
|
|
37
|
+ if (isset($data['goodsName'])) {
|
|
|
38
|
+ $this->setTitle($data['goodsName']);
|
|
|
39
|
+ }
|
|
|
40
|
+ $this->setNavHeader('商品详情');
|
24
|
|
41
|
|
25
|
- // $data = \Product\DetailModel::getBaseInfo($productId, $goodsId, $uid);
|
|
|
26
|
- // $data['goodsDetailPage'] = true;
|
|
|
27
|
-
|
|
|
28
|
- // if (isset($data['goodsName'])) {
|
|
|
29
|
- // $this->setTitle($data['goodsName']);
|
|
|
30
|
- // }
|
|
|
31
|
- // $this->setNavHeader('商品详情');
|
|
|
32
|
-
|
|
|
33
|
- $data = array (
|
|
|
34
|
- 'goodsDetailPage' => true,
|
|
|
35
|
- 'pageHeader' => array (
|
|
|
36
|
- 'navBack' => 'sss ',
|
|
|
37
|
- 'navHome' => 'sss ',
|
|
|
38
|
- 'navTitle' => '商品详情TEST'
|
|
|
39
|
- ),
|
|
|
40
|
-
|
|
|
41
|
- 'bannerTop' => array (
|
|
|
42
|
- 'list' => array (
|
|
|
43
|
- array (
|
|
|
44
|
- 'url' => '',
|
|
|
45
|
- 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/10/18/03/0250c3935f86dbd2baa7d45603d19fd637.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
|
|
|
46
|
- ),
|
|
|
47
|
- array (
|
|
|
48
|
- 'url' => '',
|
|
|
49
|
- 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01bf4cf4444035a1930d33a9d0f8bff4fa.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
|
|
|
50
|
- ),
|
|
|
51
|
- array (
|
|
|
52
|
- 'url' => '',
|
|
|
53
|
- 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01d7ef2f624eeea15e80bb374607aea317.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
|
|
|
54
|
- )
|
|
|
55
|
- )
|
|
|
56
|
- ),
|
|
|
57
|
- 'goodsName' => 'Stussy No. 4 BOX TEE DC SPAR HIGH WC
|
|
|
58
|
-SHOE BQT KEN BLOCK',
|
|
|
59
|
- 'goodsSubtitle'=>'【全民拼抢购】经典印花T恤,满4件免一件!全场低至
|
|
|
60
|
-9.9元,拼购时代High起来。',
|
|
|
61
|
-
|
|
|
62
|
- 'goodsPrice' =>array(
|
|
|
63
|
- 'currentPrice'=>'¥298.00',
|
|
|
64
|
- 'previousPrice'=>'¥598.00'
|
|
|
65
|
- ),
|
|
|
66
|
- 'periodOfMarket'=>'11月',
|
|
|
67
|
- 'goodsTitle' => '¥298.00',
|
|
|
68
|
- 'vipLevel' => array (
|
|
|
69
|
- 'list' => array (
|
|
|
70
|
- array (
|
|
|
71
|
- 'img'=>'http://static.dev.yohobuy.com/img/product/silver.png',
|
|
|
72
|
- 'text' => '¥284.00'
|
|
|
73
|
- ),
|
|
|
74
|
- array (
|
|
|
75
|
- 'img'=>'http://static.dev.yohobuy.com/img/product/golden.png',
|
|
|
76
|
- 'text' => '¥269.00'
|
|
|
77
|
- ),
|
|
|
78
|
- array (
|
|
|
79
|
- 'img'=>'http://static.dev.yohobuy.com/img/product/platinum.png',
|
|
|
80
|
- 'text' => '¥263.00'
|
|
|
81
|
- )
|
|
|
82
|
- )
|
|
|
83
|
- ),
|
|
|
84
|
- 'goodsDiscount'=>array(
|
|
|
85
|
- 'list'=>array(
|
|
|
86
|
- array(
|
|
|
87
|
- 'text' =>' 【summer final sale】满¥499立享6.8折'
|
|
|
88
|
- ),
|
|
|
89
|
- array(
|
|
|
90
|
- 'text' =>' 【BACK TO SCHOOL】满¥499赠送Paul
|
|
|
91
|
- Franke帽子一个,多买多送!'
|
|
|
92
|
- ),
|
|
|
93
|
- array(
|
|
|
94
|
- 'text' =>' 【BACK TO SCHOOL】满¥499赠送Paul
|
|
|
95
|
- Franke帽子一个,多买多送!'
|
|
|
96
|
- )
|
|
|
97
|
- )
|
|
|
98
|
- ),
|
|
|
99
|
- 'feedbacks'=>array(
|
|
|
100
|
- 'commentsNum'=>0,
|
|
|
101
|
- 'consultsNum'=>1,
|
|
|
102
|
- // 'commentName'=>'商品评价',
|
|
|
103
|
- // 'consultName' =>'购买咨询',
|
|
|
104
|
- 'link'=>'',
|
|
|
105
|
- 'comments'=>array(
|
|
|
106
|
- array(
|
|
|
107
|
- 'userName'=>'Lynnic',
|
|
|
108
|
- 'desc'=>'购买了白色Mate7',
|
|
|
109
|
- 'content'=>'活动时买的,挺超值。上身效果也不错。质量
|
|
|
110
|
-很好,买送人的,很满意。而且物流相当给...',
|
|
|
111
|
- 'time'=>'2014-08-12 10:24:26'
|
|
|
112
|
- )
|
|
|
113
|
- ),
|
|
|
114
|
- 'consults'=>array(
|
|
|
115
|
- array(
|
|
|
116
|
- 'question' =>'您好 我一米七七 140斤 穿M的行吗',
|
|
|
117
|
- 'time'=>'2014-08-12 10:24:26',
|
|
|
118
|
- 'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
|
|
|
119
|
- )
|
|
|
120
|
- )
|
|
|
121
|
- ),
|
|
|
122
|
-
|
|
|
123
|
- 'enterStore'=>array(
|
|
|
124
|
- 'img'=>'http://static.dev.yohobuy.com/img/product/store.png',
|
|
|
125
|
- 'storeName'=>'Stussy',
|
|
|
126
|
- 'url'=>'http://stussy.m.yohobuy.com/'
|
|
|
127
|
- ),
|
|
|
128
|
-
|
|
|
129
|
- 'goodsDescription'=>array(
|
|
|
130
|
- 'title' =>'商品描述',
|
|
|
131
|
- 'enTitle'=>'DESCRIPTON',
|
|
|
132
|
-
|
|
|
133
|
- 'detail'=>array(
|
|
|
134
|
- 'list' =>array(
|
|
|
135
|
- array(
|
|
|
136
|
- 'param'=>'编号:100101'
|
|
|
137
|
- ),
|
|
|
138
|
- array(
|
|
|
139
|
- 'param'=>'编号:100101'
|
|
|
140
|
- ),
|
|
|
141
|
- array(
|
|
|
142
|
- 'param'=>'编号:100101'
|
|
|
143
|
- )
|
|
|
144
|
- )
|
|
|
145
|
- ),
|
|
|
146
|
-
|
|
|
147
|
- 'desc'=>'fafdfa'
|
|
|
148
|
- ),
|
|
|
149
|
-
|
|
|
150
|
- 'sizeInfo'=>array(
|
|
|
151
|
- 'title' => '尺码信息',
|
|
|
152
|
- 'enTitle' =>'xSIZE INFO',
|
|
|
153
|
-
|
|
|
154
|
- 'detail' =>array(
|
|
|
155
|
- 'list'=>array(
|
|
|
156
|
- array(
|
|
|
157
|
- 'params'=>array(
|
|
|
158
|
- array(
|
|
|
159
|
- 'param' =>'M'
|
|
|
160
|
- ),
|
|
|
161
|
- array(
|
|
|
162
|
- 'param' =>'XL'
|
|
|
163
|
- ),
|
|
|
164
|
- array(
|
|
|
165
|
- 'param' =>'XXL'
|
|
|
166
|
- )
|
|
|
167
|
- )
|
|
|
168
|
- ),
|
|
|
169
|
- array(
|
|
|
170
|
- 'params'=>array(
|
|
|
171
|
- array(
|
|
|
172
|
- 'param' =>'43'
|
|
|
173
|
- ),
|
|
|
174
|
- array(
|
|
|
175
|
- 'param' =>'46'
|
|
|
176
|
- ),
|
|
|
177
|
- array(
|
|
|
178
|
- 'param' =>'XXL'
|
|
|
179
|
- )
|
|
|
180
|
- )
|
|
|
181
|
- ),
|
|
|
182
|
- array(
|
|
|
183
|
- 'params'=>array(
|
|
|
184
|
- array(
|
|
|
185
|
- 'param' =>'102'
|
|
|
186
|
- ),
|
|
|
187
|
- array(
|
|
|
188
|
- 'param' =>'107'
|
|
|
189
|
- ),
|
|
|
190
|
- array(
|
|
|
191
|
- 'param' =>'XXL'
|
|
|
192
|
- )
|
|
|
193
|
- )
|
|
|
194
|
- ),
|
|
|
195
|
- array(
|
|
|
196
|
- 'params'=>array(
|
|
|
197
|
- array(
|
|
|
198
|
- 'param' =>'11'
|
|
|
199
|
- ),
|
|
|
200
|
- array(
|
|
|
201
|
- 'param' =>'22'
|
|
|
202
|
- ),
|
|
|
203
|
- array(
|
|
|
204
|
- 'param' =>'XXL'
|
|
|
205
|
- )
|
|
|
206
|
- )
|
|
|
207
|
- ),
|
|
|
208
|
- array(
|
|
|
209
|
- 'params'=>array(
|
|
|
210
|
- array(
|
|
|
211
|
- 'param' =>'bb'
|
|
|
212
|
- ),
|
|
|
213
|
- array(
|
|
|
214
|
- 'param' =>'cc'
|
|
|
215
|
- ),
|
|
|
216
|
- array(
|
|
|
217
|
- 'param' =>'XXL'
|
|
|
218
|
- )
|
|
|
219
|
- )
|
|
|
220
|
- ),
|
|
|
221
|
- array(
|
|
|
222
|
- 'params'=>array(
|
|
|
223
|
- array(
|
|
|
224
|
- 'param' =>'kk'
|
|
|
225
|
- ),
|
|
|
226
|
- array(
|
|
|
227
|
- 'param' =>'bb'
|
|
|
228
|
- ),
|
|
|
229
|
- array(
|
|
|
230
|
- 'param' =>'XXL'
|
|
|
231
|
- )
|
|
|
232
|
- )
|
|
|
233
|
- )
|
|
|
234
|
- )
|
|
|
235
|
- )
|
|
|
236
|
- ),
|
|
|
237
|
-
|
|
|
238
|
- 'measurementMethod'=>array(
|
|
|
239
|
- 'title' => '测量方式',
|
|
|
240
|
- 'enTitle' =>'MEASUREMENT METHOD',
|
|
|
241
|
- 'img'=>'http://static.yohobuy.com/images/1.jpg'
|
|
|
242
|
- ),
|
|
|
243
|
-
|
|
|
244
|
- 'reference' => array(
|
|
|
245
|
- 'title' => '模特试穿',
|
|
|
246
|
- 'enTitle' =>'REFERENCE',
|
|
|
247
|
-
|
|
|
248
|
- 'detail' =>array(
|
|
|
249
|
- 'list'=>array(
|
|
|
250
|
- array(
|
|
|
251
|
- 'params'=>array(
|
|
|
252
|
- array(
|
|
|
253
|
- 'param' =>'M'
|
|
|
254
|
- ),
|
|
|
255
|
- array(
|
|
|
256
|
- 'param' =>'http://static.dev.yohobuy.com/img/product/avatar1.png'
|
|
|
257
|
- ),
|
|
|
258
|
- array(
|
|
|
259
|
- 'param' =>'http://static.dev.yohobuy.com/img/product/avatar2.png'
|
|
|
260
|
- )
|
|
|
261
|
- )
|
|
|
262
|
- ),
|
|
|
263
|
- array(
|
|
|
264
|
- 'params'=>array(
|
|
|
265
|
- array(
|
|
|
266
|
- 'param' =>'模特'
|
|
|
267
|
- ),
|
|
|
268
|
- array(
|
|
|
269
|
- 'param' =>'Oliver'
|
|
|
270
|
- ),
|
|
|
271
|
- array(
|
|
|
272
|
- 'param' =>'http://static.dev.yohobuy.com/img/product/avatar2.png'
|
|
|
273
|
- )
|
|
|
274
|
- )
|
|
|
275
|
- ),
|
|
|
276
|
- array(
|
|
|
277
|
- 'params'=>array(
|
|
|
278
|
- array(
|
|
|
279
|
- 'param' =>'102'
|
|
|
280
|
- ),
|
|
|
281
|
- array(
|
|
|
282
|
- 'param' =>'107'
|
|
|
283
|
- ),
|
|
|
284
|
- array(
|
|
|
285
|
- 'param' =>'XXL'
|
|
|
286
|
- )
|
|
|
287
|
- )
|
|
|
288
|
- ),
|
|
|
289
|
- array(
|
|
|
290
|
- 'params'=>array(
|
|
|
291
|
- array(
|
|
|
292
|
- 'param' =>'11'
|
|
|
293
|
- ),
|
|
|
294
|
- array(
|
|
|
295
|
- 'param' =>'22'
|
|
|
296
|
- ),
|
|
|
297
|
- array(
|
|
|
298
|
- 'param' =>'XXL'
|
|
|
299
|
- )
|
|
|
300
|
- )
|
|
|
301
|
- ),
|
|
|
302
|
- array(
|
|
|
303
|
- 'params'=>array(
|
|
|
304
|
- array(
|
|
|
305
|
- 'param' =>'bb'
|
|
|
306
|
- ),
|
|
|
307
|
- array(
|
|
|
308
|
- 'param' =>'cc'
|
|
|
309
|
- ),
|
|
|
310
|
- array(
|
|
|
311
|
- 'param' =>'XXL'
|
|
|
312
|
- )
|
|
|
313
|
- )
|
|
|
314
|
- ),
|
|
|
315
|
- array(
|
|
|
316
|
- 'params'=>array(
|
|
|
317
|
- array(
|
|
|
318
|
- 'param' =>'kk'
|
|
|
319
|
- ),
|
|
|
320
|
- array(
|
|
|
321
|
- 'param' =>'bb'
|
|
|
322
|
- ),
|
|
|
323
|
- array(
|
|
|
324
|
- 'param' =>'XXL'
|
|
|
325
|
- )
|
|
|
326
|
- )
|
|
|
327
|
- )
|
|
|
328
|
- )
|
|
|
329
|
- )
|
|
|
330
|
- ),
|
|
|
331
|
-
|
|
|
332
|
- 'materials' => array(
|
|
|
333
|
- 'title' => '商品材质',
|
|
|
334
|
- 'enTitle' =>'MATERIALS',
|
|
|
335
|
- 'list' => array(
|
|
|
336
|
- array(
|
|
|
337
|
- 'img' => 'http://static.dev.yohobuy.com/img/product/material.png',
|
|
|
338
|
- 'desc' =>'用各种洗涤剂,可手洗机洗,但不宜氯漂,宜阴干,避免曝晒,以免深色衣物褪色,在日光下晾晒时,将里面朝外。浸泡时间不能太长,避免褪色,深色与浅色衣服最好请分开洗涤,避免染色。'
|
|
|
339
|
- ),
|
|
|
340
|
- array(
|
|
|
341
|
- 'img' => 'http://static.dev.yohobuy.com/img/product/material.png',
|
|
|
342
|
- 'desc' =>'用各种洗涤剂,可手洗机洗,但不宜氯漂,宜阴干,避免曝晒,以免深色衣物褪色,在日光下晾晒时,将里面朝外。浸泡时间不能太长,避免褪色,深色与浅色衣服最好请分开洗涤,避免染色。'
|
|
|
343
|
- )
|
|
|
344
|
-
|
|
|
345
|
- )
|
|
|
346
|
- ),
|
|
|
347
|
-
|
|
|
348
|
- 'washTips' => array(
|
|
|
349
|
- array(
|
|
|
350
|
- 'img' => 'http://static.dev.yohobuy.com/img/product/washtips/washtip-1.png',
|
|
|
351
|
- 'caption'=>'不可干燥不可干洗'
|
|
|
352
|
- ),
|
|
|
353
|
- array(
|
|
|
354
|
- 'img' => 'http://static.dev.yohobuy.com/img/product/washtips/washtip-1.png',
|
|
|
355
|
- 'caption'=>'不可干燥不可干洗'
|
|
|
356
|
- ),
|
|
|
357
|
- array(
|
|
|
358
|
- 'img' => 'http://static.dev.yohobuy.com/img/product/washtips/washtip-1.png',
|
|
|
359
|
- 'caption'=>'不可干燥不可干洗'
|
|
|
360
|
- ),
|
|
|
361
|
- array(
|
|
|
362
|
- 'img' => 'http://static.dev.yohobuy.com/img/product/washtips/washtip-1.png',
|
|
|
363
|
- 'caption'=>'不可干燥不可干洗'
|
|
|
364
|
- ),
|
|
|
365
|
- array(
|
|
|
366
|
- 'img' => 'http://static.dev.yohobuy.com/img/product/washtips/washtip-1.png',
|
|
|
367
|
- 'caption'=>'不可干燥不可干洗'
|
|
|
368
|
- ),
|
|
|
369
|
- array(
|
|
|
370
|
- 'img' => 'http://static.dev.yohobuy.com/img/product/washtips/washtip-1.png',
|
|
|
371
|
- 'caption'=>'不可干燥不可干洗'
|
|
|
372
|
- )
|
|
|
373
|
- ),
|
|
|
374
|
-
|
|
|
375
|
- 'productDetail' =>array(
|
|
|
376
|
- 'title' => '商品详情',
|
|
|
377
|
- 'enTitle' =>'DETAILS',
|
|
|
378
|
- 'desc' => 'Married to the MOB是由Leah McSweeney创立的女装品牌,一向标榜不羁、大胆的女性streetwear设计。喜欢恶搞的女生们,赶紧入手吧。',
|
|
|
379
|
- 'list' => array (
|
|
|
380
|
- array('img' =>'http://static.dev.yohobuy.com/img/product/product.png'),
|
|
|
381
|
- array('img' =>'http://static.dev.yohobuy.com/img/product/product.png')
|
|
|
382
|
- )
|
|
|
383
|
- ),
|
|
|
384
|
-
|
|
|
385
|
- 'cartInfo' =>array(
|
|
|
386
|
- 'numInCart' => 3,
|
|
|
387
|
- 'goodsInstore'=>0
|
|
|
388
|
- )
|
|
|
389
|
-
|
|
|
390
|
- );
|
|
|
391
|
// 渲染模板
|
42
|
// 渲染模板
|
392
|
$this->_view->display('index', $data);
|
43
|
$this->_view->display('index', $data);
|
393
|
}
|
44
|
}
|
394
|
|
45
|
|
|
|
46
|
+ /**
|
|
|
47
|
+ * 尺码描述信息
|
|
|
48
|
+ */
|
|
|
49
|
+ public function introAction()
|
|
|
50
|
+ {
|
|
|
51
|
+ $productSkn = $this->param('productSkn');
|
|
|
52
|
+ if (!is_numeric($productSkn)) {
|
|
|
53
|
+ $this->error();
|
|
|
54
|
+ }
|
|
|
55
|
+ $data = \Product\DetailModel::getSizeInfo($productSkn);
|
|
|
56
|
+ if (array() === $data) {
|
|
|
57
|
+ echo ' ';
|
|
|
58
|
+ exit();
|
|
|
59
|
+ }
|
|
|
60
|
+ $this->_view->display('intro', $data);
|
|
|
61
|
+ }
|
|
|
62
|
+
|
|
|
63
|
+
|
395
|
public function commentsAction()
|
64
|
public function commentsAction()
|
396
|
{
|
65
|
{
|
397
|
$data = array(
|
66
|
$data = array(
|