import request from '@/utils/request'

// request.defaults.baseURL = '/ezhizao-yzbh-sys'
// 查询模块管理列表
export function listModule(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/system/module/list',
    method: 'get',
    params: query
  })
}

// 查询模块管理详细
export function getModule(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/system/module/' + id,
    method: 'get'
  })
}

// 新增模块管理
export function addModule(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/system/module',
    method: 'post',
    data: data
  })
}

// 修改模块管理
export function updateModule(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/system/module',
    method: 'put',
    data: data
  })
}

// 删除模块管理
export function delModule(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/system/module/' + id,
    method: 'delete'
  })
}
