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('您没有权限');