From e4ef55531a61bab5eddb8912516f0324c1840b41 Mon Sep 17 00:00:00 2001 From: tping Date: Wed, 16 Dec 2020 13:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=85=AC=E5=8F=B8=E8=AF=84?= =?UTF-8?q?=E7=BA=A7=E7=AE=A1=E7=90=86=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/PromoteGradeController.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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('您没有权限');