Authored by OF1706

Merge branch 'feature/shoppingCart' of http://git.yoho.cn/fe/yohobuy-node into feature/shoppingCart

... ... @@ -139,6 +139,10 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys
if (it.min_buy_number) {
goods.minBuyNumber = Number(it.min_buy_number);
if(goods.minBuyNumber > 1) {
goods.tipMessage = goods.minBuyNumber + '件起购';
}
}
// 已下架
... ...
... ... @@ -117,31 +117,6 @@
</div>
{{/if}}
{{#if offShelves}}
<div class="mt20">
<div class="cart-table">
<ul class="table">
{{#offShelves}}
{{> mix/cart/cart-item}}
{{/offShelves}}
</ul>
</div>
</div>
{{/if}}
<!-- -->
{{#if soldOuts}}
<div class="mt20">
<div class="cart-table">
<ul class="table">
{{#soldOuts}}
{{> mix/cart/cart-item}}
{{/soldOuts}}
</ul>
</div>
</div>
{{/if}}
<!--可选的加价购商品 -->
<!--priceGifts-->
<!--可选择的赠品-->
... ... @@ -166,6 +141,31 @@
{{/promotionInfos}}
</div>
{{/if}}
{{#if offShelves}}
<div class="mt20">
<div class="cart-table">
<ul class="table">
{{#offShelves}}
{{> mix/cart/cart-item}}
{{/offShelves}}
</ul>
</div>
</div>
{{/if}}
<!-- -->
{{#if soldOuts}}
<div class="mt20">
<div class="cart-table">
<ul class="table">
{{#soldOuts}}
{{> mix/cart/cart-item}}
{{/soldOuts}}
</ul>
</div>
</div>
{{/if}}
</div>
{{/ordinaryCart}}
... ...
... ... @@ -5,6 +5,8 @@
var $ = require('yoho-jquery'),
Alert = require('../common/dialog').Alert,
capi = require('./cart-api'),
rDialog = require('./rdialog'),
RAlert = rDialog.RAlert,
giftsWinTpl = require('hbs/cart/cart-gifts-win-tpl.hbs'),
productInfoTpl = require('hbs/cart/cart-product-info-tpl.hbs');
... ... @@ -20,6 +22,11 @@ var $cartListWrap = $('#Y_CartListWrap'),
'[data-role=pg-resel-btn]'];
function renderAndShowGiftWin(plist) {
if(!plist.goodsList || !plist.goodsList.length) {
new RAlert('<div class="alert-main">已抢光</div>');
return;
}
$goodsSelWin.find('.detail-body').empty().html(giftsWinTpl(plist));
capi.showMDialog('#Y_goodsSelectWinDialog');
... ...