From a10bb888dafb6b43265f78091ffddc52f3651d9e Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 16 Oct 2020 11:49:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/TestingResource/index.html | 6 +++--- .../Base/Repository/TestingResourceRepository.class.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Admin/View/TestingResource/index.html b/Application/Admin/View/TestingResource/index.html index d14705d1b..7d82a6907 100644 --- a/Application/Admin/View/TestingResource/index.html +++ b/Application/Admin/View/TestingResource/index.html @@ -322,9 +322,6 @@ var tr = $(this).parents('tr').eq(0) var id = tr.attr('data-id') var otherQuota = tr.attr('data-other-quota') - if (!isNumber(otherQuota)) { - return layer.msg('额外额度只能为正整数') - } box.find('[name=id]').val(id) box.find('[name=other_quota]').val(otherQuota) layer.open({ @@ -340,6 +337,9 @@ var box = $('#other-quota-box') var id = box.find('[name=id]').val() var otherQuota = box.find('[name=other_quota]').val() + if (!isNumber(otherQuota)) { + return layer.msg('额外额度只能为正整数') + } $.ajax({ url: "{:U('setOtherQuota')}", type: "POST", diff --git a/Application/Base/Repository/TestingResourceRepository.class.php b/Application/Base/Repository/TestingResourceRepository.class.php index 83fec07df..ec7be34f2 100644 --- a/Application/Base/Repository/TestingResourceRepository.class.php +++ b/Application/Base/Repository/TestingResourceRepository.class.php @@ -352,7 +352,7 @@ class TestingResourceRepository 'bind_user_account' => $bindingRole ? $bindingRole['user_account'] : '', 'bind_role_name' => $bindingRole ? $bindingRole['role_name'] : '', 'base_quota' => $gameSetting ? $gameSetting['base_quota'] : 0, - 'other_quota' => $role['testing_other_quota'], + 'other_quota' => intval($role['testing_other_quota']), 'quota' => $quota, 'verify_amount' => $verifyRecords[$role['game_role_id']] ?? 0, 'provide_amount' => $provideRecords[$role['game_role_id']] ?? 0,