import request from '@/utils/request'

export function login(account, password,type,code,uuid) {
  const data = {
    account,
    password,
    type,
    code,
    uuid
  }
  return request({
    url: '/app/doctor/loginByWeb',
    method: 'post',
    data: data
  })
}
export function getDoctorDetails() {
  return request({
    url: '/app/doctor/getDoctorDetails',
    method: 'get',
  })
}

// 获取用户详细信息
export function getInfo() {
  return request({
    url: '/app/doctor/getDoctorInfo',
    method: 'get'
  })
}

// 获取用户详细信息
export function getDoctorInquiryImg() {
  return request({
    url: '/app/doctor/getDoctorInquiryImg',
    method: 'get'
  })
}

export function editPwd(oldPassword, newPassword) {
  const data = {
    oldPassword,
    newPassword
  }
  return request({
    url: '/app/doctor/editPwd',
    method: 'post',
    data: data
  })
}

export function editDoctor(data) {
  return request({
    url: '/app/doctor/editDoctor',
    method: 'post',
    data: data
  })
}

export function editExtract(data) {
  return request({
    url: '/app/doctor/editExtract',
    method: 'post',
    data: data
  })
}

export function extract(data) {
  return request({
    url: '/app/doctor/extract',
    method: 'post',
    data: data
  })
}

export function sendSmsCode() {
  return request({
    url: '/app/doctor/sendSmsCode',
    method: 'post',
  })
}

export function editDoctorInfo(data) {
  return request({
    url: '/app/doctor/editDoctorInfo',
    method: 'post',
    data: data
  })
}

// 生成药师签名上传二维码
export function getSignQrCode() {
  return request({
    url: '/app/doctor/getSignQrCode',
    method: 'get'
  })
}
