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; }