From 95248d3582595a7e3d8ff7ee69c2f0304f7b81f9 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Wed, 30 Sep 2020 14:39:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/PromoteGradeController.class.php | 10 ++++++++++ .../Home/View/default/PromoteGrade/setting.html | 8 ++++++++ Application/Home/View/default/Public/promote_base.html | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/PromoteGradeController.class.php b/Application/Home/Controller/PromoteGradeController.class.php index 5245f1a41..f7255d9c6 100644 --- a/Application/Home/Controller/PromoteGradeController.class.php +++ b/Application/Home/Controller/PromoteGradeController.class.php @@ -9,6 +9,16 @@ use Base\Service\PromoteGradeService; class PromoteGradeController extends BaseController { + protected function _initialize() + { + C(api('Config/lists')); + if((C('APP_ENV') == 'dev' || $loginer['company_id'] == 334) && $loginer['level'] <= 2) { + + } else { + return $this->error('您没有权限'); + } + } + public function index($p = 1) { $month = I('month', date('Y-m')); diff --git a/Application/Home/View/default/PromoteGrade/setting.html b/Application/Home/View/default/PromoteGrade/setting.html index 76320355a..635f0203b 100644 --- a/Application/Home/View/default/PromoteGrade/setting.html +++ b/Application/Home/View/default/PromoteGrade/setting.html @@ -210,6 +210,10 @@ layer.msg('玩家角色达标等级不能超过10000'); return false; } + if (level < 0) { + layer.msg('玩家角色不能小于0'); + return false; + } if (defaultGradeName == '') { layer.msg('默认等级名称不能为空'); return false; @@ -225,6 +229,10 @@ layer.msg('请输入系数值'); return false; } + if (grades[i].value < 0) { + layer.msg('系数值不能小于0'); + return false; + } /* var numReg = /([+]\d+[.]\d+|[-]\d+[.]\d+|\d+[.]\d+|[+]\d+|[-]\d+|\d+)/ig; if(!numReg.test(grades[i].value)){ diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index 1e6ea9025..bf5042eb3 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -119,13 +119,13 @@ 测试资源申请记录 +