Showing
1 changed file
with
229 additions
and
32 deletions
@@ -16,22 +16,11 @@ class DetailController extends AbstractAction | @@ -16,22 +16,11 @@ class DetailController extends AbstractAction | ||
16 | */ | 16 | */ |
17 | public function indexAction() | 17 | public function indexAction() |
18 | { | 18 | { |
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 | - } | 19 | + $productId = $this->param('productId', 123); |
20 | + $goodsId = $this->param('goodsId', 3241); | ||
29 | $uid = $this->getUid(); | 21 | $uid = $this->getUid(); |
30 | 22 | ||
31 | - $data = \Product\DetailModel::getBaseInfo($productId, $goodsId, $uid); var_dump($data); | ||
32 | - if (array() === $data) { | ||
33 | - $this->error(); | ||
34 | - } | 23 | + $data = \Product\DetailModel::getBaseInfo($productId, $goodsId, $uid); |
35 | $data['goodsDetailPage'] = true; | 24 | $data['goodsDetailPage'] = true; |
36 | 25 | ||
37 | if (isset($data['goodsName'])) { | 26 | if (isset($data['goodsName'])) { |
@@ -39,27 +28,235 @@ class DetailController extends AbstractAction | @@ -39,27 +28,235 @@ class DetailController extends AbstractAction | ||
39 | } | 28 | } |
40 | $this->setNavHeader('商品详情'); | 29 | $this->setNavHeader('商品详情'); |
41 | 30 | ||
31 | +// $data = array ( | ||
32 | +// 'goodsDetailPage' => true, | ||
33 | +// 'pageHeader' => array ( | ||
34 | +// 'navBack' => 'sss ', | ||
35 | +// 'navHome' => 'sss ', | ||
36 | +// 'navTitle' => '商品详情TEST' | ||
37 | +// ), | ||
38 | +// | ||
39 | +// 'bannerTop' => array ( | ||
40 | +// 'list' => array ( | ||
41 | +// array ( | ||
42 | +// 'url' => '', | ||
43 | +// 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/10/18/03/0250c3935f86dbd2baa7d45603d19fd637.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90' | ||
44 | +// ), | ||
45 | +// array ( | ||
46 | +// 'url' => '', | ||
47 | +// 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01bf4cf4444035a1930d33a9d0f8bff4fa.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90' | ||
48 | +// ), | ||
49 | +// array ( | ||
50 | +// 'url' => '', | ||
51 | +// 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01d7ef2f624eeea15e80bb374607aea317.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90' | ||
52 | +// ) | ||
53 | +// ) | ||
54 | +// ), | ||
55 | +// 'goodsName' => 'Stussy No. 4 BOX TEE DC SPAR HIGH WC | ||
56 | +//SHOE BQT KEN BLOCK', | ||
57 | +// 'goodsSubtitle'=>'【全民拼抢购】经典印花T恤,满4件免一件!全场低至 | ||
58 | +//9.9元,拼购时代High起来。', | ||
59 | +// | ||
60 | +// 'goodsPrice' =>array( | ||
61 | +// 'currentPrice'=>'¥298.00', | ||
62 | +// 'previousPrice'=>'¥598.00' | ||
63 | +// ), | ||
64 | +// 'periodOfMarket'=>'11月', | ||
65 | +// 'goodsTitle' => '¥298.00', | ||
66 | +// 'vipLevel' => array ( | ||
67 | +// 'list' => array ( | ||
68 | +// array ( | ||
69 | +// 'img'=>'http://static.dev.yohobuy.com/img/product/silver.png', | ||
70 | +// 'text' => '¥284.00' | ||
71 | +// ), | ||
72 | +// array ( | ||
73 | +// 'img'=>'http://static.dev.yohobuy.com/img/product/golden.png', | ||
74 | +// 'text' => '¥269.00' | ||
75 | +// ), | ||
76 | +// array ( | ||
77 | +// 'img'=>'http://static.dev.yohobuy.com/img/product/platinum.png', | ||
78 | +// 'text' => '¥263.00' | ||
79 | +// ) | ||
80 | +// ) | ||
81 | +// ), | ||
82 | +// 'goodsDiscount'=>array( | ||
83 | +// 'list'=>array( | ||
84 | +// '【summer final sale】满¥499立享6.8折', | ||
85 | +// '【BACK TO SCHOOL】满¥499赠送Paul | ||
86 | +// Franke帽子一个,多买多送!', | ||
87 | +// '【BACK TO SCHOOL】满¥499赠送Paul | ||
88 | +// Franke帽子一个,多买多送!' | ||
89 | +// ) | ||
90 | +// ), | ||
91 | +// 'feedbacks'=>array( | ||
92 | +// 'commentsNum'=>0, | ||
93 | +// 'consultsNum'=>1, | ||
94 | +// // 'commentName'=>'商品评价', | ||
95 | +// // 'consultName' =>'购买咨询', | ||
96 | +// 'link'=>'', | ||
97 | +// 'comments'=>array( | ||
98 | +// array( | ||
99 | +// 'userName'=>'Lynnic', | ||
100 | +// 'desc'=>'购买了白色Mate7', | ||
101 | +// 'content'=>'活动时买的,挺超值。上身效果也不错。质量 | ||
102 | +//很好,买送人的,很满意。而且物流相当给...', | ||
103 | +// 'time'=>'2014-08-12 10:24:26' | ||
104 | +// ) | ||
105 | +// ), | ||
106 | +// 'consults'=>array( | ||
107 | +// array( | ||
108 | +// 'question' =>'您好 我一米七七 140斤 穿M的行吗', | ||
109 | +// 'time'=>'2014-08-12 10:24:26', | ||
110 | +// 'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要' | ||
111 | +// ) | ||
112 | +// ) | ||
113 | +// ), | ||
114 | +// | ||
115 | +// 'enterStore'=>array( | ||
116 | +// 'img'=>'http://static.dev.yohobuy.com/img/product/store.png', | ||
117 | +// 'storeName'=>'Stussy', | ||
118 | +// 'url'=>'http://stussy.m.yohobuy.com/' | ||
119 | +// ), | ||
120 | +// | ||
121 | +// 'goodsDescription'=>array( | ||
122 | +// 'title' =>'商品描述', | ||
123 | +// 'enTitle'=>'DESCRIPTON', | ||
124 | +// | ||
125 | +// 'detail'=>array( | ||
126 | +// 'nubmer' =>'51018059', | ||
127 | +// 'color' =>'黑', | ||
128 | +// 'type' =>'帽子', | ||
129 | +// 'gender' =>'女款', | ||
130 | +// 'hatType' =>'棒球帽', | ||
131 | +// 'bongrace' =>'平檐款式', | ||
132 | +// 'goodsDetail'=>'字母图案', | ||
133 | +// 'style'=>'街头' | ||
134 | +// ) | ||
135 | +// ), | ||
136 | +// | ||
137 | +// 'sizeInfo'=>array( | ||
138 | +// 'title' => '尺码信息', | ||
139 | +// 'enTitle' =>'xSIZE INFO', | ||
140 | +// | ||
141 | +// 'detail' =>array( | ||
142 | +// 'list'=>array( | ||
143 | +// array( | ||
144 | +// 'name'=>'尺寸', | ||
145 | +// 'sizem'=>'m', | ||
146 | +// 'sizexl' =>'XL' | ||
147 | +// ), | ||
148 | +// array( | ||
149 | +// 'name'=>'肩宽', | ||
150 | +// 'sizem'=>'43', | ||
151 | +// 'sizexl' =>'46' | ||
152 | +// ), | ||
153 | +// array( | ||
154 | +// 'name'=>'衣长', | ||
155 | +// 'sizem'=>'102', | ||
156 | +// 'sizexl' =>'106' | ||
157 | +// ), | ||
158 | +// array( | ||
159 | +// 'name'=>'肩宽', | ||
160 | +// 'sizem'=>'90', | ||
161 | +// 'sizexl' =>'96' | ||
162 | +// ), | ||
163 | +// array( | ||
164 | +// 'name'=>'胸围', | ||
165 | +// 'sizem'=>'90', | ||
166 | +// 'sizexl' =>'96' | ||
167 | +// ), | ||
168 | +// array( | ||
169 | +// 'name'=>'xx', | ||
170 | +// 'sizem'=>'xx', | ||
171 | +// 'sizexl' =>'xx' | ||
172 | +// ) | ||
173 | +// ) | ||
174 | +// ) | ||
175 | +// ), | ||
176 | +// | ||
177 | +// 'measurementMethod'=>array( | ||
178 | +// 'title' => '测量方式', | ||
179 | +// 'enTitle' =>'MEASUREMENT METHOD', | ||
180 | +// | ||
181 | +// 'detail'=>array( | ||
182 | +// 'sort' =>'上衣' , | ||
183 | +// 'enSort'=>'TOPS', | ||
184 | +// 'img' =>'http://static.dev.yohobuy.com/img/product/tops.png', | ||
185 | +// 'items'=>array( | ||
186 | +// '肩宽(两端肩线间的直线长度)', | ||
187 | +// '胸围(两端肩线间的直线长度)', | ||
188 | +// '肩宽(两端肩线间的直线长度)', | ||
189 | +// '肩宽(两端肩线间的直线长度)', | ||
190 | +// '肩宽(两端肩线间的直线长度)', | ||
191 | +// '肩宽(两端肩线间的直线长度)' | ||
192 | +// ) | ||
193 | +// ) | ||
194 | +// ), | ||
195 | +// | ||
196 | +// 'reference' => array( | ||
197 | +// 'title' => '模特试穿', | ||
198 | +// 'enTitle' =>'REFERENCE', | ||
199 | +// | ||
200 | +// 'detail' =>array( | ||
201 | +// 'list'=>array( | ||
202 | +// array( | ||
203 | +// 'fieldName'=>'1 ', | ||
204 | +// 'firstModel'=>'http://static.dev.yohobuy.com/img/product/avatar1.png', | ||
205 | +// 'secondModel' =>'http://static.dev.yohobuy.com/img/product/avatar2.png' | ||
206 | +// ), | ||
207 | +// array( | ||
208 | +// 'fieldName'=>'模特', | ||
209 | +// 'firstModel'=>'Oliver', | ||
210 | +// 'secondModel' =>'Jvly' | ||
211 | +// ), | ||
212 | +// array( | ||
213 | +// 'fieldName'=>'身高', | ||
214 | +// 'firstModel'=>'175', | ||
215 | +// 'secondModel' =>'170' | ||
216 | +// ), | ||
217 | +// array( | ||
218 | +// 'fieldName'=>'体重', | ||
219 | +// 'firstModel'=>'53', | ||
220 | +// 'secondModel' =>'59' | ||
221 | +// ), | ||
222 | +// array( | ||
223 | +// 'fieldName'=>'三围', | ||
224 | +// 'firstModel'=>'78/70/87', | ||
225 | +// 'secondModel' =>'78/70/87' | ||
226 | +// ), | ||
227 | +// array( | ||
228 | +// 'fieldName'=>'吊牌尺', | ||
229 | +// 'firstModel'=>'S', | ||
230 | +// 'secondModel' =>'L' | ||
231 | +// ) | ||
232 | +// ) | ||
233 | +// ) | ||
234 | +// ), | ||
235 | +// | ||
236 | +// 'materials' => array( | ||
237 | +// 'title' => '商品材质', | ||
238 | +// 'enTitle' =>'MATERIALS', | ||
239 | +// 'img' => 'http://static.dev.yohobuy.com/img/product/material.png', | ||
240 | +// 'desc' =>'用各种洗涤剂,可手洗机洗,但不宜氯漂,宜阴干,避免曝晒,以免深色衣物褪色,在日光下晾晒时,将里面朝外。浸泡时间不能太长,避免褪色,深色与浅色衣服最好请分开洗涤,避免染色。', | ||
241 | +// 'materialType'=>'http://static.dev.yohobuy.com/img/product/material-type.png' | ||
242 | +// ), | ||
243 | +// | ||
244 | +// 'productDetail' =>array( | ||
245 | +// 'title' => '商品详情', | ||
246 | +// 'enTitle' =>'DETAILS', | ||
247 | +// 'desc' => 'Married to the MOB是由Leah McSweeney创立的女装品牌,一向标榜不羁、大胆的女性streetwear设计。喜欢恶搞的女生们,赶紧入手吧。', | ||
248 | +// 'img' =>'http://static.dev.yohobuy.com/img/product/product.png' | ||
249 | +// ), | ||
250 | +// | ||
251 | +// 'cartInfo' =>array( | ||
252 | +// 'numInCart' => 3, | ||
253 | +// 'goodsInstore'=>0 | ||
254 | +// ) | ||
255 | +// | ||
256 | +// ); | ||
42 | // 渲染模板 | 257 | // 渲染模板 |
43 | $this->_view->display('index', $data); | 258 | $this->_view->display('index', $data); |
44 | } | 259 | } |
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 | 260 | ||
64 | public function commentsAction() | 261 | public function commentsAction() |
65 | { | 262 | { |
-
Please register or login to post a comment