Merge pull request 'feature/1211' (#21) from feature/1211 into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/21
master
廖金灵 4 years ago
commit 3bedf259a0

@ -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;
}

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

Loading…
Cancel
Save