(function($){ var consulting = { //创建会话 createSession: function(data) { return httpRequest.imHttpPost("/sessions", {data: data}) }, //获取成员列表 getParticipants:function(sessionId){ return httpRequest.imHttpGet("/sessions/"+sessionId+"/participants", {data: {}}) }, //获取im消息 getMessages:function(data){ return httpRequest.imHttpGet("/sessions/"+data.session_id+"/messages",{data:data}); }, //发送消息 sendMessage: function(sessionId, data){ return httpRequest.imHttpPost('/sessions/'+sessionId+'/messages', data); }, //上传图片 uploadImage: function(data){ return httpRequest.post('upload/chat', data); }, //康复管理-保存指导留言 saveGuidanceMessage: function(data){ return httpRequest.post('doctor/specialist/rehabilitation/saveGuidanceMessage', {data:data}); }, }; window.consultingAPI = consulting; })(jQuery)