This commit is contained in:
@@ -42,6 +42,7 @@ class ThemeConfigModel
|
||||
|
||||
if ($config !== false && $config !== null) {
|
||||
// 缓存命中
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user