request.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. import { Get, Post } from "../../lib/request/method";
  2. // 获取订单详情
  3. export function getOrderDetailMethod(id: string) {
  4. return Post(`/patientCrManage/getPcrDetailById/${id}`, {
  5. transform({ data }: AnyObject) {
  6. return data;
  7. },
  8. });
  9. }
  10. // 订单支付接口
  11. export function orderPayMethod(id: string, remark: string) {
  12. return Post(`/patientCrManage/payPcr/${id}`, { remark: remark }, {
  13. transform({ data }: AnyObject) {
  14. return data;
  15. },
  16. });
  17. }
  18. // 确认收货
  19. export function orderConfirmReceiptMethod(id: string) {
  20. return Post(`/patientCrManage/confirmReceipt/${id}`, {
  21. transform({ data }: AnyObject) {
  22. return data;
  23. },
  24. });
  25. }
  26. //患者线下调理方案预约
  27. export function patientOfflineTreatmentAppointmentMethod(offlineId: string, time: string) {
  28. return Post(`/patientCrManage/pofflineCpApply/${offlineId}`, {}, {
  29. params: {
  30. time,
  31. },
  32. transform({ data }: AnyObject) {
  33. return data;
  34. },
  35. });
  36. }
  37. // 根据健康分析报告ID获取可自行购买的调理方案
  38. export function getOfflineTreatmentListMethod(healthAnalysisReportId: string) {
  39. return Post(`/patientCrManage/getCpsByHrepId/${healthAnalysisReportId}`, {}, {
  40. transform({ data }: AnyObject) {
  41. return data;
  42. },
  43. });
  44. }
  45. // 自行购买调理方案
  46. export function purchaseOfflineTreatmentMethod(data: any) {
  47. return Post(`/patientCrManage/buyCps`, data, {
  48. transform({ data }: AnyObject) {
  49. return data;
  50. },
  51. });
  52. }
  53. // 获取所有地址列表
  54. export function getAddressListMethod(id: string, keyWord: string) {
  55. return Post(
  56. `/patientCrManage/patAddress/all`,
  57. {
  58. id,
  59. keyWord,
  60. },
  61. {
  62. transform({ data }: AnyObject) {
  63. return data;
  64. },
  65. }
  66. );
  67. }
  68. //获取订单商品-线下核销记录的患者个人评价 type 1-商品 2-线下核销记录 id:商品/线下核销记录id
  69. export function getOrderGoodsEvaluationMethod(type: string, id: number) {
  70. return Post(`/patientCrManage/getEvaluate/${type}/${id}`, {
  71. transform({ data }: AnyObject) {
  72. return data;
  73. },
  74. });
  75. }
  76. // 订单商品/线下服务评价
  77. export function evaluateOrderGoodsMethod(data: any) {
  78. return Post(`/patientCrManage/evaluate`, data, {
  79. transform({ data }: { data: any }) {
  80. return data;
  81. },
  82. });
  83. }
  84. //患者线下调理方案修改预约时间
  85. export function updateAppointmentMethod(offlineId: string, time: string) {
  86. return Post(`/patientCrManage/pofflineCpUpdateApply/${offlineId}`, {}, {
  87. params: {
  88. time,
  89. },
  90. transform({ data }: AnyObject) {
  91. return data;
  92. },
  93. })
  94. }
  95. // 获取物流信息 id:患者调理方案ID
  96. export function getLogisticsMethod(id:number){
  97. return Post(`/patientCrManage/getLogistics/${id}`, {
  98. transform({ data }: AnyObject) {
  99. return data;
  100. },
  101. });
  102. }