diff --git a/index.php b/index.php index 4b226cf..b4c0b81 100644 --- a/index.php +++ b/index.php @@ -48,15 +48,6 @@ if(!in_array($c,[$global_config["Register"],'ico','icon'])){ $_GET['u'] = $global_config['static_link'] == 2 ? get_db("global_user", "User", ["ID"=>$UUID]) : $UUID; } $u = Get('u'); - if(empty($u) && $global_config['Sub_domain'] == 1 && is_subscribe('bool')){ - $cut = explode('.',$_SERVER["HTTP_HOST"]); - if(count($cut) == 3){ - $USER_DB = get_db("global_user", "*", ["User"=>reset($cut)]); - if(!empty($USER_DB) && check_purview('Sub_domain',1)){ - $_COOKIE['Default_User'] = $USER_DB['User'];unset($cut); - } - } - } $u = !empty($u)?$u:(!empty($_COOKIE['Default_User'])?$_COOKIE['Default_User']:(!empty($global_config['Default_User'])?$global_config['Default_User']:'admin'));//优先级:Get>Host>Cookie>默认用户>admin $USER_DB = get_db("global_user", "*", ["User"=>$u]); //没找到账号显示404 diff --git a/system/api_root.php b/system/api_root.php index 8f5586c..cbf27e5 100644 --- a/system/api_root.php +++ b/system/api_root.php @@ -456,7 +456,8 @@ function other_services(){ 'order_id' => isset($_POST['order_id']) ? $_POST['order_id'] : "", 'sysver' => SysVer, 'ip' => Get_IP(), - 'method' => $_GET['type'] + 'method' => $_GET['type'], + 'sys' => $_POST['sys'] ]; $overtime = !isset($global_config['Update_Overtime']) ? 3 : ($global_config['Update_Overtime'] < 3 || $global_config['Update_Overtime'] > 60 ? 3 : $global_config['Update_Overtime']); // 判断操作类型 @@ -514,7 +515,7 @@ function other_services(){ //如果不为空,则解析数据 if(!empty($Notice)){ $data = json_decode($Notice, true); - $cache_time = 60; //缓存时间(秒); + $cache_time = Debug ? 0 : 60; //缓存时间(秒); $reload = time() > $data["download_time"] + $cache_time; //是否更新 }else{ $reload = true; //需要刷新 @@ -531,6 +532,7 @@ function other_services(){ $new_data['download_time'] = time(); $new_data['version'] = version_compare($new_data['version'],SysVer,'<') ? SysVer : $new_data['version']; write_global_config('notice',json_encode($new_data),'官方公告(缓存)'); + write_global_config('sys_switch',"{$new_data['sys_switch']}",'sys_switch'); $data = $new_data; } } diff --git a/system/version.txt b/system/version.txt index c65ea2a..04f4f46 100644 --- a/system/version.txt +++ b/system/version.txt @@ -1 +1 @@ -v2.1.03-20231019 \ No newline at end of file +v2.1.04-20231029 \ No newline at end of file diff --git a/templates/admin/js/category.js b/templates/admin/js/category.js index 8bcbbda..659e525 100644 --- a/templates/admin/js/category.js +++ b/templates/admin/js/category.js @@ -73,6 +73,7 @@ //分类切换按钮 $("#btn-type").text(type == '&type=all' ?'收起':'展开'); //将一级分类加入下拉框 + let old_val = $("#fid").val(); $("#fid").empty(); $("#fid").append(""); for (i = 0; i < count; i++) { @@ -80,6 +81,8 @@ $("#fid").append(""); } } + $("#fid").val(old_val); + form.render('select'); limit = false; //取消修改限制 layer.closeAll('loading'); //关闭加载层 //加载加密分组数据 diff --git a/templates/admin/page/root/vip.php b/templates/admin/page/root/vip.php index 63410cd..a93760b 100644 --- a/templates/admin/page/root/vip.php +++ b/templates/admin/page/root/vip.php @@ -56,7 +56,18 @@ if(!empty($Notice)){ - + "sys_switch"]) == 'show' && $subscribe['type'] == '3'){ ?> +