获取和某个用户的聊天记录
<h1>请求websocket字符串</h1>
<p>{"cmd":"message_list","page":"1","uid":"16"}</p>
<h1>参数</h1>
<p>page:获取的页码
uid:对方的user_id</p>
<h1></h1>
<h1>返回数据:</h1>
<pre><code>{
"cmd": 3,
"msg": "success",
"from_uid": null,
"from_user_type": null,
"to_uid": null,
"to_user_type": null,
extra: "http://storage.kuaifaka.com/avatar/3931cbee523a805f8c4dc637c1b69a30.jpg",//卖家头像
"data": {
"total": 148,
"per_page": 20,
"current_page": 1,
"last_page": 8,
"data": [{
"from_uid": "16",//消息来源
"from_user_type": 2,//消息来源用户类型:1买家2商家
"to_uid": "1",//消息接收用户
"to_user_type": 1,//消息接收用户类型:1买家2商家
"content": "\u4f60\u597d",//消息内容
"content_type": 1,//消息内容类型1:text,2:image
is_read: 0,//消息是否已读0未读1已读
}, {
"from_uid": "16",
"from_user_type": 2,
"to_uid": "1",
"to_user_type": 1,
"content": "\u4f60\u597d",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "1",
"to_user_type": 1,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "1",
"to_user_type": 1,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "1",
"to_user_type": 1,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "1",
"to_user_type": 1,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "1",
"to_user_type": 1,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "1",
"to_user_type": 1,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "1",
"to_user_type": 1,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "16",
"to_user_type": 2,
"content": "666",
"content_type": 1
}, {
"from_uid": "16",
"from_user_type": 2,
"to_uid": "1",
"to_user_type": 1,
"content": "\u770b\u770b\u5929\u7a7a",
"content_type": 1
}, {
"from_uid": "16",
"from_user_type": 2,
"to_uid": "1",
"to_user_type": 1,
"content": "\u770b\u770b",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "16",
"to_user_type": 2,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "16",
"to_user_type": 2,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "16",
"to_user_type": 2,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "16",
"to_user_type": 2,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "16",
"to_user_type": 2,
"content": "666",
"content_type": 1
}, {
"from_uid": "16",
"from_user_type": 2,
"to_uid": "1",
"to_user_type": 1,
"content": "\u5566\u5566\u5566",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "16",
"to_user_type": 2,
"content": "666",
"content_type": 1
}, {
"from_uid": "1",
"from_user_type": 1,
"to_uid": "16",
"to_user_type": 2,
"content": "666",
"content_type": 1
}]
},
"extra": null,
"time": null
}</code></pre>