import axios from '../axios'

export function updateSysmenu({ id, enable, type }) {
  return axios.post('/sysMenu/update', null, {
    params: { id, enable, type }
  })
}

export function getAllMenusTree() {
  return axios.get('sysSaasMenu/getAllMenusTree')
}
export function getApplication() {
  return axios.get('businessAppInfo/getAppInfo')
}
export function addMenu(data) {
  return axios.post('sysSaasMenu/add', data)
}

export function updateMenu(data) {
  return axios.post('sysSaasMenu/update', data)
}

export function deleteMenu(id) {
  return axios.post(`sysSaasMenu/delete/${id}`)
}
export function getSimpleByPage() {
  return axios.post('sys/domain/getSimpleByPage', {
    currentPage: 1,
    pageSize: 100
  })
}
