From 015e7bc506a59f5e9839921d7130aab250968009 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 7 Jan 2020 16:26:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=88=B6=E8=B5=84=E8=B4=A8=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/BaseController.class.php | 12 +- .../Controller/FinanceController.class.php | 18 ++ .../Controller/PromoteController.class.php | 10 + .../Home/Controller/SafeController.class.php | 12 +- .../Home/View/default/Promote/index.html | 18 ++ .../Home/View/default/Public/setSafePwd.html | 212 ++++++++++++++++++ ThinkPHP/Library/Think/Controller.class.php | 7 + ThinkPHP/Tpl/dispatch_jump.tpl | 2 +- 8 files changed, 281 insertions(+), 10 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 e8d279de7..06b20c006 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -303,7 +303,7 @@ class BaseController extends HomeController if($level == 1) { switch ($ver_status) { case 0: - $this->verConAction($rule_name,$second_pwd,'请先填写资料'); + $this->verConAction($rule_name,$second_pwd,'请进行资质认证,认证成功后才可进行操作'); break; case 2: $this->verConAction($rule_name,$second_pwd,'资质审核失败,请重新验证认证资料'); @@ -322,11 +322,9 @@ class BaseController extends HomeController 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': + // if(empty($second_pwd)) { + // $this->error('请先设置安全密码',U('Safe/setSafePwd')); + // } break; case 'Home/Safe/setSafePassword': break; @@ -337,7 +335,7 @@ class BaseController extends HomeController case 'Home/Safe/verifyPassword': break; default: - $this->error($status,U('Safe/modifyBaseInfo')); + $this->tips($status,U('Safe/modifyBaseInfo')); break; } } diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index 0a60c3d70..6c29e3a59 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]; @@ -381,6 +393,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]; 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..2277ed78d 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,11 +157,15 @@ 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'); + } $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'); diff --git a/Application/Home/View/default/Promote/index.html b/Application/Home/View/default/Promote/index.html index 0c550f33c..6099c49a4 100644 --- a/Application/Home/View/default/Promote/index.html +++ b/Application/Home/View/default/Promote/index.html @@ -186,6 +186,24 @@ +
+
+ + + 设置安全密码 +
+
+
+ +
+ + + + + + + + + + + + + + + +
新密码: +
确认密码: +
+ + +
+
+ + + +
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/ThinkPHP/Library/Think/Controller.class.php b/ThinkPHP/Library/Think/Controller.class.php index ce0f2a1f3..403b15ec5 100644 --- a/ThinkPHP/Library/Think/Controller.class.php +++ b/ThinkPHP/Library/Think/Controller.class.php @@ -199,6 +199,13 @@ abstract class Controller { $this->dispatchJump($message,1,$jumpUrl,$ajax); } + protected function tips($message='',$jumpUrl='') { + C('HTML_CACHE_ON',false); + $this->redirect('Promote/index',array('tips'=>1,'message'=>$message)); + // $this->display(C('TMPL_ACTION_TIPS')); + exit ; + } + /** * Ajax方式返回数据到客户端 * @access protected diff --git a/ThinkPHP/Tpl/dispatch_jump.tpl b/ThinkPHP/Tpl/dispatch_jump.tpl index 25d4e4ef9..70c7eb97d 100644 --- a/ThinkPHP/Tpl/dispatch_jump.tpl +++ b/ThinkPHP/Tpl/dispatch_jump.tpl @@ -30,7 +30,7 @@ body{ background: #fff; font-family: '微软雅黑'; color: #333; font-size: 16p

-页面自动 跳转 等待时间: +页面自动 跳转11 等待时间: