index.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. import http from '@/utils/http'
  2. const headers = {
  3. "Content-Type": "application/json;charset=UTF-8"
  4. }
  5. // ------- 微信公众号授权 ---------------------
  6. // 获取微信授权信息
  7. export function apiGetWxAuth(params) {
  8. return http({ method: 'get', url: '/wechat/web_access_token/', params })
  9. }
  10. // 绑定微信 openid
  11. export function apiPostWxOpenId(data) {
  12. return http({ method: 'post', url: '/wechat/bind_openid_patient/', data })
  13. }
  14. // ------- 登录 ------------------------
  15. // 手机号查询患者预约详情,登录前判断
  16. export function apiGetClinicInfo(params) {
  17. return http({ method: 'get', url: '/returnvisit/phone_clinic_list/', params })
  18. }
  19. // 获取手机短信验证码
  20. export function apiGetMobileCode(params) {
  21. return http({ method: 'get', url: '/user/sms/', params })
  22. }
  23. // 手机号登录
  24. export function apiPostLogin(data) {
  25. return http({ method: 'post', url: '/user/phone_login/', data})
  26. }
  27. // 登出
  28. export function apiGetLogout(params) {
  29. return http({ method: 'get', url: '/user/logout/', params })
  30. }
  31. // 选择集团
  32. export function apiPostGroupCheck(data) {
  33. return http({ method: 'post', url: '/org/choose_group/', data })
  34. }
  35. // 获取用户信息
  36. export function apiGetUserInfo(data) {
  37. return http({ method: 'get', url: '/user/info/', data })
  38. }
  39. // ---------- 业务 -------------------------------------
  40. // 查询患者预约患者列表
  41. export function apiGetPatientList(params) {
  42. return http({ method: 'get', url: '/returnvisit/patient_clinic_list/', params })
  43. }
  44. // 查询患者信息
  45. export function apiGetPatientInfo(params) {
  46. return http({ method: 'get', url: '/returnvisit/patient_clinic_info/', params })
  47. }
  48. // 补充就诊人详情
  49. export function apiPostPatientInfo(data) {
  50. return http({ method: 'post', url: 'returnvisit/supply_patient_info/', data })
  51. }
  52. // 查询随诊人详情
  53. export function apiGetFollowInfo(params) {
  54. return http({ method: 'get', url: '/returnvisit/folower_clinic_info/', params })
  55. }
  56. // 提交随诊人详情
  57. export function apiPostFollowInfo(data) {
  58. return http({ method: 'post', url: '/returnvisit/supply_follower_info/', data })
  59. }
  60. // 获取问卷题目
  61. export function apiGetVolumeInfo(params) {
  62. return http({ method: 'get', url: '/returnvisit/quest_detail_list/', params })
  63. }
  64. // 保存问卷
  65. export function apiPostVolumeInfo(data) {
  66. return http({ method: 'post', url: '/returnvisit/fill_quest_info/', data })
  67. }
  68. // 获取问卷结果
  69. export function apiGetVolumeResult(params) {
  70. return http({ method: 'get', url: '/returnvisit/quest_result_info/', params })
  71. }
  72. // 获取问卷列表
  73. export function apiGetVolumeList(params) {
  74. return http({ method: 'get', url: '/orgdict/get_topic_list/', params })
  75. }
  76. // 保存问卷列表
  77. export function apiPostVolumeResult(data) {
  78. return http({ method: 'post', url: '/orgdict/add_detail/', data, headers })
  79. }