/*
 * @Author: zc
 * @description 系统管理- 菜单配置
 */
import request from '@/utils/request';
/**
 * @description 获取所有菜单列表
 * @param {object} params
 * @return {*}
 */
export const getMenuList = (params?: object) => {
	return request({
		url: '/api/v1/Sys/getmenujson',
		method: 'get',
		params,
	});
};
/**
 * @description 新增菜单
 * @param {object} params
 * @return {*}
 */
export const addMenu = (params: object) => {
	return request({
		url: '/api/v1/Sys/add-menu',
		method: 'post',
		data: params,
	});
};
/**
 * @description 更新菜单修改
 * @param {object} params
 * @return {*}
 */
export const updateMenu = (params: object) => {
	return request({
		url: '/api/v1/Sys/update-menu',
		method: 'post',
		data: params,
	});
};
/**
 * @description 删除菜单
 * @param {object} id
 * @return {*}
 */
export const removeMenu = (id: string) => {
	return request({
		url: `/api/v1/Sys/removemenu/${id}`,
		method: 'delete',
	});
};
/**
 * @description 获取菜单详情根据id
 * @param {object} id
 * @return {*}
 */
export const getMenuById = (id: string) => {
	return request({
		url: `/api/v1/Sys/menu/${id}`,
		method: 'get',
	});
};
