Authored by 刘传洋

m

@@ -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 // 已下架
@@ -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