import request from '../../utils/request'

export function getAllMzDept() {
  return request({
    url: '/manageDoctorInfo/getAllMzDept',
    method: 'get',
  })
}

export function getAllDoctors(data) {
  return request({
    url: '/manageDoctorInfo/getAllDoctors',
    method: 'post',
    data,
  })
}

export function getAllTitles() {
  return request({
    url: '/manageDoctorInfo/getAllTitles',
    method: 'get',
  })
}

export function getDoctorInfo(code) {
  return request({
    url: '/manageDoctorInfo/getDoctorInfo',
    method: 'get',
    params: { code },
  })
}

export function getDoctorPortrait(code) {
  return request({
    url: '/manageDoctorInfo/getDoctorPortrait',
    method: 'get',
    params: { code },
  })
}

export function saveDoctorInfo(data) {
  return request({
    url: '/manageDoctorInfo/saveDoctorInfo',
    method: 'post',
    data,
  })
}

export function updateDoctorWxHomepageFlag(code, flag) {
  return request({
    url: '/manageDoctorInfo/updateDoctorWxHomepageFlag',
    method: 'get',
    params: { code, flag },
  })
}

export function getAllRecommendDoctors() {
  return request({
    url: '/manageDoctorInfo/getAllRecommendDoctors',
    method: 'get',
  })
}

export function updateWxHomepageOrder(code, order) {
  return request({
    url: '/manageDoctorInfo/updateWxHomepageOrder',
    method: 'get',
    params: { code, order },
  })
}

export function updateDoctorStatus(code, status) {
  return request({
    url: '/manageDoctorInfo/updateDoctorStatus',
    method: 'get',
    params: { code, status },
  })
}
