Sfoglia il codice sorgente

feat:loadDistData

igb 4 mesi fa
parent
commit
e6e6caf08c
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      app/Http/Middleware/LoadDistData.php

+ 5 - 2
app/Http/Middleware/LoadDistData.php

@@ -35,8 +35,11 @@ class LoadDistData
         }
 
         // 检查模板是否需要更新
-        if (  !$dist->publishList->template_local_code ||
-            $dist->publishList->template_update_code !== $dist->publishList->template_local_code) {
+        if (
+            !$dist?->publishList?->template_local_code ||
+            !empty($dist?->publishList?->template_update_code) ||
+            $dist?->publishList?->template_update_code !== $dist?->publishList?->template_local_code
+        ) {
 
             // dd('update template');
             // 更新模板