import { request } from '../utils/http'
import { ApplyAuthType, MessageListParamsType, CommentReceiveType, CommentListParamsType, ChangeUserInfoType, ChangePwdType, EditPhoneType, Prescription_expressType, Add_withdrawType, AddBankCardInfoType, FeedBackParamsType, BindUserCardType, RecordsInvitePaper, doctorLoginWithPwdType, doctorPhoneEasyLoginType } from '../types'

// 公共
export const getDepartment = (data: { keyword: string }) => request({ url: '/consultation/department', method: 'GET', data }) // 获取科室
export const getCareer = (data?: { keyword: string }) => request({ url: '/consultation/career', method: 'GET', data }) // 获取职称
export const appUpload = () => request({ url: '/sys/common/upload', method: 'GET' }) // 上传
export const getSendMessage = () => request({ url: '/pet/login/sendMessage', method: 'GET' }) // 发送验证码
export const getMessageLogin = (data) => request({ url: '/pet/login/messageLogin', method: 'GET', data }) // 验证码登录
export const getFeedtype = () => request({ url: '/veterinary/feedtype', method: 'GET' }) // 反馈类型
export const updateFeedback = (data: FeedBackParamsType) => request({ url: '/veterinary/feedback', method: 'POST', data }) // 意见反馈
export const getRandomImage = (data: number | string) => request({ url: `/sys/randomImage/${data}`, method: 'GET' }) // 获取图形验证码
export const doctorLoginWithPwd = (data: doctorLoginWithPwdType) => request({ url: '/pet/login/doctorLoginWithPwd', method: 'POST', data }) // 兽医端账号密码登录
export const doctorPhoneEasyLogin = (data: doctorPhoneEasyLoginType) => request({ url: '/pet/login/doctorPhoneEasyLogin', method: 'POST', data }) // 兽医端一键登录
export const outLogin = () => request({ url: '/doctor/outLogin', method: 'GET' }) // 退出登录
export const getOrder_chat = (data: { id: string | number }) => request({ url: '/consultation/order_chat', method: 'GET', data }) // im聊天记录

// 首页
export const getStart = () => request({ url: '/veterinary/start', method: 'GET' }) // 开屏页
export const getIndex = () => request({ url: '/veterinary/index', method: 'GET' }) // 首页
export const updateRegister = (data: ApplyAuthType) => request({ url: '/veterinary/apply_veterinary', method: 'POST', data }) // 提交认证
export const get_veterinary = () => request({ url: '/veterinary/get_veterinary', method: 'GET' }) // 获取认证信息
export const updateChange_state = (data) => request({ url: '/veterinary/change_state', method: 'POST', data }) // 更改接诊状态
export const getHospital = (data: { keyword: string }) => request({ url: '/veterinary/hospital', method: 'GET', data }) // 坐诊医院
export const getConsultation_fee_detail = () => request({ url: '/veterinary/consultation_fee_detai', method: 'GET' }) // 诊费明细
export const getState = () => request({ url: '/veterinary/getState', method: 'GET' }) // 获取接诊状态详情
export const getPingJiaRemark = () => request({ url: '/veterinary/getPingJiaRemark', method: 'GET' }) // 获取评价备注

// 问诊及处方
export const getConsultation_information_list = (data: any) => request({ url: '/veterinary/consultation_information_list', method: 'GET', data }) // 问诊订单
export const getConsultation_information_detail = (data: any) => request({ url: '/veterinary/consultation_information_detail', method: 'GET', data }) // 问诊订单详情
export const getPrescription_list = (data: any) => request({ url: '/veterinary/prescription_list', method: 'GET', data }) // 处方订单
export const getPrescription_detail = (data: any) => request({ url: '/veterinary/prescription_detail', method: 'GET', data }) // 处方订单详情
export const updataPrescription_express = (data: Prescription_expressType) => request({ url: '/veterinary/prescription_express', method: 'POST', data }) // 填写快递单号 -- 处方单
export const updatePrescription_renew_express = (data: Prescription_expressType) => request({ url: '/veterinary/prescription_renew_express', method: 'POST', data }) // 填写快递单号 -- 续方单
export const getOrder_renew_list = (data: any) => request({ url: '/veterinary/order_renew_list', method: 'GET', data }) // 续方订单
export const getOrder_renew_examine = (data: any) => request({ url: '/veterinary/order_renew_examine', method: 'POST', data }) // 续方订单审核
export const updateSend_prescription_form = (data: any) => request({ url: '/veterinary/send_prescription_form', method: 'POST', data }) // 发送处方单
export const getPrescription_detail_information = (data: { id: string | number }) => request({ url: '/veterinary/prescription_detail_information', method: 'GET', data }) // 问诊订单 查看处方单详情
export const getEndInformation = (data: { id: string | number }) => request({ url: '/publicIm/endInformation', method: 'GET', data }) // 结束问诊
export const getReceive_diagnosis = (data: { id: string | number }) => request({ url: '/veterinary/receive_diagnosis', method: 'GET', data }) // 问诊订单接诊
export const getPrescription_detail_information_renew = (data: { orderRenewId: string | number }) => request({ url: '/veterinary/prescription_detail_information_renew', method: 'GET', data }) // 续方订单详情

