diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index eca59c3f5..3705e3848 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -397,7 +397,7 @@ class BaseController extends HomeController // 推广公司 $promoteCompanyService = new PromoteCompanyService(); $promoteCompany = $promoteCompanyService->getCompanies([$topPromote['company_id']]); - if ($promoteCompany[$topPromote['company_id']]['type'] == $promoteCompanyService::TYPE_CUSTOM) { // 特殊公司不能看 + if ($promoteCompany[$topPromote['company_id']]['type'] == $promoteCompanyService::TYPE_CUSTOM && $promote['level'] == 4) { // 特殊公司不能看 return false; } diff --git a/Application/Home/Controller/PromoteGradeController.class.php b/Application/Home/Controller/PromoteGradeController.class.php index dc3e43cc1..2178be476 100644 --- a/Application/Home/Controller/PromoteGradeController.class.php +++ b/Application/Home/Controller/PromoteGradeController.class.php @@ -4,6 +4,7 @@ namespace Home\Controller; use Base\Model\PromoteModel; +use Base\Service\PromoteCompanyService; use Base\Service\PromoteService; use Base\Service\PromoteGradeService; @@ -14,7 +15,10 @@ class PromoteGradeController extends BaseController parent::_initialize(); $loginPromote = $this->getLoginPromote(); - if(C('APP_ENV') == 'dev' || in_array($loginPromote['company_id'], [334, 370])) { + // 推广公司 + $promoteCompanyService = new PromoteCompanyService(); + $promoteCompany = $promoteCompanyService->getCompanies([$loginPromote['company_id']]); + if (C('APP_ENV') == 'dev' || $promoteCompany[$loginPromote['company_id']]['type'] == $promoteCompanyService::TYPE_CUSTOM) { // 特殊公司 } else { return $this->error('您没有权限');