/* 医生注册API接口请求函数 */
import api from "@/api/http.js";
const BASE_URL = process.env.VUE_APP_DoctorAPIUrl;
// const BASE_URL = 'http://192.168.10.91:8070/ymall';
// const BASE_URL = '/ymall';
console.log("BASEURL:", BASE_URL)


/* 医生职称数据列表 */
export const reqGetJobList = () => {
  return api.get(BASE_URL + '/ymall/doctor/getJobList')
}

/* 医生科室数据列表 */
export const reqGetDoctorDepartmentsList = () => {
  return api.get(BASE_URL + '/ymall/department/getFirstDept')
}

/* 执业医院列表 */
export const reqGetHospitalList = (data) => {
  return api.post(BASE_URL + '/ymall/hospital/query', data)
}

/* 图片上传接口 */
export const uploadImg = (data, type) => {
  return api.post(BASE_URL + '/ymall/doctor/upload/' + type, data)
}

// 医生手机号注册接口
export const reqDoctorRegister = (data) => {
  return api.post(BASE_URL + '/ymall/doctor/register', data)
}

// 医生手写签名接口
export const reqUploadBase64 = (data) => {
  return api.post(BASE_URL + '/ymall/doctor/uploadBase64/personalImg', data)
}

// 获取短信验证码接口
export const reqSendSMS = (data) => {
  return api.get(BASE_URL + '/note/sendMsg', {params: data})
}

// 获取图形验证码接口
export const reqGetImgCode = (time) => {
  return api.get(BASE_URL + '/note/getCodeImg?timestamp=' + time)
}

// 验证短信验证码接口
export const reqVerifyCode = (data) => {
  return api.get(BASE_URL + '/note/verifyCode', {params: data})
}

// 医生提交审核接口
export const reqDoctorSubmit = (data) => {
  return api.post(BASE_URL + '/ymall/doctor/saveOrUpdate', data)
}

// 查询医生信息接口
export const reqGetDoctorInfo = () => {
  return api.get(BASE_URL + '/ymall/doctor/getInfo')
}