瀏覽代碼

网站排序

rkljw 1 月之前
父節點
當前提交
e993b104c0
共有 3 個文件被更改,包括 25 次插入0 次删除
  1. 19 0
      app/JsonRpc/WebsiteService.php
  2. 6 0
      app/JsonRpc/WebsiteServiceInterface.php
  3. 0 0
      runtime/container/scan.cache

+ 19 - 0
app/JsonRpc/WebsiteService.php

@@ -2430,4 +2430,23 @@ class WebsiteService implements WebsiteServiceInterface
         }
     }
 
+    /**
+     * 修改网站栏目排序
+     * @param array $data
+     * @return array
+     */
+    public function upWebsiteCategorySort(array $data): array
+    {
+        $where = [
+            'website_id' => $data['website_id'],
+            'id' => $data['id'],
+        ];
+        $result = WebsiteCategory::where($where)->update($data);
+        if ($result) {
+            return Result::success($result);
+        } else {
+            return Result::error("更新失败", 0);
+        }
+    }
+
 }

+ 6 - 0
app/JsonRpc/WebsiteServiceInterface.php

@@ -109,4 +109,10 @@ interface WebsiteServiceInterface
      */
     public function getAllCategory(array $data): array;
 
+    /**
+     * 修改网站栏目排序
+     * @param array $data
+     * @return array
+     */
+    public function upWebsiteCategorySort(array $data): array;
 }

文件差異過大導致無法顯示
+ 0 - 0
runtime/container/scan.cache


部分文件因文件數量過多而無法顯示