Authored by 梁志锋

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

@@ -596,12 +596,12 @@ class Helpers @@ -596,12 +596,12 @@ class Helpers
596 } elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) { 596 } elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) {
597 $oneGoods['isGift'] = true; 597 $oneGoods['isGift'] = true;
598 $oneGoods['salesPrice'] = self::transPrice($value['sales_price']); 598 $oneGoods['salesPrice'] = self::transPrice($value['sales_price']);
599 - $oneGoods['price'] = self::transPrice($value['sale_price']); 599 + $oneGoods['price'] = self::transPrice($value['last_price']);
600 } elseif ($value['goods_type'] == 'price_gift') { 600 } elseif ($value['goods_type'] == 'price_gift') {
601 $oneGoods['showCheckbox'] = true; 601 $oneGoods['showCheckbox'] = true;
602 $oneGoods['isAdvanceBuy'] = true; 602 $oneGoods['isAdvanceBuy'] = true;
603 $oneGoods['salesPrice'] = self::transPrice($value['sales_price']); 603 $oneGoods['salesPrice'] = self::transPrice($value['sales_price']);
604 - $oneGoods['price'] = self::transPrice($value['sale_price']); 604 + $oneGoods['price'] = self::transPrice($value['last_price']);
605 } else { 605 } else {
606 $oneGoods['showCheckbox'] = true; 606 $oneGoods['showCheckbox'] = true;
607 } 607 }
@@ -42,6 +42,11 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { @@ -42,6 +42,11 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
42 var goodsList = [], 42 var goodsList = [],
43 goodInfo = {}; 43 goodInfo = {};
44 44
  45 + if (!$this.hasClass('icon-cb-checked') && $this.siblings('.info').find('.low-stocks').length > 0) {
  46 + tip.show('库存不足,无法购买');
  47 + return false;
  48 + }
  49 +
45 goodInfo.goods_type = $('#cartType').val(); 50 goodInfo.goods_type = $('#cartType').val();
46 goodInfo.selected = $this.hasClass('icon-cb-checked') ? 'N' : 'Y'; 51 goodInfo.selected = $this.hasClass('icon-cb-checked') ? 'N' : 'Y';
47 goodInfo.product_sku = id; 52 goodInfo.product_sku = id;
@@ -28,6 +28,7 @@ function nextStep(url, mobileNo, areaCode) { @@ -28,6 +28,7 @@ function nextStep(url, mobileNo, areaCode) {
28 } 28 }
29 29
30 requested = true; 30 requested = true;
  31 + $btnNext.addClass('disable').html('绑定中...');
31 32
32 $.ajax({ 33 $.ajax({
33 type: 'POST', 34 type: 'POST',
@@ -37,11 +38,13 @@ function nextStep(url, mobileNo, areaCode) { @@ -37,11 +38,13 @@ function nextStep(url, mobileNo, areaCode) {
37 areaCode: areaCode.replace('+', '') 38 areaCode: areaCode.replace('+', '')
38 }, 39 },
39 success: function(res) { 40 success: function(res) {
40 - console.log(res.data); 41 +
  42 + // console.log(res.data);
41 location.href = url; 43 location.href = url;
42 }, 44 },
43 error: function() { 45 error: function() {
44 tip.show('出错了,请重试!'); 46 tip.show('出错了,请重试!');
  47 + $btnNext.removeClass('disable').html('下一步');
45 requested = false; 48 requested = false;
46 } 49 }
47 }); 50 });
@@ -86,7 +89,8 @@ $btnNext.on('touchstart', function() { @@ -86,7 +89,8 @@ $btnNext.on('touchstart', function() {
86 nickname: nickname 89 nickname: nickname
87 }, 90 },
88 success: function(res) { 91 success: function(res) {
89 - console.log(res); 92 +
  93 + // console.log(res);
90 94
91 //res : { 95 //res : {
92 // code: 'xxx', 96 // code: 'xxx',
@@ -867,6 +867,7 @@ class HomeController extends AbstractAction @@ -867,6 +867,7 @@ class HomeController extends AbstractAction
867 867
868 $this->_view->display('help', array( 868 $this->_view->display('help', array(
869 'iHelp' => Home\HelpModel::serviceInfo(), 869 'iHelp' => Home\HelpModel::serviceInfo(),
  870 + 'pageFooter' => true
870 )); 871 ));
871 } 872 }
872 873
@@ -886,6 +887,7 @@ class HomeController extends AbstractAction @@ -886,6 +887,7 @@ class HomeController extends AbstractAction
886 887
887 $this->_view->display('help-detail', array( 888 $this->_view->display('help-detail', array(
888 'iHelp' => Home\HelpModel::serviceDetail($code), 889 'iHelp' => Home\HelpModel::serviceDetail($code),
  890 + 'pageFooter' => true
889 )); 891 ));
890 } 892 }
891 893