diff --git a/plugins/addon/theme_configurator/model/ThemeConfigModel.php b/plugins/addon/theme_configurator/model/ThemeConfigModel.php index 90970d8..b42f39f 100644 --- a/plugins/addon/theme_configurator/model/ThemeConfigModel.php +++ b/plugins/addon/theme_configurator/model/ThemeConfigModel.php @@ -42,7 +42,8 @@ class ThemeConfigModel if ($config !== false && $config !== null) { // 缓存命中 - return $config; + error_log('ThemeConfigModel::getConfig() - 返回banner数: ' . count($config['banner'] ?? [])); + return $config; } } catch (\Throwable $e) { // 缓存系统异常,继续从数据库读取 @@ -51,6 +52,11 @@ class ThemeConfigModel // 缓存未命中,从数据库读取 $row = $this->query()->order('id', 'asc')->find(); + error_log('ThemeConfigModel::getConfig() - 查询结果: ' . ($row ? 'found' : 'not found')); + if ($row) { + error_log('config字段长度: ' . strlen($row['config'])); + error_log('config前100字符: ' . substr($row['config'], 0, 100)); + } if (!$row) { $config = $this->defaultConfig(); } else {