From f172c3bfb27d813cc5f7ca5c681bc80ee996c232 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Mon, 6 Jan 2020 16:08:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BC=9A=E9=95=BF=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E8=AE=A4=E8=AF=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/BaseController.class.php | 55 ++++++++++++++++++- .../Controller/FinanceController.class.php | 1 + 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index 2cd6ba2c5..e8d279de7 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -15,7 +15,7 @@ class BaseController extends HomeController $this->login(); $loginer = $this->getLoginPromote(); - + $this->certifiCation(); $pid = is_login_promote(); define('PLEVEL', $loginer['parent_id']); define('PID', $pid); @@ -288,4 +288,57 @@ class BaseController extends HomeController $this->ajaxReturn($data); } + + //判断是否认证资质 + public function certifiCation() { + $pid = get_pid(); + $verInfo = M('promote','tab_')->field('ver_status,level,second_pwd')->where(['id' => $pid])->find(); + $ver_status = intval($verInfo['ver_status']); + $level = intval($verInfo['level']); + $second_pwd = $verInfo['second_pwd']; + $module_name = MODULE_NAME; + $controller_name = CONTROLLER_NAME; + $action_name = ACTION_NAME; + $rule_name = $module_name.'/'.$controller_name.'/'.$action_name; + if($level == 1) { + switch ($ver_status) { + case 0: + $this->verConAction($rule_name,$second_pwd,'请先填写资料'); + break; + case 2: + $this->verConAction($rule_name,$second_pwd,'资质审核失败,请重新验证认证资料'); + break; + case 3: + $this->verConAction($rule_name,$second_pwd,'资质验证未审核,请联系管理员'); + break; + default: + break; + } + } + + } + + //判断控制器方法 + public function verConAction($rule_name,$second_pwd,$status='') { + switch ($rule_name) { + case 'Home/Safe/modifyBaseInfo': + if(empty($second_pwd)) { + $this->error('请先设置安全密码',U('Safe/setSafeIndex')); + } + break; + case 'Home/Safe/setSafeIndex': + break; + case 'Home/Safe/setSafePassword': + break; + case 'Home/Safe/verifySafePwd': + break; + case 'Home/Promote/index': + break; + case 'Home/Safe/verifyPassword': + break; + default: + $this->error($status,U('Safe/modifyBaseInfo')); + break; + } + } } diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index 24015b034..87cb59996 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -265,6 +265,7 @@ class FinanceController extends BaseController $list['income'] = bcmul($list['pay_amount'], bcdiv($list['selle_ratio'], 100, 2), 2); $list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']); + $list['user_account'] = encryption($list['user_account']); } }