diff --git a/Application/Admin/View/TestingResource/index.html b/Application/Admin/View/TestingResource/index.html index f9afa4690..3daf7c208 100644 --- a/Application/Admin/View/TestingResource/index.html +++ b/Application/Admin/View/TestingResource/index.html @@ -334,7 +334,7 @@ if(!num) { return false } - var strPreg = /^\d+$/ + var strPreg = /^-?[1-9]\d*$/ if(!strPreg.test(num)) { return false } diff --git a/Application/Base/Service/TestingResourceService.class.php b/Application/Base/Service/TestingResourceService.class.php index 08ea5bdf7..bd482148e 100644 --- a/Application/Base/Service/TestingResourceService.class.php +++ b/Application/Base/Service/TestingResourceService.class.php @@ -322,10 +322,10 @@ class TestingResourceService throw new \Exception('该玩家账号为测试账号,无法绑定'); } - $existBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => $gameId, 'bind_role_id' => $bindRoleId])->find(); + /* $existBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => $gameId, 'bind_role_id' => $bindRoleId])->find(); if ($existBind) { throw new \Exception('该玩家角色已被绑定'); - } + } */ $testExistBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => $gameId, 'role_id' => $testingRoleId])->find(); if ($testExistBind) {