moshaorui 3 months ago
parent
commit
4f82ae24f8
2 changed files with 3 additions and 2 deletions
  1. 1 1
      app/Services/PreviewTemplateUpdater.php
  2. 2 1
      app/Services/TemplateUpdater.php

+ 1 - 1
app/Services/PreviewTemplateUpdater.php

@@ -25,7 +25,7 @@ class PreviewTemplateUpdater
 
         // 使用默认值的函数封装,避免重复逻辑
         $template_dist_id = $dist->id ?? trim(config('liquid.template_dist_id'));
-        $template_name = $dist->appearance->file_name;
+        $template_name = $dist->appearance->folder;
 
         if (self::$baseTemplatePath === null) {
             self::$baseTemplatePath = rtrim(config('liquid.preview_template_path'), '/') . '/' .

+ 2 - 1
app/Services/TemplateUpdater.php

@@ -27,13 +27,14 @@ class TemplateUpdater
 
         // 使用默认值的函数封装,避免重复逻辑
         $template_dist_id = $dist->id ?? trim(config('liquid.template_dist_id'));
-        $template_name = $dist->appearance->file_name ?? trim(config('liquid.template_name'));
+        $template_name = $dist->appearance->folder ?? trim(config('liquid.template_name'));
 
         if (self::$baseTemplatePath === null) {
             self::$baseTemplatePath = rtrim(config('liquid.template_path'), '/') . '/' .
                 trim($template_dist_id). '/' .
                 ltrim($template_name, '/');
         }
+        echo $template_name;exit;
 
         // 查询 dist_appearance_publish_list 表的记录
         $publishList = DistAppearancePublishList::where('dist_id', $dist->id)