diff --git a/application/admin/controller/Visitor.php b/application/admin/controller/Visitor.php new file mode 100644 index 0000000..16b12d7 --- /dev/null +++ b/application/admin/controller/Visitor.php @@ -0,0 +1,63 @@ +isAjax()) { + $limit = input('param.limit'); + $list = VisitorLogic::getVisitorList( $limit); + return $this->response->api($list->items() ? $list->items() : '', self::SUCCESS_CODE, '操作成功', ['count' => $list->total()]); + } + return $this->fetch(); + } + + /** + * 获取聊天记录 + * @param $param + * @return array + */ + public function chatLogList(){ + if (request()->isAjax()) { + $name =input('param.name'); + $limit = input('param.limit'); + $list = ChatLogLogic::getChatLogList('',$name, $limit); + return $this->response->api($list->items() ? $list->items() : '', self::SUCCESS_CODE, '操作成功', ['count' => $list->total()]); + } + return $this->fetch(); + + } + /** + * 获取服务记录列表 + * @param $param + * @return array + */ + public function serviceList(){ + if (request()->isAjax()) { + $limit = input('param.limit'); + $name =input('param.name'); + $where=[]; + if($name){ + $where[]=['kefu_name','=',$name]; + } + $list = VisitorLogic::getServiceList($where, $limit); + return $this->response->api($list->items() ? $list->items() : '', self::SUCCESS_CODE, '操作成功', ['count' => $list->total()]); + } + return $this->fetch(); + } +} \ No newline at end of file