import request from '@/utils/request'

export function addOrUpdateMenu(param) {
  return request({
    url: '/Menu/addOrUpdateMenu',
    method: 'post',
    data: param
  })
}

export function getMenuTree(param) {
  return request({
    url: '/Menu/getMenuTree',
    method: 'get'
  })
}

export function getMenuList(param) {
  return request({
    url: `/Menu/getMenuList`,
    method: 'post',
    data: param
  })
}

export function deleteMenu(menuId) {
  return request({
    url: `/Menu/deleteMenu/${menuId}`,
    method: 'delete'
  })
}
