简要描述:

  • 客服会话首页数据

请求URL:

GET/plugin.yun-chat.frontend.chat.index

参数:

参数名 是否必须 类型 说明
group_id int 默认0
user_uid int 默认0

返回示例:

正确时返回:

{
	"result": 1,
	"msg": "成功",
	"data": {
		"employee_info": {
			"id": 2,
			"uniacid": 2,
			"uid": 2669,
			"nickname": "客服0002",
			"group_id": 3,
			"avatar": "https:\/\/localhost:82\/attachment\/images\/2\/2019\/09\/b771aSob37tASStS8k7TSFfRo8fcKZ.jpg",
			"online_status": 1
		},
		"queue_list": [{
			"id": 1,
			"uniacid": 2,
			"uid": 2662,
			"employee_id": 2,
			"last_chat_content": "[订单]",
			"last_chat_content_type": 3,
			"last_chat_is_backed": 0,
			"un_read_num": 13,
			"avatar": "http:\/\/localhost:82\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
			"nickname": "15000245941",
			"has_one_user": {
				"uid": 2662,
				"uniacid": 2,
				"nickname": "15000245941",
				"avatar": "\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
				"avatar_image": "http:\/\/localhost:82\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
				"username": "15000245941"
			}
		}, {
			"id": 3,
			"uniacid": 2,
			"uid": 2665,
			"employee_id": 2,
			"last_chat_content": "客服客服0002完成会话",
			"last_chat_content_type": 0,
			"last_chat_is_backed": 0,
			"un_read_num": 3,
			"avatar": "http:\/\/localhost:82\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
			"nickname": "15000000003",
			"has_one_user": {
				"uid": 2665,
				"uniacid": 2,
				"nickname": "15000000003",
				"avatar": "\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
				"avatar_image": "http:\/\/localhost:82\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
				"username": "15000000003"
			}
		}, {
			"id": 4,
			"uniacid": 2,
			"uid": 2669,
			"employee_id": 2,
			"last_chat_content": null,
			"last_chat_content_type": null,
			"last_chat_is_backed": null,
			"un_read_num": 0,
			"avatar": "http:\/\/localhost:82\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
			"nickname": "15000000002",
			"has_one_user": {
				"uid": 2669,
				"uniacid": 2,
				"nickname": "15000000002",
				"avatar": "\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
				"avatar_image": "http:\/\/localhost:82\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
				"username": "15000000002"
			}
		}],
		"member_info": {
			"uid": 2662,
			"avatar": "\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
			"nickname": "15000245941",
			"realname": "",
			"mobile": "15000245941",
			"createtime": 1589504938,
			"credit1": "908.70",
			"credit2": "0.00",
			"creat_time_fmt": "2020-05-15 09:08:58",
			"avatar_image": "http:\/\/localhost:82\/addons\/yun_shop\/static\/images\/photo-mr.jpg",
			"username": "15000245941",
			"yz_member": {
				"member_id": 2662,
				"parent_id": 0,
				"is_agent": 0,
				"group_id": 0,
				"level_id": 0,
				"is_black": 0,
				"alipayname": null,
				"alipay": null,
				"content": null,
				"status": 0,
				"custom_value": null,
				"validity": null,
				"member_form": null,
				"withdraw_mobile": "",
				"wechat": null,
				"group": null,
				"level": null,
				"agent": null
			},
			"has_one_fans": null,
			"has_one_order": {
				"uid": 2662,
				"total": 13,
				"sum": "7787.00",
				"status_name": "待付款",
				"pay_type_name": "未支付",
				"process": [],
				"has_one_pay_type": null
			}
		}
	}
}

错误时返回:


返回参数说明:

参数名 类型 说明
employee_info obj 客服信息
member_info obj 该会话的会员信息
queue_list array 会话列表
queue_list->id int 会话ID
queue_list->last_chat_content string 最近消息内容
queue_list->un_read_num int 未读消息数
queue_list->avatar string 会员头像
queue_list->nickname string 会话昵称