mirror of
https://gitee.com/zhc02/timely_service.git
synced 2025-06-24 12:05:30 +08:00
1
This commit is contained in:
parent
db4a8a0b84
commit
ccf6656ad7
63
application/admin/controller/Visitor.php
Normal file
63
application/admin/controller/Visitor.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* Author: baihu
|
||||
* Date: 2019/12/16
|
||||
* Time: 22:13
|
||||
*/
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use Logic\Visitor as VisitorLogic;
|
||||
use Logic\ChatLogLogic;
|
||||
class Visitor extends Base
|
||||
{
|
||||
/**
|
||||
* 游客列表
|
||||
* @param $param
|
||||
* @return array
|
||||
*/
|
||||
public function visitorList(){
|
||||
|
||||
if (request()->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();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user