From 4a1e70c604a1918e5f5126cff6e666ee597a9ad8 Mon Sep 17 00:00:00 2001 From: wh <382379437@qq.com> Date: Thu, 11 Jul 2024 15:41:14 +0800 Subject: [PATCH] fixed --- .../index/controller/BaseCommonController.php | 44 ------------------- .../src/framework/BaseController.php | 1 - 2 files changed, 45 deletions(-) diff --git a/digital_doctor/application/index/controller/BaseCommonController.php b/digital_doctor/application/index/controller/BaseCommonController.php index c272dc1..e28c4a2 100644 --- a/digital_doctor/application/index/controller/BaseCommonController.php +++ b/digital_doctor/application/index/controller/BaseCommonController.php @@ -26,48 +26,4 @@ class BaseCommonController extends BaseController } - /** - * desc:检查路径维护状态 - * - * “===”完全匹配,不能使用like - * - * author:wh - */ - protected function checkMaintain(){ - - $configs = Db::table(TabConf::$fa_sys_maintain_config) - ->where('status','1') - ->cache() - ->select(); - - //模块 - $strmodule = request()->module(); - foreach ($configs as $config){ - if($strmodule == $config['url']){ - //模块维护中 - return ['is_maintain'=>true,'msg'=>$config['msg'],'openid'=>$config['openid']]; - } - } - - //模块/控制器 - $strcontroller = strtolower(request()->module().'/'.request()->controller()); - foreach ($configs as $config){ - if($strcontroller == $config['url']){ - //模块维护中 - return ['is_maintain'=>true,'msg'=>$config['msg'],'openid'=>$config['openid']]; - } - } - - //模块/控制器/方法 - $straction = strtolower(request()->module().'/'.request()->controller().'/'.request()->action()); - foreach ($configs as $config){ - if($straction == $config['url']){ - //模块维护中 - return ['is_maintain'=>true,'msg'=>$config['msg'],'openid'=>isset($config['openid'])?$config['openid']:'']; - } - } - - //未维护 - return ['is_maintain'=>false,'msg'=>'服务运行中']; - } } \ No newline at end of file diff --git a/digital_doctor/vendor/wanghua/general-utility-tools-php/src/framework/BaseController.php b/digital_doctor/vendor/wanghua/general-utility-tools-php/src/framework/BaseController.php index 0a70c59..849121c 100644 --- a/digital_doctor/vendor/wanghua/general-utility-tools-php/src/framework/BaseController.php +++ b/digital_doctor/vendor/wanghua/general-utility-tools-php/src/framework/BaseController.php @@ -34,7 +34,6 @@ class BaseController extends Controller //校验系统维护状态 start $chm = $this->checkMaintain(); if ($chm['is_maintain']) { - dump($chm);die; if ($chm['users_ids']) { //解析openid if (!in_array(api_user_info('id'), explode(',', $chm['users_ids']))) {