文档
测试

获取聊天信息(getMessage)

GET
http://localhost:520/api/message/{toId}

请求参数

参数名
类型
描述
必填
toId
int
用户id
必填

响应参数

参数名
类型
描述
必填
code
int
示例:0
必填
msg
string
示例:sucess
必填
data
array
数据列表
必填
id
int
示例:3
必填
message
string
示例:第一次发消息
必填
status
boolean
示例:true
必填
fromId
int
示例:1
必填
toId
int
示例:2
必填
belong
int
示例:1
必填
cId
int
示例:3
必填
created_at
string
示例:2020-11-21T06:31:47.000Z
必填
updated_at
string
示例:2020-11-27T01:39:38.000Z
必填

说明 / 示例

```json { "code": 0, "msg": "sucess", "data": [ { "id": 3, "message": "第一次发消息", "status": false, "fromId": 1, "toId": 2, "belong": 1, "cId": 3, "created_at": "2020-11-21T06:31:47.000Z", "updated_at": "2020-11-21T06:31:47.000Z" }, { "id": 6, "message": "第二次发消息", "status": false, "fromId": 1, "toId": 2, "belong": 1, "cId": 3, "created_at": "2020-11-21T06:44:47.000Z", "updated_at": "2020-11-21T06:44:47.000Z" }, { "id": 8, "message": "第三次发消息", "status": false, "fromId": 1, "toId": 2, "belong": 1, "cId": 3, "created_at": "2020-11-21T06:47:04.000Z", "updated_at": "2020-11-21T06:47:04.000Z" } ] } ```