import request from '@/utils/request'

const api = {
  managerList: 'system/user/list',
  projectList: 'test/project/projectList',
  addProject: 'test/project/addProject',
  delProject: 'test/project/delProject',
  getProjectDetail: 'test/project/projectDetail',
  updateProject: 'test/project/editProject'
}

export function managerList(data) {
  return request({
    url: api.managerList,
    method: 'get',
    data
  })
}

export function getProjectList(data) {
  return request({
    url: api.projectList,
    method: 'get',
    params: data
  })
}

export function addProject(data) {
  return request({
    url: api.addProject,
    method: 'post',
    data
  })
}

export function delProject(id) {
  return request({
    url: api.delProject,
    method: 'post',
    data: {id}
  })
}


export function getProjectDetail(id) {
  return request({
    url: api.getProjectDetail,
    method: 'post',
    data: {id}
  })
}

export function updateProject(data) {
  return request({
    url: api.updateProject,
    method: 'post',
    data:data
  })
}

