import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/${moduleName}/${pathName}/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/${moduleName}/${pathName}',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/${moduleName}/${pathName}/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/${moduleName}/${pathName}/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/${moduleName}/${pathName}',
    method: 'put',
    data: obj
  })
}
