...
|
...
|
@@ -708,7 +708,9 @@ giftCard = { |
|
|
url: '/cart/ensure/giftcards'
|
|
|
}).then(function(data) {
|
|
|
if (data.code === 200) {
|
|
|
if (data.data && data.data.usable_giftCards && data.data.usable_giftCards.length) {
|
|
|
$('.can-use-tip', that.$el).text('(' + data.data.usable_giftCards.length + '张可用)');
|
|
|
}
|
|
|
|
|
|
if (data.data.usable_giftCards.length) {
|
|
|
$('tbody', that.$giftCardWrap).html(giftCardTpl(data.data));
|
...
|
...
|
@@ -856,6 +858,7 @@ function submitOrder(reqData) { |
|
|
sku: [],
|
|
|
py: []
|
|
|
};
|
|
|
var errAlert;
|
|
|
|
|
|
if (data.code === 200) {
|
|
|
rdata = data.data;
|
...
|
...
|
@@ -933,7 +936,9 @@ function submitOrder(reqData) { |
|
|
location.href = rdata.url;
|
|
|
}
|
|
|
} else if (data.message) {
|
|
|
new dialog.Alert(data.message).show();
|
|
|
errAlert = new dialog.Alert(data.message);
|
|
|
errAlert.$el.addClass('ensure-alert');
|
|
|
errAlert.show();
|
|
|
}
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -1036,7 +1041,7 @@ $('#order-submit').click(function() { |
|
|
if (that.seconds > 0) {
|
|
|
that.$sendBtn.text((that.seconds--) + 's').addClass('timer');
|
|
|
} else {
|
|
|
that.$sendBtn.text('获取验证码').removeClass('timer');
|
|
|
that.$sendBtn.text('重新获取').removeClass('timer');
|
|
|
clearInterval(that.timer);
|
|
|
}
|
|
|
}, 1000);
|
...
|
...
|
|