import request from '@/utils/request'

// 查询子菜单列表
export function listSubmenu(query) {
  return request({
    url: '/goods/submenu/list',
    method: 'get',
    params: query
  })
}

// 查询子菜单详细
export function getSubmenu(submenuId) {
  return request({
    url: '/goods/submenu/' + submenuId,
    method: 'get'
  })
}

// 新增子菜单
export function addSubmenu(data) {
  return request({
    url: '/goods/submenu',
    method: 'post',
    data: data
  })
}

// 修改子菜单
export function updateSubmenu(data) {
  return request({
    url: '/goods/submenu',
    method: 'put',
    data: data
  })
}

// 删除子菜单
export function delSubmenu(submenuId) {
  return request({
    url: '/goods/submenu/' + submenuId,
    method: 'delete'
  })
}
