diff --git a/app/admin/view/default/site/base/index.html b/app/admin/view/default/site/base/index.html
index 756873d16..668c7a689 100755
--- a/app/admin/view/default/site/base/index.html
+++ b/app/admin/view/default/site/base/index.html
@@ -84,10 +84,18 @@
-
-
+
+
+
+ {{foreach $common_close_open_list as $v}}
+
{{/foreach}}
diff --git a/app/index/controller/Common.php b/app/index/controller/Common.php
index b697f6f51..c312e2cdc 100755
--- a/app/index/controller/Common.php
+++ b/app/index/controller/Common.php
@@ -96,6 +96,12 @@ class Common extends BaseController
// 站点状态校验
$this->SiteStstusCheck();
+ // web端pc访问状态
+ if(!IsMobile())
+ {
+ $this->SiteStstusCheck('_web_pc');
+ }
+
// 公共数据初始化
$this->CommonInit();
@@ -395,43 +401,13 @@ class Common extends BaseController
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
- * @date 2021-12-08
+ * @date 2022-01-26
* @desc description
+ * @param [string] $type [web端首页 _web_home , web端PC访问 _web_pc]
*/
- private function SiteStstusCheck()
+ protected function SiteStstusCheck($type = '')
{
- if(MyC('home_site_state') != 1)
- {
- // 提示信息
- $reason = MyC('home_site_close_reason', '升级中...', true);
-
- // 是否ajax请求
- if(IS_AJAX)
- {
- exit(json_encode(DataReturn($reason, -10000)));
- } else {
- // 默认提示信息增加样式,则使用用户自定义信息展示
- if($reason == '升级中...')
- {
- exit(''.MyC('home_site_name').''.$reason.'
');
- } else {
- exit($reason);
- }
- }
- }
- }
-
- /**
- * 站点状态校验 - web端
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2021-12-08
- * @desc description
- */
- public function SiteWebStstusCheck()
- {
- if(MyC('home_site_web_state') != 1)
+ if(MyC('home_site'.$type.'_state') != 1)
{
// 提示信息
$reason = MyC('home_site_close_reason', '升级中...', true);
diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php
index 9c609c675..24610b4e8 100755
--- a/app/index/controller/Index.php
+++ b/app/index/controller/Index.php
@@ -44,7 +44,7 @@ class Index extends Common
parent::__construct();
// web端首页状态
- $this->SiteWebStstusCheck();
+ $this->SiteStstusCheck('_web_home');
}
/**
diff --git a/app/service/SystemBaseService.php b/app/service/SystemBaseService.php
index 390d10ef5..70ee5c003 100644
--- a/app/service/SystemBaseService.php
+++ b/app/service/SystemBaseService.php
@@ -97,7 +97,9 @@ class SystemBaseService
'home_site_logo' => ResourcesService::AttachmentPathViewHandle(MyC('home_site_logo')),
'home_site_logo_wap' => ResourcesService::AttachmentPathViewHandle(MyC('home_site_logo_wap')),
'home_site_logo_square' => ResourcesService::AttachmentPathViewHandle(MyC('home_site_logo_square')),
- 'home_site_state' => (int) MyC('home_site_state', 0, true),
+ 'home_site_state' => (int) MyC('home_site_state', 1),
+ 'home_site_web_home_state' => (int) MyC('home_site_web_home_state', 1),
+ 'home_site_web_pc_state' => (int) MyC('home_site_web_pc_state', 1),
'home_site_close_reason' => MyC('home_site_close_reason', null, true),
// 备案信息