success('', ChatLogic::getConfig()); } /** * @notes 用户列表 * @return \think\response\Json * @author 段誉 * @date 2022/3/14 12:02 */ public function user() { return $this->dataLists(new ChatUserLists()); } /** * @notes 获取指定用户聊天记录 * @return \think\response\Json * @author 段誉 * @date 2022/3/14 12:02 */ public function record() { (new ChatRecordValidate())->goCheck(); return $this->dataLists(new ChatRecordLists()); } /** * @notes 获取指定用户订单列表 * @return \think\response\Json * @author 段誉 * @date 2022/3/14 12:03 */ public function order() { (new ChatOrderValidate())->goCheck(); return $this->dataLists(new ChatOrderLists()); } /** * @notes 获取在线客服列表 * @return \think\response\Json * @author 段誉 * @date 2022/3/14 12:05 */ public function online() { $result = ChatLogic::getOnlineKefu($this->kefuId); return $this->success('', $result); } /** * @notes 获取快捷回复列表 * @return \think\response\Json * @author 段誉 * @date 2022/3/14 12:06 */ public function reply() { return $this->dataLists(new KefuLangLists()); } /** * @notes 获取用户详情 * @return \think\response\Json * @author 段誉 * @date 2022/3/14 12:07 */ public function userInfo() { $user_id = $this->request->get('user_id/d'); $result = ChatLogic::getUserInfo($user_id); if (false === $result) { return $this->fail(ChatLogic::getError() ?: '系统错误'); } return $this->success('', $result); } /** * @notes 获取客服详情 * @return \think\response\Json * @author 段誉 * @date 2022/3/14 12:10 */ public function kefuInfo() { $result = ChatLogic::getKefuInfo($this->kefuId); return $this->success('', $result); } }