瀏覽代碼

修改关联导航池接口

15313670163 3 月之前
父節點
當前提交
ecf3274f4b
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      app/JsonRpc/CollectorService.php

+ 6 - 1
app/JsonRpc/CollectorService.php

@@ -796,12 +796,17 @@ class CollectorService implements CollectorServiceInterface
                     }else{
                         //若不存在则返回所有导航栏目
                         $result = Category::select('id','name')->get();
+                        if(!empty($result->toArray())){
+                            return Result::success($result);
+                        }else{
+                            return Result::error('暂无数据');
+                        }
                     }
                 }
                 
             }
         }
-        if(empty($result->toArray())){
+        if(empty($result)){
             return Result::error('暂无数据');
         }else{
             return  Result::success($result);