| | |
| | | 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: { |
| | |
| | | } |
| | | |
| | | /** 查询菜单详情 GET /api/user/menu/getMenu */ |
| | | export async function menuGetMenu(body: API.GetMenuQuery, options?: API.RequestConfig) { |
| | | export async function getMenu( |
| | | // 叠加生成的Param类型 (非body参数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( |
| | | // 叠加生成的Param类型 (非body参数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', |
| | | }, |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 保存菜单 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', |
| | |
| | | ...(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 || {}), |
| | | }); |
| | | } |