新年活动:投入最多改为99
This commit is contained in:
@@ -308,9 +308,9 @@ $('.rank-wrap .list ul').on('click', 'li', function () {
|
||||
// 投入+
|
||||
$('.gift-box-wrap .but .add').click(function () {
|
||||
let val = $('.gift-box-wrap .but input').val();
|
||||
if (val >= 999) {
|
||||
toastMsg('最多可輸入999')
|
||||
$('.gift-box-wrap .but input').val(parseInt(999))
|
||||
if (val >= 99) {
|
||||
toastMsg('最多可輸入99')
|
||||
$('.gift-box-wrap .but input').val(parseInt(99))
|
||||
} else {
|
||||
$('.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 () {
|
||||
if ($(this).val() >= 999) {
|
||||
toastMsg('最多可輸入999')
|
||||
$('.gift-box-wrap .but input').val(parseInt(999))
|
||||
if ($(this).val() >= 99) {
|
||||
toastMsg('最多可輸入99')
|
||||
$('.gift-box-wrap .but input').val(parseInt(99))
|
||||
} else if ($(this).val() <= 1) {
|
||||
toastMsg('至少投入1')
|
||||
$('.gift-box-wrap .but input').val(parseInt(1))
|
||||
|
Reference in New Issue
Block a user