index.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. import request from '../request';
  2. import handle from '../handle';
  3. import { REQUEST_CONFIG } from '../../config';
  4. /**
  5. * 跳转授权链接
  6. * @param {String} hosId 医院ID
  7. * @param {String} wechatConfigKey 公众号授权地址configKey
  8. * @param {Url} toUrl 授权后重定向的回调链接地址
  9. */
  10. export const WebOauthAuthorize = (queryData: any) => {
  11. return `${REQUEST_CONFIG.BASE_URL}oauth/100123/${queryData.wechatConfigKey}/login.do?toUrl=${queryData.toUrl}`;
  12. // return `https://open.weixin.qq.com/connect/oauth/authorize?appid=${queryData.appid}&redirect_uri=${queryData.redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`;
  13. };
  14. /** 获取系统状态 */
  15. export const GetAppStatus = async (queryData: any) => {
  16. const resp = handle.promistHandle(
  17. await request.doPost(
  18. `${REQUEST_CONFIG.BASE_URL}kstserver/status?appId=${queryData.appId}`,
  19. {},
  20. {
  21. construction: true,
  22. }
  23. )
  24. );
  25. return handle.catchPromise(resp, () => resp);
  26. };
  27. /** 页面参数查询列表 */
  28. export const SysAppPageList = async (queryData: any) => {
  29. const resp = handle.promistHandle(
  30. await request.doPost(
  31. `${REQUEST_CONFIG.BASE_URL}wsgw/sysAppPage/api/List/callApiJSON.do`,
  32. queryData,
  33. {
  34. showLoading: false,
  35. }
  36. )
  37. );
  38. return handle.catchPromise(resp, () => resp);
  39. };
  40. /** 查询院内就诊卡信息 */
  41. export const QueryMemberCardList_V3 = async (queryData: any) => {
  42. const resp = handle.promistHandleNew(
  43. await request.doPost(
  44. `${REQUEST_CONFIG.BASE_URL}wsgw/accountMember/api/QueryMemberCardList_V3/callApiJSON.do`,
  45. queryData
  46. )
  47. );
  48. return handle.catchPromiseNew(resp, () => resp);
  49. };
  50. /** 查询就诊人信息 */
  51. export const QueryBaseMemberList_V3 = async (queryData: any) => {
  52. const resp = handle.promistHandleNew(
  53. await request.doPost(
  54. `${REQUEST_CONFIG.BASE_URL}wsgw/accountMember/api/QueryBaseMemberList_V3/callApiJSON.do`,
  55. queryData
  56. )
  57. );
  58. return handle.catchPromiseNew(resp, () => resp);
  59. };
  60. /** 获取表单配置信息 */
  61. export const BaseFormQuery = async (queryData: any) => {
  62. let resp = handle.promistHandle(
  63. await request.doPost(
  64. `${REQUEST_CONFIG.BASE_URL}wsgw/base/form/Query/callApiJSON.do`,
  65. queryData,
  66. {
  67. showLoading: false,
  68. }
  69. )
  70. );
  71. return handle.catchPromise(resp, () => resp);
  72. };
  73. /** 查询功能菜单列表 */
  74. export const SysclientappmenuList = async (queryData: any) => {
  75. let resp = handle.promistHandle(
  76. await request.doPost(
  77. `${REQUEST_CONFIG.BASE_URL}wsgw/sysclientappmenu/api/List/callApiJSON.do`,
  78. queryData,
  79. {
  80. showLoading: false,
  81. }
  82. )
  83. );
  84. return handle.catchPromise(resp, () => resp);
  85. };
  86. /** 获取缓存信息 */
  87. export const CacheGetValue = async (queryData: any) => {
  88. const resp = handle.promistHandle(
  89. await request.doPost(
  90. `${REQUEST_CONFIG.BASE_URL}wsgw/sysweb/cache/GetValue/callApiJSON.do`,
  91. queryData,
  92. {
  93. showLoading: false,
  94. }
  95. )
  96. );
  97. return handle.catchPromise(resp, () => resp);
  98. };
  99. /** HCRM-我的随访-获取房间ID */
  100. export const GetRoomId = async (queryData: any) => {
  101. const resp = handle.promistHandleNew(
  102. await request.doPost(
  103. `${REQUEST_CONFIG.BASE_URL}wsgw/fuchat/base/GetRoomId/callApiJSON.do`,
  104. queryData
  105. )
  106. );
  107. return handle.catchPromiseNew(resp, () => resp);
  108. };
  109. /** HCRM-我的随访-获取会话列表 */
  110. export const GetMemberChatList = async (queryData: any) => {
  111. const resp = handle.promistHandleNew(
  112. await request.doPost(
  113. `${REQUEST_CONFIG.BASE_URL}wsgw/fuchat/base/GetMemberChatList/callApiJSON.do`,
  114. queryData
  115. )
  116. );
  117. return handle.catchPromiseNew(resp, () => resp);
  118. };