Authored by 梁志锋

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

... ... @@ -596,12 +596,12 @@ class Helpers
} elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) {
$oneGoods['isGift'] = true;
$oneGoods['salesPrice'] = self::transPrice($value['sales_price']);
$oneGoods['price'] = self::transPrice($value['sale_price']);
$oneGoods['price'] = self::transPrice($value['last_price']);
} elseif ($value['goods_type'] == 'price_gift') {
$oneGoods['showCheckbox'] = true;
$oneGoods['isAdvanceBuy'] = true;
$oneGoods['salesPrice'] = self::transPrice($value['sales_price']);
$oneGoods['price'] = self::transPrice($value['sale_price']);
$oneGoods['price'] = self::transPrice($value['last_price']);
} else {
$oneGoods['showCheckbox'] = true;
}
... ...
... ... @@ -42,6 +42,11 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
var goodsList = [],
goodInfo = {};
if (!$this.hasClass('icon-cb-checked') && $this.siblings('.info').find('.low-stocks').length > 0) {
tip.show('库存不足,无法购买');
return false;
}
goodInfo.goods_type = $('#cartType').val();
goodInfo.selected = $this.hasClass('icon-cb-checked') ? 'N' : 'Y';
goodInfo.product_sku = id;
... ...
... ... @@ -28,6 +28,7 @@ function nextStep(url, mobileNo, areaCode) {
}
requested = true;
$btnNext.addClass('disable').html('绑定中...');
$.ajax({
type: 'POST',
... ... @@ -37,11 +38,13 @@ function nextStep(url, mobileNo, areaCode) {
areaCode: areaCode.replace('+', '')
},
success: function(res) {
console.log(res.data);
// console.log(res.data);
location.href = url;
},
error: function() {
tip.show('出错了,请重试!');
$btnNext.removeClass('disable').html('下一步');
requested = false;
}
});
... ... @@ -86,7 +89,8 @@ $btnNext.on('touchstart', function() {
nickname: nickname
},
success: function(res) {
console.log(res);
// console.log(res);
//res : {
// code: 'xxx',
... ...
... ... @@ -867,6 +867,7 @@ class HomeController extends AbstractAction
$this->_view->display('help', array(
'iHelp' => Home\HelpModel::serviceInfo(),
'pageFooter' => true
));
}
... ... @@ -886,6 +887,7 @@ class HomeController extends AbstractAction
$this->_view->display('help-detail', array(
'iHelp' => Home\HelpModel::serviceDetail($code),
'pageFooter' => true
));
}
... ...