import request from '@/utils/request'

// 查询项目成员列表
export function listMember(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/member/list',
    method: 'get',
    params: query
  })
}

// 查询项目成员详细
export function getMember(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/member/' + id,
    method: 'get'
  })
}

// 新增项目成员
export function addMember(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/member',
    method: 'post',
    data: data
  })
}

// 修改项目成员
export function updateMember(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/member',
    method: 'put',
    data: data
  })
}

// 删除项目成员
export function delMember(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/member/' + id,
    method: 'delete'
  })
}
