Zory 3 weeks ago
parent
commit
d80320bc81

+ 3 - 0
app/controller/admin/Goods.php

@@ -11,4 +11,7 @@ use LinFly\Annotation\Attributes\Route\Middleware;
 class Goods extends Base
 {
 
+
+
+
 }

+ 2 - 1
app/extra/basic/Base.php

@@ -174,7 +174,8 @@ class Base
             $menu['meta'] = [
                 "title"     => $menu['title'],
                 "icon"      => $menu['icon']??'',
-                "type"      => $menu['type']
+                "type"      => $menu['type'],
+                "hidden"    => !($menu['hide'] == 1),
             ];
             if (!empty($menu['children'])) {
                 $menu['children'] = $this->filterMenu($menu['children'],$type,$mch);

+ 1 - 1
app/extra/dyLife/BasicLife.php

@@ -101,7 +101,7 @@ class BasicLife
      */
     public function curlGetApi(string $url = "", array $data = [], string $field = "data"): array
     {
-        $result = Http::asJson()->withHeaders($this->header)->get($this->gateway.$url,$data)->array();
+        $result = Http::asJson()->withProxy("")->withHeaders($this->header)->get($this->gateway.$url,$data)->array();
         if(!empty($result[$field]))
         {
             return $result[$field];

+ 50 - 0
app/service/saas/GoodsService.php

@@ -0,0 +1,50 @@
+<?php
+
+namespace app\service\saas;
+
+use app\extra\basic\Service;
+
+class GoodsService extends Service
+{
+
+    /**
+     * 商品类型
+     * @return array
+     */
+    public function productType(): array
+    {
+        return [
+            ['name' => "团购",'key'   => 1],
+            ['name' => "日历房",'key' => 4],
+            ['name' => "门票",'key'   => 5],
+            ['name' => "代金券",'key'  => 11],
+            ['name' => "新预售",'key'  => 12],
+            ['name' => "次卡",'key' => 15],
+        ];
+    }
+
+    /**
+     *
+     * @return $this
+     */
+    public function setModel()
+    {
+        $this->mode = (new SaasCategory);
+        return $this;
+    }
+
+
+    /**
+     *
+     * @param array $param
+     * @return array
+     */
+    public function searchFilter(array $param = []): array
+    {
+        $filter = [];
+        !empty($param['status']) && $filter[] = ["enable", '=', $param['status']];
+        !empty($param['name']) && $filter[] = ["name", 'like', "%{$param['name']}%"];
+        return $filter;
+    }
+
+}