Authored by 毕凯

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -576,30 +576,31 @@ class Helpers @@ -576,30 +576,31 @@ class Helpers
576 $oneGoods['thumb'] = !empty($value['goods_images']) ? Images::getImageUrl($value['goods_images'], 90, 100) : ''; 576 $oneGoods['thumb'] = !empty($value['goods_images']) ? Images::getImageUrl($value['goods_images'], 90, 100) : '';
577 $oneGoods['color'] = $value['color_name']; 577 $oneGoods['color'] = $value['color_name'];
578 $oneGoods['size'] = $value['size_name']; 578 $oneGoods['size'] = $value['size_name'];
579 - $oneGoods['isSelected'] = $value['selected'] === 'Y'; 579 + $oneGoods['checked'] = $value['selected'] === 'Y';
580 $oneGoods['price'] = self::transPrice($value['sales_price']); 580 $oneGoods['price'] = self::transPrice($value['sales_price']);
581 $oneGoods['count'] = $value['buy_number']; 581 $oneGoods['count'] = $value['buy_number'];
582 582
583 - if ($isValid) { 583 + if ($isValid) { // 库存不足
584 $oneGoods['lowStocks'] = ($value['buy_number'] > $value['storage_number']); 584 $oneGoods['lowStocks'] = ($value['buy_number'] > $value['storage_number']);
585 } 585 }
586 586
587 //gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品; 587 //gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品;
588 if (!isset($value['goods_type'])) { 588 if (!isset($value['goods_type'])) {
589 - $oneGoods['isSoldOut'] = true; 589 + $oneGoods['inValid'] = true;
590 } elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) { 590 } elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) {
591 $oneGoods['isGift'] = true; 591 $oneGoods['isGift'] = true;
592 } elseif ($value['goods_type'] == 'price_gift') { 592 } elseif ($value['goods_type'] == 'price_gift') {
593 $oneGoods['isAdvanceBuy'] = true; 593 $oneGoods['isAdvanceBuy'] = true;
  594 + } else {
  595 + $oneGoods['showCheckbox'] = true;
594 } 596 }
  597 +
595 // 上市期 598 // 上市期
596 if ($isAdvanceCart && !empty($value['expect_arrival_time'])) { 599 if ($isAdvanceCart && !empty($value['expect_arrival_time'])) {
597 $oneGoods['appearDate'] = $value['expect_arrival_time']; 600 $oneGoods['appearDate'] = $value['expect_arrival_time'];
598 } 601 }
599 // 商品链接 602 // 商品链接
600 - if (isset($value['cn_alphabet'])) {  
601 - $oneGoods['url'] = self::url('/product/pro_' . $value['product_id'] . '_' . $value['goods_id'] . '/' . $value['cn_alphabet'] . '.html');  
602 - } 603 + $oneGoods['link'] = self::url('/product/show_' . $value['product_skn'] . '.html');
603 604
604 $arr[$key] = $oneGoods; 605 $arr[$key] = $oneGoods;
605 } 606 }
@@ -629,7 +630,7 @@ class Helpers @@ -629,7 +630,7 @@ class Helpers
629 $oneGoods['id'] = $single['product_skn']; 630 $oneGoods['id'] = $single['product_skn'];
630 $oneGoods['name'] = $single['product_name']; 631 $oneGoods['name'] = $single['product_name'];
631 $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : ''; 632 $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : '';
632 - $oneGoods['price'] = self::transPrice($single['last_price']); 633 + $oneGoods['price'] = self::transPrice($single['sales_price']);
633 $oneGoods['marketPrice'] = self::transPrice($single['market_price']); 634 $oneGoods['marketPrice'] = self::transPrice($single['market_price']);
634 $oneGoods['count'] = $single['storage_number']; 635 $oneGoods['count'] = $single['storage_number'];
635 636
@@ -56,6 +56,10 @@ if ($('.cart-nav').length > 0) { @@ -56,6 +56,10 @@ if ($('.cart-nav').length > 0) {
56 }, 3000); 56 }, 3000);
57 } 57 }
58 58
  59 +$('.advance-buy').on('touchend', function() {
  60 + window.location.href = '/cart/index/advanceBuy?cartType=' + cartType;
  61 +});
  62 +
