Authored by zhangxiaoru

order

@@ -267,6 +267,7 @@ class CartData @@ -267,6 +267,7 @@ class CartData
267 } 267 }
268 268
269 $param['client_secret'] = Sign::getSign($param); 269 $param['client_secret'] = Sign::getSign($param);
  270 + // print_r(Yohobuy::get(API_URL, $param));
270 271
271 return Yohobuy::get(API_URL, $param); 272 return Yohobuy::get(API_URL, $param);
272 } 273 }
@@ -244,6 +244,15 @@ @@ -244,6 +244,15 @@
244 display: inline-block; 244 display: inline-block;
245 } 245 }
246 } 246 }
  247 +
  248 + .yoho-coin {
  249 + margin: 50px 0 30px;
  250 + background: resolve('product/yoho_icon.png') no-repeat;
  251 + padding-left: 68px;
  252 + height: 60px;
  253 + line-height: 60px;
  254 + font-size: 28px;
  255 + }
247 } 256 }
248 257
249 .order-good { 258 .order-good {
@@ -303,6 +303,10 @@ @@ -303,6 +303,10 @@
303 -webkit-box-orient: vertical; 303 -webkit-box-orient: vertical;
304 } 304 }
305 305
  306 + .limit {
  307 + color: #b6b6b6;
  308 + }
  309 +
306 .row:nth-child(2) { 310 .row:nth-child(2) {
307 height: 45px; 311 height: 45px;
308 line-height: 45px; 312 line-height: 45px;
@@ -177,6 +177,13 @@ @@ -177,6 +177,13 @@
177 实付金额 177 实付金额
178 <span>¥{{price}}</span> 178 <span>¥{{price}}</span>
179 </div> 179 </div>
  180 +
  181 + {{#if yohoCoinNum}}
  182 + <div class="yoho-coin">
  183 + 共返有货币: {{yohoCoinNum}}个
  184 + </div>
  185 + {{/if}}
  186 +
180 </section> 187 </section>
181 <div class="bill"> 188 <div class="bill">
182 您需要支付:<span>¥{{price}}</span> 189 您需要支付:<span>¥{{price}}</span>
@@ -21,7 +21,12 @@ @@ -21,7 +21,12 @@
21 {{#if tickets}}区域{{else}}尺码{{/if}}:{{size}} 21 {{#if tickets}}区域{{else}}尺码{{/if}}:{{size}}
22 </span> 22 </span>
23 {{/if}} 23 {{/if}}
  24 +
24 </p> 25 </p>
  26 + <p class="limit">不支持七天无理由退换货</p>
  27 + <!-- {{#if isLimitSkn}} -->
  28 +
  29 + <!-- {{/if}} -->
25 <p class="row price-wrap"> 30 <p class="row price-wrap">
26 <span class="price"> 31 <span class="price">
27 ¥{{price}} 32 ¥{{price}}
@@ -482,6 +482,7 @@ class CartModel @@ -482,6 +482,7 @@ class CartModel
482 if (isset($payReturn['goods_list'])) { 482 if (isset($payReturn['goods_list'])) {
483 $oneGoods = array(); 483 $oneGoods = array();
484 $goodsPrice = 0; 484 $goodsPrice = 0;
  485 + $yohoCoinNumAll = 0;
485 486
486 foreach ($payReturn['goods_list'] as $single) { 487 foreach ($payReturn['goods_list'] as $single) {
487 $oneGoods = array(); 488 $oneGoods = array();
@@ -492,7 +493,11 @@ class CartModel @@ -492,7 +493,11 @@ class CartModel
492 $oneGoods['size'] = $single['size_name']; 493 $oneGoods['size'] = $single['size_name'];
493 $oneGoods['count'] = $single['buy_number']; 494 $oneGoods['count'] = $single['buy_number'];
494 $oneGoods['price'] = Helpers::transPrice($single['last_price']); 495 $oneGoods['price'] = Helpers::transPrice($single['last_price']);
495 - 496 + if (isset($single['is_limit_skn'])) {
  497 + $oneGoods['isLimitSkn'] = $single['is_limit_skn'];
  498 + }
  499 + $oneGoods['yohoCoinNum'] = $single['yoho_coin_num'];
  500 +
496 //gift=>是否赠品,advanceBuy=>是否加价购; 501 //gift=>是否赠品,advanceBuy=>是否加价购;
497 if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) { 502 if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {
498 $oneGoods['gift'] = true; 503 $oneGoods['gift'] = true;
@@ -505,12 +510,17 @@ class CartModel @@ -505,12 +510,17 @@ class CartModel
505 510
506 // 累加商品金额 511 // 累加商品金额
507 $goodsPrice += $oneGoods['count'] * $oneGoods['price']; 512 $goodsPrice += $oneGoods['count'] * $oneGoods['price'];
  513 + $yohoCoinNumAll += $oneGoods['yohoCoinNum'];
508 514
509 $result['goods'][] = $oneGoods; 515 $result['goods'][] = $oneGoods;
510 } 516 }
511 517
512 // 商品金额 518 // 商品金额
513 $result['goodsPrice'] = Helpers::transPrice($goodsPrice); 519 $result['goodsPrice'] = Helpers::transPrice($goodsPrice);
  520 + //$result['yohoCoinNum'] = $yohoCoinNumAll;
  521 + if($yohoCoinNumAll > 0) {
  522 + $result['yohoCoinNum'] = $yohoCoinNumAll;
  523 + }
514 } 524 }
515 525
516 // 支付方式 526 // 支付方式
@@ -352,9 +352,10 @@ class IndexController extends AbstractAction @@ -352,9 +352,10 @@ class IndexController extends AbstractAction
352 'userMobile' => $mobile 352 'userMobile' => $mobile
353 ); 353 );
354 354
  355 +
355 $this->setTitle('确认订单'); 356 $this->setTitle('确认订单');
356 $this->setNavHeader('确认订单', $returnUrl, false); // 不显示右上角home按钮 357 $this->setNavHeader('确认订单', $returnUrl, false); // 不显示右上角home按钮
357 - 358 + //print_r($data);
358 $this->_view->display('order-ensure', $data); 359 $this->_view->display('order-ensure', $data);
359 } 360 }
360 361