From dec6c4b2220a588cb8919d25a323fd39659d4688 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 9 Oct 2020 13:37:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/StatController.class.php | 2 +- .../Controller/PromoteGradeController.class.php | 17 +++++++++++++++-- .../Home/View/default/Public/promote_base.html | 4 +++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/StatController.class.php b/Application/Admin/Controller/StatController.class.php index a085d0296..c9d6b9b03 100644 --- a/Application/Admin/Controller/StatController.class.php +++ b/Application/Admin/Controller/StatController.class.php @@ -819,7 +819,7 @@ AND UNIX_TIMESTAMP( 'date' => '日期', 'new_user' => '新增玩家', 'login_user' => '活跃玩家', - 'pay_account' => '充值金额', + 'pay_amount' => '充值金额', 'pay_user' => '付费玩家', 'pay_rate' => '付费率', 'arpu' => 'ARPU', diff --git a/Application/Home/Controller/PromoteGradeController.class.php b/Application/Home/Controller/PromoteGradeController.class.php index c9cc191b8..35fab0f3b 100644 --- a/Application/Home/Controller/PromoteGradeController.class.php +++ b/Application/Home/Controller/PromoteGradeController.class.php @@ -14,7 +14,7 @@ class PromoteGradeController extends BaseController parent::_initialize(); $loginPromote = $this->getLoginPromote(); - if((C('APP_ENV') == 'dev' || $loginPromote['company_id'] == 334) && $loginPromote['level'] <= 2) { + if(C('APP_ENV') == 'dev' || $loginPromote['company_id'] == 334) { } else { return $this->error('您没有权限'); @@ -88,6 +88,8 @@ class PromoteGradeController extends BaseController public function settings() { + $this->checkSettingPermission(); + $loginPromote = $this->getLoginPromote(); $items = M('promote_grade_setting', 'tab_')->where(['company_id' => $loginPromote['company_id']])->select(); @@ -135,8 +137,8 @@ class PromoteGradeController extends BaseController public function setting() { + $this->checkSettingPermission(); $id = I('id', 0); - $setting = null; if ($id > 0) { $setting = M('promote_grade_setting', 'tab_')->where(['id' => $id])->find(); @@ -152,6 +154,7 @@ class PromoteGradeController extends BaseController public function delete() { + $this->checkSettingPermission(); $id = I('id', 0); if ($id == 0) { return $this->error('记录不存在'); @@ -167,6 +170,8 @@ class PromoteGradeController extends BaseController public function saveSetting() { + $this->checkSettingPermission(); + $params = I('post.'); $loginPromote = $this->getLoginPromote(); $promoteGradeService = new PromoteGradeService(); @@ -177,4 +182,12 @@ class PromoteGradeController extends BaseController return $this->error($e->getMessage()); } } + + public function checkSettingPermission() + { + $loginPromote = $this->getLoginPromote(); + if ($loginPromote['level'] > 2) { + return $this->error('您没有权限'); + } + } } \ No newline at end of file diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index bf5042eb3..b29b7a23e 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -119,10 +119,12 @@ 测试资源申请记录 - +