import {request} from '../utils/request.js'
function getCenter(data){ //获取患者个人中心数据
  return request('/patient/center','GET',data,true)
};
function getInfo(data){ //获取患者信息
  return request('/patient/center/info','GET',data)
};
function editAvatar(data){ //修改用户头像
  return request('/user/avatar','PUT',data)
};
function editName(data){ //修改用户名
  return request('/user/name','PUT',data)
};
function loginout(data){ //退出登陆
  return request('/user/loginout','PUT',data)
};
function coupon(data){ //获取患者优惠卷列表
  return request('/patient/coupon','GET',data,true)
};
function delDocotorList(data){ //删除服务过患者的医生
  return request('/patient/doctor/history/'+data,'DELETE',data)
};
function getList(data){ //获取我的问诊、关注医生列表
  return request('/patient/doctor/my','POST',data)
};
function getConfig(){ //获取用户配置
  return request('/user/system','GET',{})
};
function editConfig(data){ //获取用户配置
  return request('/user/system','PUT',data)
};
module.exports={
  getConfig,
  editConfig,
  getCenter,
  getInfo,
  editAvatar,
  editName,
  loginout,
  coupon,
  delDocotorList,
  getList
}