Files
fast_response/front/application/index/controller/BasePublicController.php
Your Name dce091da91 t
2025-03-27 07:52:44 +00:00

46 lines
1.1 KiB
PHP
Executable File
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\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
}
}