Explorar o código

Merge branch '20250522_diywebfr'

the_bug hai 3 días
pai
achega
d948777da0
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      app/JsonRpc/PublicRpcService.php

+ 5 - 1
app/JsonRpc/PublicRpcService.php

@@ -1268,7 +1268,11 @@ class PublicRpcService implements PublicRpcServiceInterface
             return Result::error('暂无底部导航数据!');
         }
         $page_type = WebsiteTemplateInfo::where('website_id', $data['website_id'])->value('page_type');
-        $page_type = json_decode($page_type,true);
+        if(empty($page_type)){
+            $page_type = [];
+        }else{
+            $page_type = json_decode($page_type,true);
+        }
         // '网站页面类型(存数组)1:首页 2:分类页 3:列表页 4:详情页 5:搜索页 6:特殊列表 7:特殊详情页
         if(isset($page_type) && in_array(5,$page_type)){
             $page_type = 1;