1
0
mirror of https://gitee.com/zhc02/timely_service.git synced 2025-06-28 21:31:29 +08:00
2019-12-16 18:37:38 +08:00

45 lines
1.3 KiB
PHP

<?php
/**
* Created by PhpStorm.
* Author: baihu
* Date: 2019/12/16
* Time: 17:55
*/
namespace app\admin\controller;
use Logic\KefuLogic;
class Kefu extends Base
{
/**
* 客服列表
* @param $param
* @return array
*/
public function index(){
if (request()->isAjax()) {
$page = input('param.page');
$limit = input('param.limit');
$where = [];
if (input('param.name')) {
$where[] = ['kf_name', '=', input('param.name')];
}
if ( input('param.status') == 1 || input('param.status') ==2) {
$where[] = ['kf_status', '=', input('param.status')];
}
if ( input('param.online') == 1 || input('param.online') ==2) {
$where[] = ['online_status', '=', input('param.online')];
}
if (input('param.merchant')) {
$where[] = ['mc_id', '=', input('param.merchant')];
}
$list = KefuLogic::getKefuByPage($where, '*', $limit);
return $this->response->api($list->items() ? $list->items() : '',self::SUCCESS_CODE,'操作成功',['count'=>$list->total()]);
}
return $this->fetch();
}
}