// 我的
export const getPaper_basedata = () => request({ url: '/veterinary/paper_basedata', method: 'GET' }) // 海报文字及图片
export const getInvite = () => request({ url: '/veterinary/invite', method: 'GET' }) // 邀请分享
export const getMy = () => request({ url: '/veterinary/my', method: 'GET' }) // 个人资料
export const getUserInfo = () => request({ url: '/veterinary/userinfo', method: 'GET' }) // 个人资料
export const getIncome = () => request({ url: '/veterinary/income', method: 'GET' }) // 我的收入
export const getIncome_list = (data: any) => request({ url: '/veterinary/income_list', method: 'GET', data }) // 收入明细
export const updateChange_userinfo = (data: ChangeUserInfoType) => request({ url: '/veterinary/change_userinfo', method: 'POST', data }) // 修改个人资料
export const updateChange_phone = (data: EditPhoneType) => request({ url: '/veterinary/change_phone', method: 'POST', data }) // 修改手机号
export const updateChange_invite_paper = (data: RecordsInvitePaper) => request({ url: '/veterinary/invite_paper', method: 'POST', data }) // 记录用户分享海报
export const updateChange_pwd = (data: ChangePwdType) => request({ url: '/veterinary/change_pwd', method: 'POST', data }) // 修改密码
export const fetchDelUser = () => request({ url: '/veterinary/delUser', method: 'GET' }) // 注销账号

// 消息
export const getMsg_count = () => request({ url: '/veterinary/msg_count', method: 'GET' }) // 未读消息数量
export const getMsg_list = (data: MessageListParamsType) => request({ url: '/veterinary/msg_list', method: 'GET', data }) // 消息通知
export const getis_all_read = (data: { type: string | number }) => request({ url: '/veterinary/is_all_read', method: 'GET', data }) // 一键已读
export const getMsg_detail = (data: { id: string }) => request({ url: '/veterinary/msg_detail', method: 'GET', data }) // 消息详情
export const getComment_list = (data: CommentListParamsType) => request({ url: '/veterinary/comment_list', method: 'GET', data }) // 我的评价列表
export const updateComment_receive = (data: CommentReceiveType) => request({ url: '/veterinary/comment_receive', method: 'POST', data }) // 回复评价

// 提现
export const getBank_list = () => request({ url: '/veterinary/bank_list', method: 'GET' }) // 银行卡列表
export const updateAdd_bank = (data: AddBankCardInfoType) => request({ url: '/veterinary/add_bank', method: 'POST', data }) // 添加银行卡
export const updateEdit_bank = (data: AddBankCardInfoType) => request({ url: '/veterinary/edit_bank', method: 'PUT', data }) // 编辑银行卡信息
export const delete_bank = (data: { id: string | number }) => request({ url: '/veterinary/delete_bank', method: 'DELETE', data }) // 删除银行卡
export const updateAdd_withdraw = (data: Add_withdrawType) => request({ url: '/veterinary/add_withdraw', method: 'POST', data }) // 申请提现
export const updateBindUserCard = (data: BindUserCardType) => request({ url: '/veterinary/bindUserCard', method: 'POST', data }) // 绑定账户
export const getUserCard = () => request({ url: '/veterinary/getUserCard', method: 'GET' }) // 获取用户支付宝和微信账号