...
|
...
|
@@ -45,7 +45,9 @@ var $chosePanel = $('#chose-panel'), |
|
|
var $productSku = $('#productSku'),
|
|
|
$buyNumber = $('#buyNumber'),
|
|
|
$buyNowForm = $('#buyNowForm'),
|
|
|
$mnum;
|
|
|
$mnum,
|
|
|
discountLimit = false,
|
|
|
discountNum;
|
|
|
|
|
|
// 购物车编辑标相关变量
|
|
|
var isEdit,
|
...
|
...
|
@@ -86,6 +88,7 @@ function init() { |
|
|
curSizeIndex = 0;
|
|
|
isEdit = 0;
|
|
|
$mnum = $('#mnum');
|
|
|
discountNum = $mnum.val() - 0;
|
|
|
}
|
|
|
|
|
|
/*
|
...
|
...
|
@@ -206,7 +209,8 @@ function hide() { |
|
|
//修改加入购物车的文字和背景
|
|
|
function updateConformButtonClassAndText() {
|
|
|
$chosed = $allChoseItems.find('.chosed');
|
|
|
if (2 === $chosed.closest('.zero-stock').length) {
|
|
|
discountLimit = discountNum && $chosed.length === 2 && $('#left-num').val() - 0 < discountNum;
|
|
|
if (2 === $chosed.closest('.zero-stock').length || discountLimit) {
|
|
|
$('#chose-btn-sure').css('background-color', '#c0c0c0').html('已售罄');
|
|
|
} else if (limitProductCode || ticketsLimit) {
|
|
|
$('#chose-btn-sure').css('background-color', '#eb0313').html('立即购买');
|
...
|
...
|
|