Merge branch 'feature/shoppingCart' of http://git.yoho.cn/fe/yohobuy-node into feature/shoppingCart
Showing
3 changed files
with
36 additions
and
25 deletions
@@ -139,6 +139,10 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys | @@ -139,6 +139,10 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys | ||
139 | 139 | ||
140 | if (it.min_buy_number) { | 140 | if (it.min_buy_number) { |
141 | goods.minBuyNumber = Number(it.min_buy_number); | 141 | goods.minBuyNumber = Number(it.min_buy_number); |
142 | + | ||
143 | + if(goods.minBuyNumber > 1) { | ||
144 | + goods.tipMessage = goods.minBuyNumber + '件起购'; | ||
145 | + } | ||
142 | } | 146 | } |
143 | 147 | ||
144 | // 已下架 | 148 | // 已下架 |
@@ -117,31 +117,6 @@ | @@ -117,31 +117,6 @@ | ||
117 | </div> | 117 | </div> |
118 | {{/if}} | 118 | {{/if}} |
119 | 119 | ||
120 | - {{#if offShelves}} | ||
121 | - <div class="mt20"> | ||
122 | - <div class="cart-table"> | ||
123 | - <ul class="table"> | ||
124 | - {{#offShelves}} | ||
125 | - {{> mix/cart/cart-item}} | ||
126 | - {{/offShelves}} | ||
127 | - </ul> | ||
128 | - </div> | ||
129 | - </div> | ||
130 | - {{/if}} | ||
131 | - | ||
132 | - <!-- --> | ||
133 | - {{#if soldOuts}} | ||
134 | - <div class="mt20"> | ||
135 | - <div class="cart-table"> | ||
136 | - <ul class="table"> | ||
137 | - {{#soldOuts}} | ||
138 | - {{> mix/cart/cart-item}} | ||
139 | - {{/soldOuts}} | ||
140 | - </ul> | ||
141 | - </div> | ||
142 | - </div> | ||
143 | - {{/if}} | ||
144 | - | ||
145 | <!--可选的加价购商品 --> | 120 | <!--可选的加价购商品 --> |
146 | <!--priceGifts--> | 121 | <!--priceGifts--> |
147 | <!--可选择的赠品--> | 122 | <!--可选择的赠品--> |
@@ -166,6 +141,31 @@ | @@ -166,6 +141,31 @@ | ||
166 | {{/promotionInfos}} | 141 | {{/promotionInfos}} |
167 | </div> | 142 | </div> |
168 | {{/if}} | 143 | {{/if}} |
144 | + | ||
145 | + {{#if offShelves}} | ||
146 | + <div class="mt20"> | ||
147 | + <div class="cart-table"> | ||
148 | + <ul class="table"> | ||
149 | + {{#offShelves}} | ||
150 | + {{> mix/cart/cart-item}} | ||
151 | + {{/offShelves}} | ||
152 | + </ul> | ||
153 | + </div> | ||
154 | + </div> | ||
155 | + {{/if}} | ||
156 | + | ||
157 | + <!-- --> | ||
158 | + {{#if soldOuts}} | ||
159 | + <div class="mt20"> | ||
160 | + <div class="cart-table"> | ||
161 | + <ul class="table"> | ||
162 | + {{#soldOuts}} | ||
163 | + {{> mix/cart/cart-item}} | ||
164 | + {{/soldOuts}} | ||
165 | + </ul> | ||
166 | + </div> | ||
167 | + </div> | ||
168 | + {{/if}} | ||
169 | </div> | 169 | </div> |
170 | {{/ordinaryCart}} | 170 | {{/ordinaryCart}} |
171 | 171 |
@@ -5,6 +5,8 @@ | @@ -5,6 +5,8 @@ | ||
5 | var $ = require('yoho-jquery'), | 5 | var $ = require('yoho-jquery'), |
6 | Alert = require('../common/dialog').Alert, | 6 | Alert = require('../common/dialog').Alert, |
7 | capi = require('./cart-api'), | 7 | capi = require('./cart-api'), |
8 | + rDialog = require('./rdialog'), | ||
9 | + RAlert = rDialog.RAlert, | ||
8 | giftsWinTpl = require('hbs/cart/cart-gifts-win-tpl.hbs'), | 10 | giftsWinTpl = require('hbs/cart/cart-gifts-win-tpl.hbs'), |
9 | productInfoTpl = require('hbs/cart/cart-product-info-tpl.hbs'); | 11 | productInfoTpl = require('hbs/cart/cart-product-info-tpl.hbs'); |
10 | 12 | ||
@@ -20,6 +22,11 @@ var $cartListWrap = $('#Y_CartListWrap'), | @@ -20,6 +22,11 @@ var $cartListWrap = $('#Y_CartListWrap'), | ||
20 | '[data-role=pg-resel-btn]']; | 22 | '[data-role=pg-resel-btn]']; |
21 | 23 | ||
22 | function renderAndShowGiftWin(plist) { | 24 | function renderAndShowGiftWin(plist) { |
25 | + | ||
26 | + if(!plist.goodsList || !plist.goodsList.length) { | ||
27 | + new RAlert('<div class="alert-main">已抢光</div>'); | ||
28 | + return; | ||
29 | + } | ||
23 | $goodsSelWin.find('.detail-body').empty().html(giftsWinTpl(plist)); | 30 | $goodsSelWin.find('.detail-body').empty().html(giftsWinTpl(plist)); |
24 | capi.showMDialog('#Y_goodsSelectWinDialog'); | 31 | capi.showMDialog('#Y_goodsSelectWinDialog'); |
25 | 32 |
-
Please register or login to post a comment