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); //加载当前控制器语言包