diff --git a/Application/Admin/View/Promote/edit.html b/Application/Admin/View/Promote/edit.html index d8d22e58e..2a6ee9578 100644 --- a/Application/Admin/View/Promote/edit.html +++ b/Application/Admin/View/Promote/edit.html @@ -332,7 +332,7 @@ - + 1):?> 测试资源申请权限: diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index 0acc1b36d..bb7413388 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -1346,7 +1346,7 @@ class PromoteService { if (empty($promote)) { return null; } - if ($promote['level'] == 2 && $promote['ts_over_apply'] == 1) { + if ($promote['ts_over_apply'] == 1) { return $this->getTopPromote($promote); } return $promote; diff --git a/Application/Base/Service/TestingResourceService.class.php b/Application/Base/Service/TestingResourceService.class.php index 08a0cc7ab..08ea5bdf7 100644 --- a/Application/Base/Service/TestingResourceService.class.php +++ b/Application/Base/Service/TestingResourceService.class.php @@ -359,7 +359,9 @@ class TestingResourceService $userAccount = $params['user_account'] ?? ''; $records = $params['records'] ?? []; - if ($promote && $promote['level'] > 2) { + $promoteService = new PromoteService(); + $permissionPromote = $promoteService->getTSPermPromote($promote); + if ($permissionPromote && $permissionPromote['level'] > 2) { throw new \Exception('权限不足'); } @@ -396,9 +398,6 @@ class TestingResourceService throw new \Exception('区服不存在'); } - $promoteService = new PromoteService(); - $permissionPromote = $promoteService->getTSPermPromote($promote); - $role = M('user_play_info', 'tab_') ->field(['id', 'role_id', 'promote_id', 'game_id', 'testing_other_quota']) ->where(['user_id' => $user['id'], 'game_id' => $gameId, 'server_id' => $server['server_id'], 'role_id' => $roleId])