50 lines
1.2 KiB
PHP
50 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace app\admin\controller\app\msgpush;
|
|
|
|
use app\common\controller\Backend;
|
|
use think\Db;
|
|
/**
|
|
* 推送记录
|
|
*/
|
|
class Log extends Backend
|
|
{
|
|
|
|
protected $model = null;
|
|
public function _initialize()
|
|
{
|
|
parent::_initialize();
|
|
$this->model = new \app\admin\model\app\msgpush\Log;
|
|
}
|
|
|
|
/**
|
|
* 查看
|
|
*/
|
|
public function index()
|
|
{
|
|
//当前是否为关联查询
|
|
$this->relationSearch = false;
|
|
//设置过滤方法
|
|
$this->request->filter(['strip_tags', 'trim']);
|
|
//如果发送的来源是Selectpage,则转发到Selectpage
|
|
if ($this->request->request('keyField')) {
|
|
return $this->selectpage();
|
|
}
|
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
|
|
|
$list = $this->model
|
|
->where($where)
|
|
->order($sort, $order)
|
|
->paginate($limit);
|
|
|
|
|
|
$result = array("total" => $list->total(), "rows" => $list->items(),'attr'=>[
|
|
'status_list'=>$this->model->getStatusList(),
|
|
'msg_type_list'=>$this->model->getMsgTypeList(),
|
|
]);
|
|
|
|
return $this->success("获取成功",$result);
|
|
}
|
|
|
|
|
|
} |