kphcdr hace 1 año
padre
commit
714293b9b5
Se han modificado 2 ficheros con 46 adiciones y 0 borrados
  1. 43 0
      app/Modules/Mini/Controllers/PageController.php
  2. 3 0
      routes/mini.php

+ 43 - 0
app/Modules/Mini/Controllers/PageController.php

@@ -18,6 +18,34 @@ class PageController extends BaseController
         $this->service = $service;
     }
 
+    public function filterConfig()
+    {
+        return $this->ok([
+            [
+                "id" => 1,
+                "name" => "类目示例",
+                "type" => "category",
+                "child" => [
+                    [
+                        "id" => 1,
+                        "name" => "名称",
+                    ],
+                ],
+            ],
+            [
+                "id" => 1,
+                "name" => "属性示例",
+                "type" => "attr",
+                "child" => [
+                    [
+                        "id" => 1,
+                        "name" => "名称",
+                    ],
+                ],
+            ],
+        ]);
+    }
+
     public function home()
     {
         return $this->ok([
@@ -51,6 +79,21 @@ class PageController extends BaseController
         ]);
     }
 
+    public function categoryGoods()
+    {
+        return $this->ok([
+            "total" => 1,
+            "page_total" => 1,
+            "list" => [
+                [
+                    "id" => 1,
+                    "name" => "商品名称",
+                    "thumb" => Image::imageUrl(),
+                ],
+            ],
+        ]);
+    }
+
     public function categoryTree()
     {
         return $this->ok([

+ 3 - 0
routes/mini.php

@@ -11,3 +11,6 @@ Route::post("/auth/decryptPhone", [\App\Modules\Mini\Controllers\AuthController:
 
 Route::get("/page/home", [\App\Modules\Mini\Controllers\PageController::class, "home"]);
 Route::get("/page/categoryTree", [\App\Modules\Mini\Controllers\PageController::class, "categoryTree"]);
+Route::get("/page/categoryGoods", [\App\Modules\Mini\Controllers\PageController::class, "categoryGoods"]);
+Route::get("/page/filterConfig", [\App\Modules\Mini\Controllers\PageController::class, "filterConfig"]);
+