This commit is contained in:
@@ -42,7 +42,8 @@ class ThemeConfigModel
|
|||||||
|
|
||||||
if ($config !== false && $config !== null) {
|
if ($config !== false && $config !== null) {
|
||||||
// 缓存命中
|
// 缓存命中
|
||||||
return $config;
|
error_log('ThemeConfigModel::getConfig() - 返回banner数: ' . count($config['banner'] ?? []));
|
||||||
|
return $config;
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
// 缓存系统异常,继续从数据库读取
|
// 缓存系统异常,继续从数据库读取
|
||||||
@@ -51,6 +52,11 @@ class ThemeConfigModel
|
|||||||
|
|
||||||
// 缓存未命中,从数据库读取
|
// 缓存未命中,从数据库读取
|
||||||
$row = $this->query()->order('id', 'asc')->find();
|
$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) {
|
if (!$row) {
|
||||||
$config = $this->defaultConfig();
|
$config = $this->defaultConfig();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user