59 $('.btn-balance').on('touchend', function() { 63 $('.btn-balance').on('touchend', function() {
60 if (hasChecked) { 64 if (hasChecked) {
61 window.location.href = '/cart/index/orderEnsure?cartType=' + cartType; 65 window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
@@ -17,9 +17,6 @@ var $chosePanel = $('#chose-panel'), @@ -17,9 +17,6 @@ var $chosePanel = $('#chose-panel'),
17 $num, 17 $num,
18 $chosed, 18 $chosed,
19 $imgsThumb, 19 $imgsThumb,
20 -  
21 - // re = /\d+/,  
22 -  
23 $leftNum, 20 $leftNum,
24 leftNum, 21 leftNum,
25 confirming, 22 confirming,
@@ -31,6 +28,7 @@ var $chosePanel = $('#chose-panel'), @@ -31,6 +28,7 @@ var $chosePanel = $('#chose-panel'),
31 $curSizeBlock, 28 $curSizeBlock,
32 $sizeRowList, 29 $sizeRowList,
33 cbFn, 30 cbFn,
  31 + cartType,
34 $allChoseItems, 32 $allChoseItems,
35 $yohoPage = $('.yoho-page'); 33 $yohoPage = $('.yoho-page');
36 34
@@ -41,10 +39,10 @@ function init() { @@ -41,10 +39,10 @@ function init() {
41 hasChooseColor = false; 39 hasChooseColor = false;
42 hasChooseSize = false; 40 hasChooseSize = false;
43 $curSizeBlock = null; 41 $curSizeBlock = null;
44 - $imgsThumb = $('.chose-panel').find('.thumb'),  
45 - $allChoseItems = $('.chose-items'),  
46 - $sizeRowList = $('.size-list ul'),  
47 - $leftNum = $('#left-num'), 42 + $imgsThumb = $('.chose-panel').find('.thumb');
  43 + $allChoseItems = $('.chose-items');
  44 + $sizeRowList = $('.size-list ul');
  45 + $leftNum = $('#left-num');
48 $firstRow = $sizeRowList.eq(0); 46 $firstRow = $sizeRowList.eq(0);
49 $firstRow.toggleClass('hide'); 47 $firstRow.toggleClass('hide');
50 $curSizeRow = $firstRow; 48 $curSizeRow = $firstRow;
@@ -77,7 +75,6 @@ function show(html, cb) { @@ -77,7 +75,6 @@ function show(html, cb) {
77 //隐藏当前Panel 75 //隐藏当前Panel
78 function hide() { 76 function hide() {
79 $('.chose-panel').hide(); 77 $('.chose-panel').hide();
80 - cbFn = null;  
81 } 78 }
82 79
83 //修改加入购物车的文字和背景 80 //修改加入购物车的文字和背景
@@ -168,7 +165,6 @@ $yohoPage.on('touchstart', '.color-list .block', function(e) { @@ -168,7 +165,6 @@ $yohoPage.on('touchstart', '.color-list .block', function(e) {
168 // 之前选中的尺码去掉勾选样式 165 // 之前选中的尺码去掉勾选样式
169 if ($preSiblingBlock.length > 0) { 166 if ($preSiblingBlock.length > 0) {
170 $preSiblingBlock.removeClass('chosed'); 167 $preSiblingBlock.removeClass('chosed');
171 -  
172 } 168 }
173 169
174 curSizeBlock = $curSizeRow.children().get(scindex); 170 curSizeBlock = $curSizeRow.children().get(scindex);
@@ -328,7 +324,8 @@ $yohoPage.on('touchstart', '.btn-minus', function() { @@ -328,7 +324,8 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
328 productSku: productSku, 324 productSku: productSku,
329 buyNumber: buyNumber, 325 buyNumber: buyNumber,
330 promotionId: promotionId, 326 promotionId: promotionId,
331 - isEdit: isEdit 327 + isEdit: isEdit,
  328 + cartType: cartType
332 } 329 }
333 }).done(function(res) { 330 }).done(function(res) {
334 loading.hideLoadingMask(); 331 loading.hideLoadingMask();
@@ -338,7 +335,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { @@ -338,7 +335,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
338 hide(); 335 hide();
339 336
340 if (cbFn) { 337 if (cbFn) {
341 - cbFn(res.location); 338 + cbFn();
342 } 339 }
343 } 340 }
344 if (res.message) { 341 if (res.message) {
@@ -10,7 +10,8 @@ var $ = require('jquery'), @@ -10,7 +10,8 @@ var $ = require('jquery'),
10 loading = require('../plugin/loading'), 10 loading = require('../plugin/loading'),
11 chosePanel = require('./chose-panel'); 11 chosePanel = require('./chose-panel');
12 12
13 -var $page = $('.gift-advance-page'); 13 +var $page = $('.gift-advance-page'),
  14 + queryString = $.queryString();
14 15
15 lazyLoad($('.lazy')); 16 lazyLoad($('.lazy'));
16 17
@@ -24,7 +25,9 @@ function getProductInfo(skn, promotionId) { @@ -24,7 +25,9 @@ function getProductInfo(skn, promotionId) {
24 tip.show('网络错误'); 25 tip.show('网络错误');
25 return; 26 return;
26 } 27 }
27 - chosePanel.show(html); 28 + chosePanel.show(html, function() {
  29 + window.location.href = '/cart/index/orderEnsure?cartType=' + queryString.cartType;
  30 + });
28 }, function() { 31 }, function() {
29 tip.show('网络错误'); 32 tip.show('网络错误');
30 }).always(function() { 33 }).always(function() {
@@ -142,8 +142,8 @@ function submitOrder() { @@ -142,8 +142,8 @@ function submitOrder() {
142 cartType: queryString.cartType || queryString.carttype || 'ordinary', 142 cartType: queryString.cartType || queryString.carttype || 'ordinary',
143 deliveryId: orderInfo('deliveryId'), 143 deliveryId: orderInfo('deliveryId'),
144 deliveryTimeId: orderInfo('deliveryTimeId'), 144 deliveryTimeId: orderInfo('deliveryTimeId'),
145 - invoiceText: invoiceText,  
146 - invoiceType: $invoice.find('.invoice-type').val() || orderInfo('invoiceType'), 145 + invoiceText: orderInfo('invoice') ? invoiceText : null,
  146 + invoiceType: orderInfo('invoice') ? ($invoice.find('.invoice-type').val() || orderInfo('invoiceType')) : null,
147 msg: msg, 147 msg: msg,
148 paymentTypeId: orderInfo('paymentTypeId'), 148 paymentTypeId: orderInfo('paymentTypeId'),
149 paymentType: orderInfo('paymentType'), //支付方式 149 paymentType: orderInfo('paymentType'), //支付方式
@@ -20,7 +20,15 @@ var api = require('../api'), @@ -20,7 +20,15 @@ var api = require('../api'),
20 var trim = $.trim; 20 var trim = $.trim;
21 var showErrTip = tip.show; 21 var showErrTip = tip.show;
22 22
  23 +var requesting = false;
  24 +
23 function nextStep(url, mobileNo, areaCode) { 25 function nextStep(url, mobileNo, areaCode) {
  26 + if (requesting) {
  27 + return false;
  28 + }
  29 +
  30 + requesting = true;
  31 +
24 $.ajax({ 32 $.ajax({
25 type: 'POST', 33 type: 'POST',
26 url: '/passport/bind/sendBindMsg', 34 url: '/passport/bind/sendBindMsg',
@@ -31,9 +39,13 @@ function nextStep(url, mobileNo, areaCode) { @@ -31,9 +39,13 @@ function nextStep(url, mobileNo, areaCode) {
31 success: function(res) { 39 success: function(res) {
32 console.log(res.data); 40 console.log(res.data);
33 location.href = url; 41 location.href = url;
  42 +
  43 + requesting = false;
34 }, 44 },
35 error: function() { 45 error: function() {
36 tip.show('出错了,请重试!'); 46 tip.show('出错了,请重试!');
  47 +
  48 + requesting = false;
37 } 49 }
38 }); 50 });
39 } 51 }
@@ -65,7 +65,7 @@ if (navtabHammer) { @@ -65,7 +65,7 @@ if (navtabHammer) {
65 65
66 if (gotoConsultHammer) { 66 if (gotoConsultHammer) {
67 gotoConsultHammer.on('tap', function() { 67 gotoConsultHammer.on('tap', function() {
68 - location.href = $(gotoConsultEle).data('href'); 68 + location.href = $(gotoConsultEle).find('a').attr('href');
69 }); 69 });
70 } 70 }
71 71
@@ -40,7 +40,6 @@ @@ -40,7 +40,6 @@
40 .thumb { 40 .thumb {
41 float: left; 41 float: left;
42 width: 80rem / $pxConvertRem; 42 width: 80rem / $pxConvertRem;
43 - height: 106rem / $pxConvertRem;  
44 } 43 }
45 44
46 .text-info { 45 .text-info {
@@ -119,6 +119,7 @@ @@ -119,6 +119,7 @@
119 119
120 <ul class="pay-mode"> 120 <ul class="pay-mode">
121 {{# paymentWay}} 121 {{# paymentWay}}
  122 + {{#if isSupport}}
122 <li class="{{#if recommend}}default{{/if}}" data-pay-type="{{paymentType}}" data-pay-id="{{id}}"> 123 <li class="{{#if recommend}}default{{/if}}" data-pay-type="{{paymentType}}" data-pay-id="{{id}}">
123 <span class="iconfont"> 124 <span class="iconfont">
124 {{#if recommend}} 125 {{#if recommend}}
@@ -129,6 +130,7 @@ @@ -129,6 +130,7 @@
129 </span> 130 </span>
130 {{name}} 131 {{name}}
131 </li> 132 </li>
  133 + {{/if}}
132 {{/ paymentWay}} 134 {{/ paymentWay}}
133 </ul> 135 </ul>
134 {{/ orderEnsure}} 136 {{/ orderEnsure}}
@@ -93,9 +93,9 @@ @@ -93,9 +93,9 @@
93 {{#if consultsNum}} 93 {{#if consultsNum}}
94 {{> product/feedback-tab}} 94 {{> product/feedback-tab}}
95 {{else}} 95 {{else}}
96 - <div class="nodata tap-hightlight"> 96 + <div class="nodata tap-hightlight" id="goto-consult">
97 <span>暂无商品评价和咨询</span> 97 <span>暂无商品评价和咨询</span>
98 - <a href="{{link}}" class="go-consult">我要咨询<span class="iconfont">&#xe604;</span></a> 98 + <a href="{{consultsUrl}}" class="go-consult">我要咨询<span class="iconfont">&#xe604;</span></a>
99 </div> 99 </div>
100 {{/if}} 100 {{/if}}
101 {{/if}} 101 {{/if}}
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 <li class="advance-buy"> 25 <li class="advance-buy">
26 <span class="iconfont">&#xe61b;</span> 26 <span class="iconfont">&#xe61b;</span>
27 加价购 27 加价购
28 - <a href="/cart/index/advanceBuy"> 28 + <a href="">
29 <span class="count">{{advanceBuyCount}}</span> 29 <span class="count">{{advanceBuyCount}}</span>
30 <span class="iconfont icon-right-arrow">&#xe614;</span> 30 <span class="iconfont icon-right-arrow">&#xe614;</span>
31 </a> 31 </a>
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 37
38 <ul class="size-row clearfix hide"> 38 <ul class="size-row clearfix hide">
39 {{# size}} 39 {{# size}}
40 - <li class="block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}" data-id={{id}} data-colorid="{{colorId}}" data-num="{{sizeNum}}" data-numstr="{{colorNumStr}}" data-skuid="{{skuId}}" data-goodid="{{goodsId}}"> 40 + <li class="block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}" data-id="{{id}}" data-colorid="{{colorId}}" data-num="{{sizeNum}}" data-numstr="{{colorNumStr}}" data-skuid="{{skuId}}" data-goodid="{{goodsId}}">
41 {{name}} 41 {{name}}
42 </li> 42 </li>
43 {{/ size}} 43 {{/ size}}
@@ -4,11 +4,13 @@ @@ -4,11 +4,13 @@
4 {{/if}} 4 {{/if}}
5 5
6 {{#if showCheckbox}} 6 {{#if showCheckbox}}
7 - <span class="checkbox{{#if checked}} icon-cb-checked{{^}} icon-checkbox{{/if}}iconfont"></span> 7 + <span class="checkbox{{#if checked}} icon-cb-checked{{^}} icon-checkbox{{/if}} iconfont"></span>
8 {{/if}} 8 {{/if}}
9 9
10 <div class="info"> 10 <div class="info">
11 - <img class="thumb lazy" data-original="{{thumb}}"> 11 + <a href="{{link}}">
  12 + <img class="thumb lazy" data-original="{{thumb}}">
  13 + </a>
12 {{#if isAdvanceBuy}} 14 {{#if isAdvanceBuy}}
13 <p class="few-tag plus-tag">加价购</p> 15 <p class="few-tag plus-tag">加价购</p>
14 {{/if}} 16 {{/if}}
@@ -17,7 +19,7 @@ @@ -17,7 +19,7 @@
17 {{/if}} 19 {{/if}}
18 20
19 <div class="deps show"> 21 <div class="deps show">
20 - <p class="name row">{{name}}</p> 22 + <a href="{{link}}" class="name row">{{name}}</a>
21 <span class="count"> 23 <span class="count">
22 ×{{count}} 24 ×{{count}}
23 </span> 25 </span>
@@ -424,6 +424,13 @@ class CartModel @@ -424,6 +424,13 @@ class CartModel
424 $oneGoods['price'] = Helpers::transPrice($single['sales_price']); 424 $oneGoods['price'] = Helpers::transPrice($single['sales_price']);
425 $oneGoods['count'] = $single['buy_number']; 425 $oneGoods['count'] = $single['buy_number'];
426 426
  427 + //gift=>是否赠品,advanceBuy=>是否加价购;
  428 + if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {
  429 + $oneGoods['isGift'] = true;
  430 + } elseif ($single['goods_type'] == 'price_gift') {
  431 + $oneGoods['isAdvanceBuy'] = true;
  432 + }
  433 +
427 $result['goods'][] = $oneGoods; 434 $result['goods'][] = $oneGoods;
428 } 435 }
429 } 436 }
@@ -436,6 +443,7 @@ class CartModel @@ -436,6 +443,7 @@ class CartModel
436 $onePay['id'] = $pay['payment_id']; 443 $onePay['id'] = $pay['payment_id'];
437 $onePay['paymentType'] = $pay['payment_type']; 444 $onePay['paymentType'] = $pay['payment_type'];
438 $onePay['name'] = $pay['payment_type_name']; 445 $onePay['name'] = $pay['payment_type_name'];
  446 + $onePay['isSupport'] = $pay['is_support'] === 'Y';
439 // $onePay['default'] = ($pay['default'] === 'Y'); 447 // $onePay['default'] = ($pay['default'] === 'Y');
440 if ($onePay['paymentType'] == 1) { 448 if ($onePay['paymentType'] == 1) {
441 $onePay['recommend'] = true; 449 $onePay['recommend'] = true;
@@ -453,24 +461,6 @@ class CartModel @@ -453,24 +461,6 @@ class CartModel
453 $result['cartPayData'] = isset($orderCompute['promotion_formula_list']) ? $orderCompute['promotion_formula_list'] : $payReturn['shopping_cart_data']['promotion_formula_list']; 461 $result['cartPayData'] = isset($orderCompute['promotion_formula_list']) ? $orderCompute['promotion_formula_list'] : $payReturn['shopping_cart_data']['promotion_formula_list'];
454 $price = isset($orderCompute['last_order_amount']) ? $orderCompute['last_order_amount'] : $payReturn['shopping_cart_data']['last_order_amount']; 462 $price = isset($orderCompute['last_order_amount']) ? $orderCompute['last_order_amount'] : $payReturn['shopping_cart_data']['last_order_amount'];
455 $result['price'] = Helpers::transPrice($price); 463 $result['price'] = Helpers::transPrice($price);
456 -  
457 - /*$sumPrice = isset($orderCompute['order_amount']) ? $orderCompute['order_amount'] : $payReturn['shopping_cart_data']['order_amount'];  
458 -  
459 - $freight = '¥0';  
460 - if (isset($orderCompute['promotion_formula_list'][1]['promotion_amount'])) {  
461 - $freight = $orderCompute['promotion_formula_list'][1]['promotion_amount'];  
462 - } elseif(isset($payReturn['shopping_cart_data']['promotion_formula_list'][1]['promotion_amount'])) {  
463 - $freight = $payReturn['shopping_cart_data']['promotion_formula_list'][1]['promotion_amount'];  
464 - }  
465 -  
466 - $couponPrice = isset($orderCompute['coupon_amount']) ? $orderCompute['coupon_amount'] : false;  
467 - $salePrice = isset($orderCompute['discount_amount']) ? $orderCompute['discount_amount'] : $payReturn['shopping_cart_data']['discount_amount'];  
468 - $price = isset($orderCompute['last_order_amount']) ? $orderCompute['last_order_amount'] : $payReturn['shopping_cart_data']['last_order_amount'];  
469 - $result['sumPrice'] = Helpers::transPrice($sumPrice);  
470 - $result['salePrice'] = Helpers::transPrice($salePrice);  
471 - $result['price'] = Helpers::transPrice($price);  
472 - $result['freight'] = $freight;  
473 - $result['couponPrice'] = $couponPrice;*/  
474 } 464 }
475 465
476 // 发票有关数据 466 // 发票有关数据
@@ -316,7 +316,7 @@ class UserModel @@ -316,7 +316,7 @@ class UserModel
316 } else { 316 } else {
317 $data = $records['data']['product_list']; 317 $data = $records['data']['product_list'];
318 foreach ($data as &$val) { 318 foreach ($data as &$val) {
319 - $val['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : ''; 319 + $val['link'] = Helpers::url('/product/show_' . $val['product_skn'] . '.html');
320 $val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : ''; 320 $val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';
321 $val['sales_price'] = Helpers::transPrice($val['sales_price']); 321 $val['sales_price'] = Helpers::transPrice($val['sales_price']);
322 $val['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? $val['market_price'] . '.00' : false; 322 $val['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? $val['market_price'] . '.00' : false;
@@ -149,7 +149,7 @@ class IndexController extends AbstractAction @@ -149,7 +149,7 @@ class IndexController extends AbstractAction
149 $shoppingKey = Helpers::getShoppingKeyByCookie(); 149 $shoppingKey = Helpers::getShoppingKeyByCookie();
150 $uid = $this->getUid(true); 150 $uid = $this->getUid(true);
151 $cartType = $this->get('cartType', 'ordinary'); 151 $cartType = $this->get('cartType', 'ordinary');
152 - $data = array('giftPage' => true); 152 + $data = array('giftPage' => true, 'cartType' => $cartType);
153 $data += CartModel::getCartData($uid, $shoppingKey, $cartType, true); 153 $data += CartModel::getCartData($uid, $shoppingKey, $cartType, true);
154 154
155 // 渲染模板 155 // 渲染模板
@@ -167,7 +167,7 @@ class IndexController extends AbstractAction @@ -167,7 +167,7 @@ class IndexController extends AbstractAction
167 $shoppingKey = Helpers::getShoppingKeyByCookie(); 167 $shoppingKey = Helpers::getShoppingKeyByCookie();
168 $uid = $this->getUid(true); 168 $uid = $this->getUid(true);
169 $cartType = $this->get('cartType', 'ordinary'); 169 $cartType = $this->get('cartType', 'ordinary');
170 - $data = array('advanceBuyPage' => true); 170 + $data = array('advanceBuyPage' => true, 'cartType' => $cartType);
171 $data += CartModel::getCartData($uid, $shoppingKey, $cartType, false, true); 171 $data += CartModel::getCartData($uid, $shoppingKey, $cartType, false, true);
172 172
173 // 渲染模板 173 // 渲染模板