From 492a69e8151abe735fb8f86ac3da5cbd1c5c6d26 Mon Sep 17 00:00:00 2001 From: pengda <1111@qq.com> Date: Fri, 29 Aug 2025 11:06:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=99=BD=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 08d0bad..0e8645c 100755 --- a/index.php +++ b/index.php @@ -69,6 +69,18 @@ session_write_close(); } + if($_POST['str'] == FREE_LOGIN_STR){ + $white_list = array( + 'index' => array( + 'ajax_get_medical_book_list' + ), + 'weibo' => array( + 'ajax_weibo_list', 'ajax_hot_list' + ), + ); + if ($white_list[$this->control_name] && in_array($this->control_func, $white_list[$this->control_name])) return true; + } + //登陆检查 $needlogin = true; if ($this->control_name == 'index') { @@ -83,12 +95,6 @@ $needlogin = false; } - if($_POST['str'] == FREE_LOGIN_STR){ - $needlogin = false; - - if($this->control_name !== 'weibo' || $this->control_func == 'home') $this->ajax_json(false, '暂无权限'); - } - if($_GET['str'] == FREE_DOWNLOAD_STR && $this->control_name == 'index' && $this->control_func == 'down_mp_article'){ $needlogin = false; }