update: route data struct & remove google analytics

This commit is contained in:
tokumeikoi
2022-12-17 21:37:08 +08:00
parent 5fc49dc840
commit 99311e12a5
12 changed files with 84 additions and 15 deletions

View File

@ -18,9 +18,10 @@ class ThemeService
public function init()
{
$themeConfigFile = $this->path . "{$this->theme}/config.php";
if (!File::exists($themeConfigFile)) return;
$themeConfig = include($themeConfigFile);
$themeConfigFile = $this->path . "{$this->theme}/config.json";
if (!File::exists($themeConfigFile)) abort(500, "{$this->theme}主题不存在");
$themeConfig = json_decode(File::get($themeConfigFile), true);
if (!isset($themeConfig['configs']) || !is_array($themeConfig)) abort(500, "{$this->theme}主题配置文件有误");
$configs = $themeConfig['configs'];
$data = [];
foreach ($configs as $config) {