Prechádzať zdrojové kódy

自助建站-ai会话-给模板添加导航

FengR 1 mesiac pred
rodič
commit
77f0e57029
1 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  1. 5 1
      app/JsonRpc/PublicRpcService.php

+ 5 - 1
app/JsonRpc/PublicRpcService.php

@@ -5075,7 +5075,11 @@ class PublicRpcService implements PublicRpcServiceInterface
                     $componentList[$key][$k] = $v ?? [];
                     if (isset($v['componentData']['level']) && (empty($v['componentData']['level']) || $v['componentData']['level'] == "")) {
                         $componentList[$key][$k]['componentData']['name'] = $all_cate[$cat_key]['alias'] ?? '';
-                        $componentList[$key][$k]['componentData']['category_arr'] = json_decode($all_cate[$cat_key]['category_arr_id'], true) ?? '';
+                        $category_arr = json_decode($all_cate[$cat_key]['real_category_arr_id'], true) ?? [];
+                        if(empty($category_arr)){
+                            $category_arr = json_decode($all_cate[$cat_key]['category_arr_id'], true) ?? [];
+                        }
+                        $componentList[$key][$k]['componentData']['category_arr'] = $category_arr ?? [];
                         $componentList[$key][$k]['componentData']['category_id'] = $all_cate[$cat_key]['category_id'] ?? '';
                         $cat_key++;
                         $template_index[$key]['componentList'][$k] = $componentList[$key][$k] ?? [];