From 5d131ebffe9bc9f7730999bfa816bb028b5b3e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Mon, 27 Oct 2025 19:11:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E4=BB=A3=E7=A0=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Level.php | 4 ++-- application/common/controller/adminApi.php | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/application/api/model/Level.php b/application/api/model/Level.php index 7aa889a..ac422f0 100644 --- a/application/api/model/Level.php +++ b/application/api/model/Level.php @@ -62,7 +62,7 @@ class Level extends Model //获取等级 // 获取用户当前等级 $currentUserLevel = $user['charm_level']; - if($currentUserLevel == 1){ + if($currentUserLevel == 0){ $level = Db::name('vs_charm_level') ->where('status', 1) ->order('level', 'asc') @@ -152,7 +152,7 @@ class Level extends Model //获取等级 // 获取用户当前等级 $currentUserLevel = $user['wealth_level']; - if($currentUserLevel == 1){ + if($currentUserLevel == 0){ $level = Db::name('vs_wealth_level') ->where('status', 1) ->order('level', 'asc') diff --git a/application/common/controller/adminApi.php b/application/common/controller/adminApi.php index 79a0764..93eebe4 100644 --- a/application/common/controller/adminApi.php +++ b/application/common/controller/adminApi.php @@ -116,14 +116,6 @@ class adminApi extends Controller public function _initialize() { - //只记录POST请求的日志 - if (request()->isPost() && config('myadmin.auto_record_log')) { - $this_auth_rule_name = db('auth_rule')->where('name', substr(xss_clean(strip_tags(request()->url())), 0, 1500))->value('title'); - if(empty($this_auth_rule_name)){ - $this_auth_rule_name = '未知操作'; - } - \app\admin\model\AdminLog::record($this_auth_rule_name); - } $modulename = $this->request->module(); $controllername = Loader::parseName($this->request->controller()); $actionname = strtolower($this->request->action()); @@ -223,7 +215,15 @@ class adminApi extends Controller $config = array_merge($config, Config::get("view_replace_str")); Config::set('upload', array_merge(Config::get('upload'), $upload)); - + //记录日志 + //只记录POST请求的日志 + if (request()->isPost() && config('myadmin.auto_record_log')) { + $this_auth_rule_name = db('auth_rule')->where('name', substr(xss_clean(strip_tags(request()->url())), 0, 1500))->value('title'); + if(empty($this_auth_rule_name)){ + $this_auth_rule_name = '未知操作'; + } + \app\admin\model\AdminLog::record($this_auth_rule_name); + } // 配置信息后 Hook::listen("config_init", $config); //加载当前控制器语言包