consulting-api.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. (function($){
  2. var consulting = {
  3. getList: function(data){
  4. return APIService.httpGet('/im_new/consult/getList', data);
  5. },
  6. getListTableAjaxObj: { //表格数据获取时,使用的ajax请求配置
  7. method: 'get',
  8. url: APIService.server + 'im_new/consult/getList',
  9. contentType: "application/json",
  10. dataType: "json",
  11. ajaxOptions: {
  12. beforeSend: function(request) {
  13. var userAgent = APIService.userAgent;
  14. userAgent = JSON.stringify(userAgent);
  15. request.setRequestHeader("userAgent", userAgent);
  16. }
  17. }
  18. },
  19. getListCount: function(data){
  20. return APIService.httpGet('/im_new/consult/getListCount', data);
  21. },
  22. getConsultStatus: function(data){
  23. return APIService.httpGet('doctor/consult/getConsultStatus', data);
  24. },
  25. getPrescriptionInfo: function(data){
  26. return APIService.httpGet('/doctor/consult/prescriptionDetail', data);
  27. },
  28. uploadImage: function(data){
  29. return APIService.httpPost('upload/chat', data);
  30. },
  31. getPatientServiceType: function(data){
  32. return APIService.httpGet('doctor/sign/getPatientFamilyServer', data);
  33. },
  34. finishConsult: function(data){
  35. return APIService.httpPost('doctor/consult/finish_consult', data);
  36. },
  37. //IM相关的接口
  38. socketUrl: APIService.imserver+'/socket.io/socket.io.js',
  39. getMessages: function(sessionId, data){
  40. return APIService.imHttpGet('/sessions/'+sessionId+'/messages', data);
  41. },
  42. sendMessage: function(sessionId, data){
  43. return APIService.imHttpPost('/sessions/'+sessionId+'/messages', data);
  44. },
  45. getMembers: function(sessionId){
  46. return APIService.imHttpGet('/sessions/'+sessionId+'/participants');
  47. },
  48. //通过续方code,获得续方详情
  49. getPrescriptionInfoByCode: function(data){
  50. return APIService.httpGet('doctor/prescriptionInfo/getContinuedPrescriptionAsDoctor', data);
  51. }
  52. };
  53. window.consultingAPI = consulting;
  54. })(jQuery)