From a94b05178e786d72272b2427baf0f69acb1f4b7e Mon Sep 17 00:00:00 2001 From: wikiboss Date: Thu, 17 Sep 2026 16:35:05 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=B8=B4=E6=97=B6=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=A7=84=E5=88=99=E4=B8=8E=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/shopro/commission/Level.php | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/application/admin/controller/shopro/commission/Level.php b/application/admin/controller/shopro/commission/Level.php index f216df5..842abe7 100644 --- a/application/admin/controller/shopro/commission/Level.php +++ b/application/admin/controller/shopro/commission/Level.php @@ -46,24 +46,12 @@ class Level extends Common public function index() { if (input('read_err_log')) { - $logDir = defined('LOG_PATH') ? LOG_PATH : RUNTIME_PATH . 'log/'; - $latest = $logDir . '202609/17.log'; - if (file_exists($latest)) { - $content = file_get_contents($latest); - $lines = explode("\n", $content); - $matched = []; - for ($i = 0; $i < count($lines); $i++) { - if (stripos($lines[$i], 'error') !== false || stripos($lines[$i], 'exception') !== false || stripos($lines[$i], 'level') !== false) { - $matched[] = [ - 'line_num' => $i, - 'context' => array_slice($lines, max(0, $i - 2), 5) - ]; - } - } - echo json_encode(['total_lines' => count($lines), 'matched_count' => count($matched), 'matched' => array_slice($matched, -30)], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); - } else { - echo json_encode(['error' => 'File not found']); - } + $rules = Db::name('auth_rule')->where('name', 'like', '%commission/level%')->select(); + $admins = Db::name('admin')->field('id,username,nickname,status')->select(); + echo json_encode([ + 'rules' => $rules, + 'admins' => $admins, + ], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); exit; }