Files
fast_response/admin/application/index/controller/BasePublicController.php
2025-03-25 15:41:52 +08:00

47 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/*
* description
* authorwh
* email
* createTime{2022/5/4} {9:39}
*/
namespace app\index\controller;
use think\Request;
use wanghua\general_utility_tools_php\framework\base\PublicController;
use wanghua\general_utility_tools_php\tool\Tools;
class BasePublicController extends BaseCommonController
{
public function __construct(Request $request = null)
{
parent::__construct($request);
//校验系统维护状态 start
$chm = $this->checkMaintain();
if($chm['is_maintain']){
if($chm['openid']){
//解析openid
if(!in_array(index_user_openid(), explode(',',$chm['openid']))){
//白名单之外维护中
//Tools::log_to_write_txt([
// '维护测试'=>$chm['openid'],
// 'my'=>index_user_openid()
//]);
return $this->error($chm['msg']);
}
}else{
//不存在,直接维护中
return $this->error($chm['msg'].'');
}
}
//校验系统维护状态 end
}
}