From c55084645475dd1209e3ecf40ed542adc1e600de Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 13 Nov 2020 15:11:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ConsoleController.class.php | 5 +++ .../Admin/View/TestingResource/apply.html | 3 +- .../Service/TestingResourceService.class.php | 5 ++- Application/Base/Tool/IPTool.class.php | 41 +++++++++++++++++++ .../View/default/TestingResource/apply.html | 3 +- 5 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 Application/Base/Tool/IPTool.class.php diff --git a/Application/Admin/Controller/ConsoleController.class.php b/Application/Admin/Controller/ConsoleController.class.php index 6839b3496..33c4cc40f 100644 --- a/Application/Admin/Controller/ConsoleController.class.php +++ b/Application/Admin/Controller/ConsoleController.class.php @@ -634,4 +634,9 @@ class ConsoleController extends Think { } } while($hasNext); } + + public function testIp() + { + var_dump(\Base\Tool\IPTool::getIpInfo('120.35.40.249')); + } } diff --git a/Application/Admin/View/TestingResource/apply.html b/Application/Admin/View/TestingResource/apply.html index fcf471233..802c4de3d 100644 --- a/Application/Admin/View/TestingResource/apply.html +++ b/Application/Admin/View/TestingResource/apply.html @@ -100,10 +100,11 @@ body { background: #E5E5E5; color: #535875; border: none; - border-radius: 4px; + border-radius: 3px; cursor: pointer; display: inline-block; margin-left: 10px; + padding: 0px 10px; } .info-row button.bind-btn { background: #409eff; diff --git a/Application/Base/Service/TestingResourceService.class.php b/Application/Base/Service/TestingResourceService.class.php index 53e312504..9d28e4856 100644 --- a/Application/Base/Service/TestingResourceService.class.php +++ b/Application/Base/Service/TestingResourceService.class.php @@ -469,7 +469,10 @@ class TestingResourceService throw new \Exception('额度不足'); } - $olderBatch = M('testing_resource_batch', 'tab_')->field(['id'])->where(['user_id' => $testingUser['user_id'], 'game_id' => $gameId])->find(); + $olderBatch = M('testing_resource_batch', 'tab_') + ->field(['id']) + ->where(['user_id' => $testingUser['user_id'], 'game_id' => $gameId, 'verify_status' => 1]) + ->find(); $batchNo = date('YmdHis') . substr(md5($roleId . strval(microtime(true)) . rand(0, 9999)), 8, 16); try { diff --git a/Application/Base/Tool/IPTool.class.php b/Application/Base/Tool/IPTool.class.php new file mode 100644 index 000000000..043430f56 --- /dev/null +++ b/Application/Base/Tool/IPTool.class.php @@ -0,0 +1,41 @@ +