|
@@ -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
|
|