From 8e94e3f60a91e536d69e643b4dc13804b79370bc Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期二, 05 八月 2025 17:40:06 +0800
Subject: [PATCH] feat: 页面

---
 src/services/api/menu.ts |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 51 insertions(+), 9 deletions(-)

diff --git a/src/services/api/menu.ts b/src/services/api/menu.ts
index d122313..c0caa44 100644
--- a/src/services/api/menu.ts
+++ b/src/services/api/menu.ts
@@ -3,7 +3,7 @@
 import { request } from '@/utils/request';
 
 /** 鍒犻櫎鑿滃崟 DELETE /api/user/menu/deleteMenu */
-export async function menuDeleteMenu(body: API.DeleteMenuCommand, options?: API.RequestConfig) {
+export async function deleteMenu(body: API.DeleteMenuCommand, options?: API.RequestConfig) {
   return request<number>('/api/user/menu/deleteMenu', {
     method: 'DELETE',
     headers: {
@@ -15,21 +15,39 @@
 }
 
 /** 鏌ヨ鑿滃崟璇︽儏 GET /api/user/menu/getMenu */
-export async function menuGetMenu(body: API.GetMenuQuery, options?: API.RequestConfig) {
+export async function getMenu(
+  // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
+  params: API.APIgetMenuParams,
+  options?: API.RequestConfig
+) {
   return request<API.GetMenuQueryResult>('/api/user/menu/getMenu', {
     method: 'GET',
-    headers: {
-      'Content-Type': 'application/json-patch+json',
+    params: {
+      ...params,
     },
-    data: body,
     ...(options || {}),
   });
 }
 
 /** 鏌ヨ鑿滃崟鍒楄〃 GET /api/user/menu/getMenus */
-export async function menuGetMenus(body: API.GetMenusQuery, options?: API.RequestConfig) {
+export async function getMenus(
+  // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
+  params: API.APIgetMenusParams,
+  options?: API.RequestConfig
+) {
   return request<API.GetMenusQueryResultItem[]>('/api/user/menu/getMenus', {
     method: 'GET',
+    params: {
+      ...params,
+    },
+    ...(options || {}),
+  });
+}
+
+/** 淇濆瓨鑿滃崟 POST /api/user/menu/saveMenu */
+export async function saveMenu(body: API.SaveMenuCommand, options?: API.RequestConfig) {
+  return request<string>('/api/user/menu/saveMenu', {
+    method: 'POST',
     headers: {
       'Content-Type': 'application/json-patch+json',
     },
@@ -38,9 +56,9 @@
   });
 }
 
-/** 淇濆瓨鑿滃崟 POST /api/user/menu/saveMenu */
-export async function menuSaveMenu(body: API.SaveMenuCommand, options?: API.RequestConfig) {
-  return request<string>('/api/user/menu/saveMenu', {
+/** 淇濆瓨鑿滃崟鎸夐挳 POST /api/user/menu/saveMenuButton */
+export async function saveMenuButton(body: API.SaveMenuButtonCommand, options?: API.RequestConfig) {
+  return request<string>('/api/user/menu/saveMenuButton', {
     method: 'POST',
     headers: {
       'Content-Type': 'application/json-patch+json',
@@ -49,3 +67,27 @@
     ...(options || {}),
   });
 }
+
+/** 淇濆瓨鑿滃崟瀛楁 POST /api/user/menu/saveMenuField */
+export async function saveMenuField(body: API.SaveMenuFieldCommand, options?: API.RequestConfig) {
+  return request<string>('/api/user/menu/saveMenuField', {
+    method: 'POST',
+    headers: {
+      'Content-Type': 'application/json-patch+json',
+    },
+    data: body,
+    ...(options || {}),
+  });
+}
+
+/** 璁剧疆鑿滃崟鍒囨崲淇℃伅 PUT /api/user/menu/setMenuSwitch */
+export async function setMenuSwitch(body: API.SetMenuSwitchCommand, options?: API.RequestConfig) {
+  return request<number>('/api/user/menu/setMenuSwitch', {
+    method: 'PUT',
+    headers: {
+      'Content-Type': 'application/json-patch+json',
+    },
+    data: body,
+    ...(options || {}),
+  });
+}

--
Gitblit v1.9.1