Authored by biao

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

@@ -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
No preview for this file type
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3 <svg xmlns="http://www.w3.org/2000/svg"> 3 <svg xmlns="http://www.w3.org/2000/svg">
4 <metadata> 4 <metadata>
5 -Created by FontForge 20120731 at Sat Dec 5 16:26:44 2015 5 +Created by FontForge 20120731 at Thu Dec 17 13:53:30 2015
6 By Ads 6 By Ads
7 </metadata> 7 </metadata>
8 <defs> 8 <defs>
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Sat Dec 5 16:26:44 2015 @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Sat Dec 5 16:26:44 2015
19 bbox="-0.75 -224 3943 833" 19 bbox="-0.75 -224 3943 833"
20 underline-thickness="50" 20 underline-thickness="50"
21 underline-position="-100" 21 underline-position="-100"
22 - unicode-range="U+0078-E63F" 22 + unicode-range="U+0078-E640"
23 /> 23 />
24 <missing-glyph horiz-adv-x="374" 24 <missing-glyph horiz-adv-x="374"
25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> 25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
@@ -257,5 +257,11 @@ d="M512 -66q-10 0 -24.5 -0.5t-25 -1t-24 0t-24.5 1.5l-222 -146q0 227 5 243q-164 1 @@ -257,5 +257,11 @@ d="M512 -66q-10 0 -24.5 -0.5t-25 -1t-24 0t-24.5 1.5l-222 -146q0 227 5 243q-164 1
257 q-91 0 -176.5 -31.5t-148.5 -83.5t-100.5 -124.5t-37.5 -150.5q0 -95 53 -179t142 -138v-170l146 97q16 -3 35.5 -4t49 0t37.5 1q41 0 81 6.5t77 18.5t72 29.5t65 39.5t56.5 47.5t47 55t35 61t22 66t7.5 69.5q0 104 -63.5 194.5t-170.5 143t-229 52.5zM768 300 257 q-91 0 -176.5 -31.5t-148.5 -83.5t-100.5 -124.5t-37.5 -150.5q0 -95 53 -179t142 -138v-170l146 97q16 -3 35.5 -4t49 0t37.5 1q41 0 81 6.5t77 18.5t72 29.5t65 39.5t56.5 47.5t47 55t35 61t22 66t7.5 69.5q0 104 -63.5 194.5t-170.5 143t-229 52.5zM768 300
258 q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM512 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM256 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5 258 q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM512 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM256 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5
259 t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5z" /> 259 t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5z" />
  260 + <glyph glyph-name="uniE640" unicode="&#xe640;"
  261 +d="M957 510q-5 8 -14 13.5t-24 5.5h-598l-29 62l-4 7q-1 3 -4 7t-8 8q-4 3 -7 6l-2 1l-8 4h-2q-5 2 -9 2l-4 1h-5h-118q-23 0 -40 -16.5t-17 -40.5q0 -6 1.5 -12.5t4.5 -12.5t7 -10.5t8.5 -8.5t10.5 -7t12.5 -4.5t12.5 -1.5h81l33 -71q3 -10 8 -21t8 -17l3 -5l81 -181
  262 +q0 -2 2 -5l15 -32q9 -30 39 -38v-3h392l18 1v2q14 4 24.5 14t14.5 24l98 217q40 77 19 112zM909 413l-93 -207l-3 1l-4 -15q-5 -19 -25 -19l-19 1v-1h-340h-18q-8 0 -15 5t-9 14l-4 15l-3 -1l-93 208q-1 1 -3.5 5.5t-7 14.5t-7.5 20l-42 92h-102q-10 0 -17 7t-7 17
  263 +q0 7 3 12.5t9 9t12 3.5h119l3 -1h2q1 0 2 -1l4 -2q2 -1 4 -3q1 -1 2 -1.5t1 -1.5l4 -6l38 -83h619q8 0 10 -3q3 -6 1 -19t-7.5 -29.5t-13.5 -31.5zM470 107q-33 0 -56.5 -23t-23.5 -56q0 -22 10.5 -40.5t29 -29t40.5 -10.5q33 0 56.5 23.5t23.5 56.5t-23.5 56t-56.5 23z
  264 +M470 -23q-21 0 -36 15t-15 36t15 36t36 15q14 0 25.5 -7t18.5 -19t7 -25q0 -22 -15 -36.5t-36 -14.5zM747 107q-33 0 -56.5 -23t-23.5 -56q0 -22 10.5 -40.5t29 -29t40.5 -10.5q33 0 56.5 23.5t23.5 56.5t-23.5 56t-56.5 23zM747 -23q-14 0 -26 6.5t-18.5 18.5t-6.5 25.5
  265 +t6.5 25.5t18.5 19t26 7q21 0 36 -15t15 -36t-15 -36t-36 -15z" />
