import {request} from '../utils/request.js'
function addCase(data){ //添加病例
  return request('/medicalRecord/add','POST',data,true)
};
function caseDetail(id){ //病例详情
    return request('/medicalRecord/getDetail/'+id,'GET',{},true)
};
function editCase(data){ //修改病例
    return request('/medicalRecord/update','POST',data,true)
  };
function caseList(data){ //病例列表
  return request('/medicalRecord/getList','POST',data,true)
};

function getCaptcha(){ //获取图片验证码
    return request('/user/getCaptcha','GET')
};


function getDeal(data){ //获取协议
    return request('/user/getDeal','GET',data)
};
function getInfo(data){ //个人中心
    return request('/user/getInfo','GET',data)
};
function getRubric(data){ //操作说明
    return request('/user/getRubric','GET',data)
};
function sendSms(data){ //发送验证码
    return request('/user/sendSms','POST',data,true)
};
function smsLogin(data){ //短信登录
    return request('/user/smsLogin','POST',data,true)
};
function smsRegister(data){ //短信注册
    return request('/user/smsRegister','POST',data,true)
};
function addBank(data){ //添加医生签名
    return request('/user/addBank','POST',data,true)
};
function getSign(data){ //获取医生签名
    return request('/user/getSign','GET',data)
};
function getOssSign(type){ //获取上传文件 Policy
    return request('/file/getOSSPolicy/'+type,'GET')
};
function getArea(data){//获取省市区
    return request('/user/areaList','GET',data)
}
function getHospital(id){//医院列表
    return request('/user/hospitalList/'+id,'GET')
}
function getOfficeList(data){//科室列表
    return request('/user/officeList','GET',data)
}
function getPosition(){//职称列表
    return request('/user/positionList','GET',{})
}
function uploadImg(data){//上传图片
    return request('/user/uoloadImg','POST',data)
}
function phoneLogin(appid,data){//获取用户绑定手机号信息
    return request(`/wx/user/${appid}/phone`,'GET',data,true)
}
function logout(){
    return request(`/user/logOut`,'GET')
}
function needInfo(mobile){//获取用户绑定手机号信息
    return request(`/user/getDetail/${mobile}`,'GET',{},true)
}
function modifyInfo(data){//修改HCP资料
    return request(`/user/modify`,'POST',data,true)
}
function pwdLogin(data){ //密码登录
    return request('/user/login','POST',data,true)
};
function getPrivacy(){//获取用户绑定手机号信息
    return request(`/user/getPrivacy`,'GET',{},true)
}
function getProjectStatus(){//获取项目项目状态
    return request(`/user/getProjectStatus`,'GET',{},true)
}
function getExpertSign(){ //获取医生签名
    return request('/expert/sign','GET',{})
};
function getBankInfo(){ //获取医生签名
    return request('/user/getBank','GET',{})
};
function getfangxinSite(){ //获取医生签名
    return request('/expert/fxq','post',{})
};
function ocrIdCard(data){
    return request('/ocr/idCard','post',data,false)
   
}
function ocrImg(data){
    return request('/ocr/image','post',data,false)  
}
function limitCount(data){
    return request('/medicalRecord/count','get',data,false)  
}
function applyActivity(){
    return request('/caseplatformCase/activity','post',{},false)  
}
function getActivityStatus(){
    return request('/caseplatformCase/activity','get',{},false)  
}

function getMobileModel(data){
    return request('/upload/mobileModel','post',data,false)  
}


// function getCaseNum(){//获取项目病例总数
//     return request(`/user/getCaseNum`,'GET',{},true)
// }
// function getCaseSwitch(){//项目病例开关
//     return request(`/user/getCaseSwitch`,'GET',{},true)
// }


module.exports={
    addCase,
    limitCount,
    getActivityStatus,
    caseDetail,
    applyActivity,
    caseList,
    editCase,
    getCaptcha,
    getDeal,
    getInfo,
    getRubric,
    sendSms,
    smsLogin,
    smsRegister,
    addBank,
    getSign,
    getOssSign,
    getArea,
    getHospital,
    getOfficeList,
    getPosition,
    uploadImg,
    phoneLogin,
    logout,
    needInfo,
    modifyInfo,
    pwdLogin,
    getPrivacy,
    getProjectStatus,
    getExpertSign,
    getBankInfo,
    getfangxinSite,
    ocrIdCard,
    ocrImg,
    getMobileModel
  }
