From 5f6611fc30b8577806358cbe984babb48af2f5fd Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Fri, 10 Jan 2020 18:27:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E8=B4=A8=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/BaseController.class.php | 56 ++++- .../Controller/DownloadController.class.php | 3 +- .../Controller/FinanceController.class.php | 20 ++ .../Controller/PlayersController.class.php | 1 + .../Controller/PromoteController.class.php | 10 + .../Home/Controller/SafeController.class.php | 16 +- .../Home/View/default/Promote/index.html | 18 ++ .../Home/View/default/Public/setSafePwd.html | 212 ++++++++++++++++++ ThinkPHP/Library/Think/Controller.class.php | 7 + 9 files changed, 338 insertions(+), 5 deletions(-) create mode 100644 Application/Home/View/default/Public/setSafePwd.html diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index 2cd6ba2c5..31c126422 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,58 @@ 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': + break; + case 'Home/Safe/setSafePassword': + break; + case 'Home/Safe/verifySafePwd': + break; + case 'Home/Promote/index': + break; + case 'Home/Safe/verifyPassword': + break; + case 'Home/Safe/safeDocument': + break; + case 'Home/Promote/popRuleDetail': + break; + case 'Home/Promote/popRuleFinish': + break; + default: + $this->tips($status,U('Safe/modifyBaseInfo')); + break; + } + } } diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index c29528030..6d36d1428 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1918,7 +1918,7 @@ class DownloadController extends BaseController { } $csvData['extend'] = $this->encryption($v['extend']); $csvData['create_time'] = $v['create_time']; - $csvData['user_account'] = $v['user_account']; + $csvData['user_account'] = $this->encryption($v['user_account']); $csvData['game_name'] = $v['game_name']; $csvData['promote_id'] = $v['promote_id']; $csvData['server_name'] = $serverInfo['server_name']; @@ -2607,6 +2607,7 @@ class DownloadController extends BaseController { foreach ($data as $key => &$list) { $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'] = $this->encryption($list['user_account']); switch ($list['pay_way']) { case 2: case 3: diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index c0c245b2e..9e13c9c97 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -80,6 +80,12 @@ class FinanceController extends BaseController { //是否是会长 $this->purview(); + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } //验证安全密码 $metaTitle = '结算中心'; $modelList = ['财务管理', $metaTitle]; @@ -152,6 +158,12 @@ class FinanceController extends BaseController { //是否是会长 $this->purview(); + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } //验证安全密码 $metaTitle = '结算明细'; $modelList = ['财务管理', $metaTitle]; @@ -265,6 +277,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']); } } @@ -374,6 +387,12 @@ class FinanceController extends BaseController { //是否是会长 $this->purview(); + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } //验证安全密码 $metaTitle = '提现记录'; $modelList = ['财务管理', $metaTitle]; @@ -513,6 +532,7 @@ class FinanceController extends BaseController foreach ($data as &$list) { $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']); switch ($list['pay_way']) { case 2: case 3: diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php index 3cf12243a..edb710fc6 100644 --- a/Application/Home/Controller/PlayersController.class.php +++ b/Application/Home/Controller/PlayersController.class.php @@ -89,6 +89,7 @@ class PlayersController extends BaseController { } $rs[$key]['extend'] = encryption($v['extend']); $rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); + $rs[$key]['user_account'] = encryption($rs[$key]['user_account']); $promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find(); $rs[$key]['promote_id']= $promoteInfo['account']; diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index d43e3250f..87937b618 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -44,6 +44,14 @@ class PromoteController extends BaseController $this->display('prepare'); exit(0); } + $tips = 0; + $message = ''; + if(!empty($_REQUEST['tips'])) { + $tips = 1; + } + if(!empty($_REQUEST['message'])) { + $message = $_REQUEST['message']; + } header("Content-type:text/html;charset=utf-8"); $user = D('Promote')->isLogin(); @@ -234,6 +242,8 @@ class PromoteController extends BaseController $this->assign("rz_count", $logCount - $readLogCount); $this->assign("today_open_server_list", $today_open_server_list); $this->assign("game_list", $game_list); + $this->assign("tips",$tips); + $this->assign("message",$message); $this->meta_title = "首页"; $this->display(); } diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index 260dc2c8c..90d4ba04b 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -26,6 +26,10 @@ class SafeController extends BaseController{ } } + + public function setSafePwd() { + $this->display('Public/setSafePwd'); + } public function setSafePassword() { $password = $_REQUEST['password']; @@ -153,15 +157,21 @@ class SafeController extends BaseController{ //修改用户信息 public function modifyBaseInfo() { + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } $metaTitle = '基础信息'; $modelList = ['基础信息', $metaTitle]; $this->verifyPasswordView($modelList); - $id = get_pid(); - $ver_status = M('promote','tab_')->where(['id'=>$id])->getField('ver_status',true); + $ver_status = M('promote','tab_')->where(['id'=>$id])->getField('ver_status',true); + if($ver_status[0] == 1) { //return $this->display('editModify'); $this->redirect('editModify'); - + exit; } if($_POST) { $username = $_REQUEST['username']; //真实姓名 diff --git a/Application/Home/View/default/Promote/index.html b/Application/Home/View/default/Promote/index.html index 0c550f33c..ecfd87c9a 100644 --- a/Application/Home/View/default/Promote/index.html +++ b/Application/Home/View/default/Promote/index.html @@ -186,6 +186,24 @@ +