import request from "@/utils/request";

const BASE_URL = "/sf-work/team";

// 团队列表
export function doctorTeamListApi(params) {
  return request({
    url: `${BASE_URL}/page`,
    method: 'get',
    params
  })
}

// 团队详情
export function detailTeamApi(id) {
  return request({
    url: `${BASE_URL}/detail/${id}`,
    method: 'get'
  })
}

// 删除团队
export function delDoctorTeamApi(id) {
  return request({
    url: `${BASE_URL}/del/${id}`,
    method: 'post',
    // headers: {
    //   "Content-Type": "application/x-www-form-urlencoded"
    // }
  });
};

// 创建-修改团队
export function updateDoctorTeamApi(data) {
  return request({
    url: `${BASE_URL}/save`,
    method: 'post',
    data,
  });
};

// 查看团队成员
export function getDoctorTeamMemberApi(id) {
  return request({
    url: `${BASE_URL}/persons/${id}`,
    method: 'get'
  })
}