260 </font> 266 </font>
261 </defs></svg> 267 </defs></svg>
No preview for this file type
No preview for this file type
@@ -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,
@@ -32,6 +29,7 @@ var $chosePanel = $('#chose-panel'), @@ -32,6 +29,7 @@ var $chosePanel = $('#chose-panel'),
32 $sizeRowList, 29 $sizeRowList,
33 cbFn, 30 cbFn,
34 $allChoseItems, 31 $allChoseItems,
  32 + queryString,
35 $yohoPage = $('.yoho-page'); 33 $yohoPage = $('.yoho-page');
36 34
37 //初始化购物车面板显示 35 //初始化购物车面板显示
@@ -41,10 +39,11 @@ function init() { @@ -41,10 +39,11 @@ 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 + queryString = $.queryString();
  43 + $imgsThumb = $('.chose-panel').find('.thumb');
  44 + $allChoseItems = $('.chose-items');
  45 + $sizeRowList = $('.size-list ul');
  46 + $leftNum = $('#left-num');
48 $firstRow = $sizeRowList.eq(0); 47 $firstRow = $sizeRowList.eq(0);
49 $firstRow.toggleClass('hide'); 48 $firstRow.toggleClass('hide');
50 $curSizeRow = $firstRow; 49 $curSizeRow = $firstRow;
@@ -77,7 +76,6 @@ function show(html, cb) { @@ -77,7 +76,6 @@ function show(html, cb) {
77 //隐藏当前Panel 76 //隐藏当前Panel
78 function hide() { 77 function hide() {
79 $('.chose-panel').hide(); 78 $('.chose-panel').hide();
80 - cbFn = null;  
81 } 79 }
82 80
83 //修改加入购物车的文字和背景 81 //修改加入购物车的文字和背景
@@ -168,11 +166,9 @@ $yohoPage.on('touchstart', '.color-list .block', function(e) { @@ -168,11 +166,9 @@ $yohoPage.on('touchstart', '.color-list .block', function(e) {
168 // 之前选中的尺码去掉勾选样式 166 // 之前选中的尺码去掉勾选样式
169 if ($preSiblingBlock.length > 0) { 167 if ($preSiblingBlock.length > 0) {
170 $preSiblingBlock.removeClass('chosed'); 168 $preSiblingBlock.removeClass('chosed');
171 - 169 + curSizeBlock = $curSizeRow.children().get(scindex);
172 } 170 }
173 171
174 - curSizeBlock = $curSizeRow.children().get(scindex);  
175 -  
176 // 当前选中颜色对应的尺码行,其对应的尺码加上勾选样式 (前提是要判断下这个尺码是否存在) 172 // 当前选中颜色对应的尺码行,其对应的尺码加上勾选样式 (前提是要判断下这个尺码是否存在)
177 if (curSizeBlock) { 173 if (curSizeBlock) {
178 curGoodNum = $(curSizeBlock).data('num'); 174 curGoodNum = $(curSizeBlock).data('num');
@@ -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: queryString.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/index?cartType=' + queryString.cartType;
  30 + });
28 }, function() { 31 }, function() {
29 tip.show('网络错误'); 32 tip.show('网络错误');
30 }).always(function() { 33 }).always(function() {
@@ -108,7 +108,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { @@ -108,7 +108,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
108 fast: true 108 fast: true
109 }); 109 });
110 orderInfo('couponCode', null); 110 orderInfo('couponCode', null);
111 - orderInfo('couponValue', null); 111 + orderInfo('couponName', null);
112 history.go(0); 112 history.go(0);
113 } else { 113 } else {
114 tip.show(data.message); 114 tip.show(data.message);
@@ -28,11 +28,13 @@ if (window.getUid() !== orderInfo('uid')) { @@ -28,11 +28,13 @@ if (window.getUid() !== orderInfo('uid')) {
28 order.init(); 28 order.init();
29 } 29 }
30 30
31 -if ($couponUse.data('value') !== orderInfo('couponValue')) { 31 +if ($couponUse.data('name') !== orderInfo('couponName')) {
32 orderInfo('couponCode', null); 32 orderInfo('couponCode', null);
33 - orderInfo('couponValue', null); 33 + orderInfo('couponName', null);
34 } 34 }
35 35
  36 +orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary');
  37 +
36 function dispacthTapEvt(e) { 38 function dispacthTapEvt(e) {
37 var $cur = $(e.target).closest('li'); 39 var $cur = $(e.target).closest('li');
38 40
@@ -78,7 +80,7 @@ function orderCompute() { @@ -78,7 +80,7 @@ function orderCompute() {
78 method: 'POST', 80 method: 'POST',
79 url: '/cart/index/orderCompute', 81 url: '/cart/index/orderCompute',
80 data: { 82 data: {
81 - cartType: queryString.cartType || queryString.carttype || 'ordinary', 83 + cartType: orderInfo('cartType') || 'ordinary',
82 deliveryId: orderInfo('deliveryId'), 84 deliveryId: orderInfo('deliveryId'),
83 paymentTypeId: orderInfo('paymentTypeId'), 85 paymentTypeId: orderInfo('paymentTypeId'),
84 couponCode: orderInfo('couponCode'), 86 couponCode: orderInfo('couponCode'),
@@ -139,11 +141,12 @@ function submitOrder() { @@ -139,11 +141,12 @@ function submitOrder() {
139 url: '/cart/index/orderSub', 141 url: '/cart/index/orderSub',
140 data: { 142 data: {
141 addressId: orderInfo('addressId'), 143 addressId: orderInfo('addressId'),
142 - cartType: queryString.cartType || queryString.carttype || 'ordinary', 144 + cartType: orderInfo('cartType') || 'ordinary',
143 deliveryId: orderInfo('deliveryId'), 145 deliveryId: orderInfo('deliveryId'),
144 deliveryTimeId: orderInfo('deliveryTimeId'), 146 deliveryTimeId: orderInfo('deliveryTimeId'),
145 - invoiceText: invoiceText,  
146 - invoiceType: $invoice.find('.invoice-type').val() || orderInfo('invoiceType'), 147 + invoiceText: orderInfo('invoice') ? invoiceText : null,
  148 + invoiceType: orderInfo('invoice') ? ($invoice.find('.invoice-type').val() ||
  149 + orderInfo('invoiceType')) : null,
147 msg: msg, 150 msg: msg,
148 paymentTypeId: orderInfo('paymentTypeId'), 151 paymentTypeId: orderInfo('paymentTypeId'),
149 paymentType: orderInfo('paymentType'), //支付方式 152 paymentType: orderInfo('paymentType'), //支付方式
@@ -15,11 +15,12 @@ function init() { @@ -15,11 +15,12 @@ function init() {
15 yohoCoin: $('.coin').data('yoho-coin') || 0, 15 yohoCoin: $('.coin').data('yoho-coin') || 0,
16 addressId: null, 16 addressId: null,
17 couponCode: null, 17 couponCode: null,
18 - couponValue: null, 18 + couponName: null,
19 invoice: null, 19 invoice: null,
20 invoiceText: null, 20 invoiceText: null,
21 invoiceType: null, 21 invoiceType: null,
22 - msg: null 22 + msg: null,
  23 + cartType: 'ordinary'
23 }; 24 };
24 window.setCookie('order-info', JSON.stringify(info)); 25 window.setCookie('order-info', JSON.stringify(info));
25 } 26 }
@@ -37,7 +37,7 @@ $newCoupon.on('submit', function() { @@ -37,7 +37,7 @@ $newCoupon.on('submit', function() {
37 if (res.code === 200) { 37 if (res.code === 200) {
38 tip.show('优惠券可用'); 38 tip.show('优惠券可用');
39 orderInfo('couponCode', res.data.coupon_code); 39 orderInfo('couponCode', res.data.coupon_code);
40 - orderInfo('couponValue', res.data.coupon_value); 40 + orderInfo('couponName', res.data.coupon_title);
41 window.location.href = '/cart/index/orderEnsure'; 41 window.location.href = '/cart/index/orderEnsure';
42 } else { 42 } else {
43 tip.show(res.message || '网络错误'); 43 tip.show(res.message || '网络错误');
@@ -52,12 +52,12 @@ $('#coupon-list').on('touchend', '.employ-main', function() { @@ -52,12 +52,12 @@ $('#coupon-list').on('touchend', '.employ-main', function() {
52 var $this = $(this); 52 var $this = $(this);
53 53
54 orderInfo('couponCode', $this.data('coupon-code')); 54 orderInfo('couponCode', $this.data('coupon-code'));
55 - orderInfo('couponValue', $this.data('coupon-value')); 55 + orderInfo('couponName', $this.data('coupon-name'));
56 }); 56 });
57 57
58 $('body').on('touchend', '.not-use', function() { 58 $('body').on('touchend', '.not-use', function() {
59 orderInfo('couponCode', null); 59 orderInfo('couponCode', null);
60 - orderInfo('couponValue', null); 60 + orderInfo('couponName', null);
61 }); 61 });
62 62
63 63
@@ -118,14 +118,14 @@ @@ -118,14 +118,14 @@
118 margin-left: 20rem / $pxConvertRem; 118 margin-left: 20rem / $pxConvertRem;
119 } 119 }
120 120
121 - .coupon-use,  
122 - .coin-check { 121 + .coupon-use {
123 float: right; 122 float: right;
124 color: #999; 123 color: #999;
125 -  
126 - &.used {  
127 - color: #f00;  
128 - } 124 + text-align: right;
  125 + width: 360rem / $pxConvertRem;
  126 + white-space: nowrap;
  127 + text-overflow: ellipsis;
  128 + overflow: hidden;
129 129
130 .iconfont { 130 .iconfont {
131 color: #999; 131 color: #999;
@@ -141,6 +141,10 @@ @@ -141,6 +141,10 @@
141 color: #000; 141 color: #000;
142 } 142 }
143 143
  144 + &.used {
  145 + color: #f00;
  146 + }
  147 +
144 em { 148 em {
145 color: #f00; 149 color: #f00;
146 } 150 }
@@ -161,11 +161,18 @@ @@ -161,11 +161,18 @@
161 color: #fff; 161 color: #fff;
162 text-align: center; 162 text-align: center;
163 font-size: 12px; 163 font-size: 12px;
  164 +
  165 + &:before {
  166 + display: block;
  167 + line-height: 1;
  168 + @include transform(scale(0.833));
  169 + }
164 } 170 }
165 171
166 .gift-tag { 172 .gift-tag {
167 height: 25rem / $pxConvertRem; 173 height: 25rem / $pxConvertRem;
168 background: #a1ce4e; 174 background: #a1ce4e;
  175 +
169 &:before { 176 &:before {
170 content: '赠品'; 177 content: '赠品';
171 } 178 }
@@ -174,6 +181,7 @@ @@ -174,6 +181,7 @@
174 .advance-buy-tag { 181 .advance-buy-tag {
175 height: 25rem / $pxConvertRem; 182 height: 25rem / $pxConvertRem;
176 background: #eb76aa; 183 background: #eb76aa;
  184 +
177 &:before { 185 &:before {
178 content: '加价购'; 186 content: '加价购';
179 } 187 }
@@ -228,4 +236,4 @@ @@ -228,4 +236,4 @@
228 .appear-date { 236 .appear-date {
229 color: #f00; 237 color: #f00;
230 } 238 }
231 -}  
  239 +}
@@ -49,9 +49,9 @@ @@ -49,9 +49,9 @@
49 {{count}}张可用 49 {{count}}张可用
50 </span> 50 </span>
51 51
52 - {{#if value}}  
53 - <span class="used coupon-use" data-value="{{value}}">  
54 - {{value}} 52 + {{#if couponName}}
  53 + <span class="used coupon-use" data-name="{{couponName}}">
  54 + {{couponName}}
55 <i class="iconfont">&#xe614;</i> 55 <i class="iconfont">&#xe614;</i>
56 </span> 56 </span>
57 {{^}} 57 {{^}}
@@ -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}}
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <script id="tmpl-coupon" type="text/tmpl"> 13 <script id="tmpl-coupon" type="text/tmpl">
14 \{{#coupons}} 14 \{{#coupons}}
15 \{{^ notAvailable}} 15 \{{^ notAvailable}}
16 - <a class="employ-main" data-coupon-code="\{{ couponCode}}" data-coupon-value="\{{ couponValue}}" href="/cart/index/orderEnsure"> 16 + <a class="employ-main" data-coupon-code="\{{ couponCode}}" data-coupon-name="\{{ couponDetailInfomation}}" href="/cart/index/orderEnsure">
17 <span>\{{ couponValue}}</span> 17 <span>\{{ couponValue}}</span>
18 <p class="coupon-name">\{{ couponDetailInfomation}}</p> 18 <p class="coupon-name">\{{ couponDetailInfomation}}</p>
19 <p>有效期:\{{ couponValidity}}</p> 19 <p>有效期:\{{ couponValidity}}</p>
@@ -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['gift'] = true;
  430 + } elseif ($single['goods_type'] == 'price_gift') {
  431 + $oneGoods['advanceBuy'] = 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 // 发票有关数据
@@ -498,7 +488,7 @@ class CartModel @@ -498,7 +488,7 @@ class CartModel
498 488
499 // 优惠券数据 489 // 优惠券数据
500 $coupons = array(); 490 $coupons = array();
501 - !empty($orderCompute['coupon_amount']) && $coupons['value'] = $orderInfo['couponValue']; 491 + !empty($orderCompute['coupon_amount']) && $coupons['couponName'] = $orderInfo['couponName'];
502 $coupons += self::getCouponList($uid, true); 492 $coupons += self::getCouponList($uid, true);
503 $result['coupon'] = $coupons; 493 $result['coupon'] = $coupons;
504 } 494 }
@@ -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 // 渲染模板
@@ -271,7 +271,7 @@ class IndexController extends AbstractAction @@ -271,7 +271,7 @@ class IndexController extends AbstractAction
271 $this->auditJumpLogin(); 271 $this->auditJumpLogin();
272 272
273 $this->setTitle('确认订单'); 273 $this->setTitle('确认订单');
274 - $this->setNavHeader('确认订单', true, false); // 不显示右上角home按钮 274 + $this->setNavHeader('确认订单', Helpers::url('/cart/index/index'), false); // 不显示右上角home按钮
275 275
276 // 购物车商品为空跳转到购物车页面 276 // 购物车商品为空跳转到购物车页面
277 $shoppingKey = Helpers::getShoppingKeyByCookie(); 277 $shoppingKey = Helpers::getShoppingKeyByCookie();