123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace app\admin\controller;
- use app\common\controller\Backend;
- use think\Controller;
- use think\Request;
- /**
- * 模板列管理
- *
- * @icon fa fa-circle-o
- */
- class Templatelist extends Backend
- {
-
- /**
- * Templatelist模型对象
- */
- protected $model = null;
- public function _initialize()
- {
- parent::_initialize();
- $this->model = model('Templatelist');
- }
- public function index()
- {
- //设置过滤方法
- $this->request->filter(['strip_tags']);
- if ($this->request->isAjax()) {
- list($where, $sort, $order, $offset, $limit) = $this->buildparams();
- $total = $this->model
- ->where($where)
- ->where('admin_id','in',$this->auth->id)
- ->order($sort, $order)
- ->count();
- $list = $this->model
- ->where($where)
- ->where('admin_id','in',$this->auth->id)
- ->order($sort, $order)
- ->limit($offset, $limit)
- ->select();
- $result = array("total" => $total, "rows" => $list);
- return json($result);
- }
- return $this->view->fetch();
- }
-
- }
|