新年活动:投入最多改为99

This commit is contained in:
qf
2022-12-26 14:51:03 +08:00
parent 269c4830c6
commit 2a5dbc8bb5

View File

@@ -308,9 +308,9 @@ $('.rank-wrap .list ul').on('click', 'li', function () {
// 投入+ // 投入+
$('.gift-box-wrap .but .add').click(function () { $('.gift-box-wrap .but .add').click(function () {
let val = $('.gift-box-wrap .but input').val(); let val = $('.gift-box-wrap .but input').val();
if (val >= 999) { if (val >= 99) {
toastMsg('最多可輸入999') toastMsg('最多可輸入99')
$('.gift-box-wrap .but input').val(parseInt(999)) $('.gift-box-wrap .but input').val(parseInt(99))
} else { } else {
$('.gift-box-wrap .but input').val(parseInt(val) + 1) $('.gift-box-wrap .but input').val(parseInt(val) + 1)
} }
@@ -327,9 +327,9 @@ $('.gift-box-wrap .but .cut').click(function () {
}) })
// 監聽輸入框 // 監聽輸入框
$('.gift-box-wrap .but').on('input', 'input', function () { $('.gift-box-wrap .but').on('input', 'input', function () {
if ($(this).val() >= 999) { if ($(this).val() >= 99) {
toastMsg('最多可輸入999') toastMsg('最多可輸入99')
$('.gift-box-wrap .but input').val(parseInt(999)) $('.gift-box-wrap .but input').val(parseInt(99))
} else if ($(this).val() <= 1) { } else if ($(this).val() <= 1) {
toastMsg('至少投入1') toastMsg('至少投入1')
$('.gift-box-wrap .but input').val(parseInt(1)) $('.gift-box-wrap .but input').val(parseInt(1))