聊天-发处方
开发中
GET
/sendPrescription
聊天对话
// 发送处方
function sendPrescription() {
//向socket服务端发送数据 参数:pageSize: number, lastTime: string, orderId: string
socket.emit('sendPrescription', '276027147277');
}
// 接受处方信息
socket.on('<span class="colour" style="color: rgb(146, 214, 158);">**receiveChatMsg**</span>', event => {
<span class="colour" style="color: rgb(199, 146, 234);">var</span><span class="colour" style="color: rgb(187, 187, 187);"></span><span class="colour" style="color: rgb(222, 124, 132);">str</span><span class="colour" style="color: rgb(187, 187, 187);"></span><span class="colour" style="color: rgb(171, 178, 191);">=</span><span class="colour" style="color: rgb(187, 187, 187);"></span><span class="colour" style="color: rgb(222, 124, 132);">document</span><span class="colour" style="color: rgb(187, 187, 187);">.</span><span class="colour" style="color: rgb(97, 175, 239);">getElementById</span><span class="colour" style="color: rgb(187, 187, 187);">(</span><span class="colour" style="color: rgb(146, 214, 158);">'msgShow'</span><span class="colour" style="color: rgb(187, 187, 187);">).</span><span class="colour" style="color: rgb(222, 124, 132);">innerText</span><span class="colour" style="color: rgb(187, 187, 187);">;</span>
var test = document.createElement('span');
test.appendChild(document.createTextNode(JSON.stringify(event)));
var test2 = document.createElement('p');
document.getElementById('msgShow').appendChild(test).appendChild(test2);
});
请求参数
Query 参数
orderId
string
必需
Header 参数
Content-Type
string
必需
示例值:
application/json
authorization
string
可选
示例值:
{{Btoken}}
示例代码
返回响应
修改于 2024-03-30 02:12:44