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']); } }