index.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import request from "@kasite/intelmt-admin/service/api/request";
  2. const apiUrl = {
  3. // 字典查询(示例接口)
  4. QueryDictList: "wsgw/sys/dict/DataList/callApiJSON.do",
  5. // VIP 身份等级相关接口(对应后端 IDiyVipService 上的 4 个方法)
  6. InsertPatientLevel: "wsgw/diy/vip/InsertPatientLevel/callApiJSON.do",
  7. QueryPatientLevel: "wsgw/diy/vip/QueryPatientLevel/callApiJSON.do",
  8. UpdatePatientLevel: "wsgw/diy/vip/UpdatePatientLevel/callApiJSON.do",
  9. DelPatientLevel: "wsgw/diy/vip/DelPatientLevel/callApiJSON.do",
  10. // vip crm 绑定相关接口
  11. SelectByCrmCode: "wsgw/diy/vip/SelectByCrmCode/callApiJSON.do",
  12. UpdateByCrmCode: "wsgw/diy/vip/UpdateByCrmCode/callApiJSON.do",
  13. };
  14. /**
  15. * 查询字典配置
  16. */
  17. export const QueryDictList = async (data: object = {}) => {
  18. const res = await request.doPost(apiUrl.QueryDictList, data);
  19. return res;
  20. };
  21. /**
  22. * 新增 VIP 身份等级
  23. */
  24. export const InsertPatientLevel = async (data: object = {}) => {
  25. const res = await request.doPost(apiUrl.InsertPatientLevel, data);
  26. return res;
  27. };
  28. /**
  29. * 查询 VIP 身份等级列表
  30. */
  31. export const QueryPatientLevel = async (data: object = {}) => {
  32. const res = await request.doPost(apiUrl.QueryPatientLevel, data);
  33. return res;
  34. };
  35. /**
  36. * 修改 VIP 身份等级
  37. */
  38. export const UpdatePatientLevel = async (data: object = {}) => {
  39. const res = await request.doPost(apiUrl.UpdatePatientLevel, data);
  40. return res;
  41. };
  42. /**
  43. * 删除 VIP 身份等级
  44. */
  45. export const DelPatientLevel = async (data: object = {}) => {
  46. const res = await request.doPost(apiUrl.DelPatientLevel, data);
  47. return res;
  48. };
  49. /**
  50. * 根据crm code查询vip身份等级
  51. * @param data
  52. * @returns
  53. */
  54. export const SelectByCrmCode = async (data: object = {}) => {
  55. const res = await request.doPost(apiUrl.SelectByCrmCode, data);
  56. return res;
  57. };
  58. /**
  59. * 更新crm code对应的vip身份等级
  60. * @param data
  61. * @returns
  62. */
  63. export const UpdateByCrmCode = async (data: object = {}) => {
  64. const res = await request.doPost(apiUrl.UpdateByCrmCode, data);
  65. return res;
  66. };