From 7a1cd5bc945f3e8169b77e5af02edbdc6214907b Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 14 Jan 2020 14:41:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=8C=E6=95=B4=E7=9A=84?= =?UTF-8?q?=E6=9D=83=E9=99=90=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/BaseController.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index eda6e7e41..9af51d297 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -3,9 +3,11 @@ namespace Home\Controller; use Think\Controller; +use Base\Service\PromoteService; class BaseController extends HomeController { + protected $promotePermissions; protected $loginPromote = null; protected $canViewUserRecharge = true; @@ -379,7 +381,11 @@ class BaseController extends HomeController } } if ($permission == 'view-user-recharge') { - return false; + $promoteService = new PromoteService(); + $topPromote = $promoteService->getTopPromote($promote); + if ($topPromote['can_view_recharge'] == 1) { + return true; + } } return false; }