import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-system-expand/commonmenu/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/blade-system-expand/commonmenu/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (menuId) => {
  return request({
    url: '/api/blade-system-expand/commonmenu/removeByMenuId',
    method: 'post',
    params: {
      menuId,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/blade-system-expand/commonmenu/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/blade-system-expand/commonmenu/submit',
    method: 'post',
    data: row
  })
}

