import request from '@/utils/request'

const api = {
  page: '/system/admin/manage/page',
  info: '/system/admin/manage',
  edit: '/system/admin/manage'
}

export function fetchAdminMenuPage(params) {
  return request({
    url: api.page,
    method: 'get',
    params
  })
}

export function fetchAdminMenuInfo(id) {
  return request({
    url: `${api.info}/${id}`,
    method: 'get'
  })
}

export function editAdminMenu(data) {
  return request({
    url: api.edit,
    method: 'put',
    data
  })
}
