im协议规范
<pre><code> 登录成功的返回信息</code></pre>
<pre><code>{
"msg":"login_success",
"from":"sys",
"data":{
"content":105,//登录的type为['account', 'proxy_account', 'top_proxy_account']时,这里返回的是当前登录商家id,否则为字符串‘登陆成功’
"type":"text"
}
}</code></pre>
<p>消息发送:</p>
<pre><code>{
"type": "say",
"token": "token",
"from": "user",//发送者
"data": {
"content": "666",
"type": "image"//image,text
}
}</code></pre>
<pre><code>{
"type": "login",
"token": "token",
"data": {
"type": "user",//user,account,admin
"authtype": "h5",//ios,android,web,h5
"room": "kfk666"//需要登录的房间,就是订单号
}
}</code></pre>
<p>//获取投诉详情</p>
<pre><code>{
"type": "report_detail",
"order_num": "order_num",//订单号
"account_id": "account_id",//商户id
}</code></pre>
<p>//获取投诉聊天记录</p>
<pre><code>{
"type": "msg_list",
"order_num": "order_num",//订单号
"page":1,//分页页码
}</code></pre>
<p>消息接收:</p>
<pre><code>{
"msg": "success",//success,error,no_login
"from": "user",//sys,user,account,admin
"time":154546545646,
"data": {
"content": "666",//消息正文
"type": "text"//消息类型{image,text}
}
}</code></pre>
<p>//投诉详情</p>
<pre><code>{
"msg": "success",
"from": "sys",
"data": {
"content": {
"roll_money": 0,//0未退款 1已退款
"report_id": 3,//投诉编号
"account_id": 16,//用户编号
"order_num": "kfk1812312c5693b5",
"amount": "1.00",//投诉金额
"customer_contact": "475281441",//买家联系方式
"reason":// 投诉原因 "as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5as\u9632\u5b88\u6253\u6cd5",
"report_finish": 1,//0未完成,1完成
"created_at": "2018-12-31 17:40:21",//投诉时间
"customer_phone": "13560822174",//买家手机
"state": "\u6295\u8bc9\u5df2\u5904\u7406\u5b8c\u6210"//投诉状态描述
"report_handle":"0",
"head_img_url":"xxxxxx",//头像
"operation_authority":1,//投诉操作权限,1有权限,0没权限
},
"type": "report_detail"
}
}
</code></pre>
<h1>新report_detail</h1>
<pre><code>{
"msg": "success",
"from": "sys",
"data": {
"content": {
"account_id": 18,
"roll_money": 1,
"report_id": 267,
"order_num": "kfk1906283139aaf3",
"amount": "10.00",
"customer_contact": "\u4e70\u5bb6QQ\uff1a475281441",
"reason": "\u6295\u8bc9\u539f\u56e0\uff1akfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3kfk1906283139aaf3",
"report_finish": 0,
"created_at": "2019-06-28 16:56:00",
"customer_phone": "\u4e70\u5bb6\u624b\u673a\uff1a13560822174",
"state": "\u6b63\u5728\u9000\u6b3e",
"proxy_head_img_url": "http:\/\/storage.kuaifaka.com\/avatar\/07f2bc5c739b5e07924a4c3275a46f48.jpeg",//代理商头像
"top_proxy_head_img_url": "http:\/\/storage.kuaifaka.com\/avatar\/07e7f577b0227f66dc2fcca664e0ec98.jpeg",//供货商头像
"show_name": "\u5468\u6587\u5e73-\u4ee3\u7406\u5e97\u94fa",
"report_handle": "0",
"head_img_url": "http:\/\/storage.kuaifaka.com\/avatar\/07f2bc5c739b5e07924a4c3275a46f48.jpeg",//商户头像
"operation_authority": 1
},
"type": "report_detail"
}
}</code></pre>
<p>//聊天记录</p>
<pre><code>{
"msg": "success",
"from": "sys",
"data": {
"content": {
"total": 16,
"per_page": 20,
"current_page": 1,
"last_page": 1,
"data": [{
"order_num": "kfk1812312c5693b5",
"type": "2",//1买家发送 2商家发送 3快发卡客服发送 4系统
"content": "i\u5f1f\u5f1f\u7684",
"created_at": 1546684624,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "\u4f60ii",
"created_at": 1546684527,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "9527",
"created_at": 1546587869,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "12213",
"created_at": 1546587847,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "biihh",
"created_at": 1546431822,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "\u5f20\u6cfd\uff0c",
"created_at": 1546426799,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "nnnnnnnnnnnnn",
"created_at": 1546426744,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "wwwwwwwwwwww",
"created_at": 1546417827,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "nnnnnnn",
"created_at": 1546415882,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "\u4eb2,\u6211\u5df2\u7ecf\u6807\u8bb0\u6295\u8bc9\u5904\u7406\u5b8c\u6210\u4e86,\u5982\u6709\u95ee\u9898\u8bf7\u518d\u4e0e\u6211\u8054\u7cfb,\u8c22\u8c22",
"created_at": 1546252627,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "56666666666666666666666666666666",
"created_at": 1546250933,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "56666666666666666666666666666666",
"created_at": 1546250932,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "56666666666666666666666666666666",
"created_at": 1546250932,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "56666666666666666666666666666666",
"created_at": 1546250931,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "2",
"content": "56666666666666666666666666666666",
"created_at": 1546250928,
"content_type": "text"
}, {
"order_num": "kfk1812312c5693b5",
"type": "4",
"content": "\u5982\u60a8\u672a\u6536\u5230\u5361\u5bc6,\u8bf7\u6253\u5f00\u9875\u9762:http:\/\/120.77.205.154:82\/order\/query\/kfk1812312c5693b5\u67e5\u8be2,\u5176\u4f59\u95ee\u9898\u8bf7\u60a8\u8010\u5fc3\u7b49\u5f85\u5356\u5bb6\u56de\u590d~",
"created_at": 1546249221,
"content_type": "text"
}]
},
"type": "msg_list"
}
}
</code></pre>