简要描述:

  • 会话消息列表--后台

请求URL:

GET/business/{公众号id}/plugin/YunChat/chatGetChatList

参数:

参数名 是否必须 类型 说明
page int 页码
id int 会话ID
kwd string 会话关键词
start_time string 开始时间
end_time string 结束时间

返回示例:

正确时返回:

{
	"result": 1,
	"msg": "",
	"data": {
		"current_page": 1,
		"data": [{
			"id": 1310,
			"uniacid": 3,
			"uid": 6090,
			"crop_id": 1,
			"employee_id": 1,
			"content": "<p><img class=\"wscnph\" src=\"https:\/\/test-1251768088.cos.ap-guangzhou.myqcloud.com\/image\/c011acbc253702ba8e312dcb7a119306.png\" \/><\/p>",
			"content_type": 0,
			"read_status": 1,
			"direction_type": 0,
			"is_system_send": 1,
			"is_system_opt": 0,
			"is_backed": 0,
			"created_at": "2021-07-20 13:31:47",
			"updated_at": "2021-07-20 13:31:48",
			"deleted_at": null,
			"send_msg_user": {
				"id": 1,
				"uid": 239,
				"uniacid": 3,
				"nickname": "Joyaa",
				"avatar": "https:\/\/release.yunzmall.com\/attachment\/image\/255056f12ed38a2600bd6ac148c7251a.jpg"
			},
			"send_msg_user_type": "客服",
			"receive_msg_user": {
				"uid": 6090,
				"uniacid": 3,
				"nickname": "13288364266",
				"avatar": "\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
				"mobile": "13288364266",
				"avatar_image": "https:\/\/release.yunzmall.com\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
				"username": "13288364266"
			},
			"receive_msg_user_type": "会员",
			"send_msg_user_avatar": "https:\/\/release.yunzmall.com\/attachment\/image\/255056f12ed38a2600bd6ac148c7251a.jpg",
			"receive_msg_user_avatar": "https:\/\/release.yunzmall.com\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
			"content_type_desc": "文本",
			"has_one_employee": {
				"id": 1,
				"uid": 239,
				"uniacid": 3,
				"nickname": "Joyaa",
				"avatar": "https:\/\/release.yunzmall.com\/attachment\/image\/255056f12ed38a2600bd6ac148c7251a.jpg"
			},
			"has_one_user": {
				"uid": 6090,
				"uniacid": 3,
				"nickname": "13288364266",
				"avatar": "\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
				"mobile": "13288364266",
				"avatar_image": "https:\/\/release.yunzmall.com\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
				"username": "13288364266"
			}
		}],
		"first_page_url": "https:\/\/release.yunzmall.com\/web\/index.php?page=1",
		"from": 1,
		"last_page": 17,
		"last_page_url": "https:\/\/release.yunzmall.com\/web\/index.php?page=17",
		"next_page_url": "https:\/\/release.yunzmall.com\/web\/index.php?page=2",
		"path": "https:\/\/release.yunzmall.com\/web\/index.php",
		"per_page": 10,
		"prev_page_url": null,
		"to": 10,
		"total": 164
	}
}

错误时返回:


返回参数说明:

参数名 类型 说明
id int ID
send_msg_user_avatar string 消息发送人头像
send_msg_user_type string 消息发送人类型
send_msg_user obj 消息发送人会员信息
receive_msg_user_avatar string 消息接收人头像
receive_msg_user_type string 消息接收人类型
receive_msg_user obj 消息接收人会员信息
created_at string 发送时间
content_type_desc string 消息类型描述
content_type int 消息类型:0-文本,1-图片,2-商品,3-订单
content string或者object 消息内容(content_type=0是文本;content_type=1是图片地址;content_type=2:content.thumb商品图片、content.title商品名称、content.price商品价格;content_type=3:content.order_sn订单编号、content.status_name状态名称、content.has_many_order_goods订单关联的商品、content.goods_total订单关联商品数量、content.price订单价格)