| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace app\admin\controller\user;
- use app\common\controller\Backend;
- /**
- * 用户Teac交易记录管理
- *
- * @icon fa fa-circle-o
- */
- class Teacs extends Backend
- {
- /**
- * Teacs模型对象
- * @var \app\admin\model\user\Teacs
- */
- protected $model = null;
- public function _initialize()
- {
- parent::_initialize();
- $this->model = new \app\common\model\UserTeac();
- $this->assignconfig('ids', $this->request->param('ids'));
- }
- public function index()
- {
- //设置过滤方法
- $this->request->filter(['strip_tags', 'trim']);
- if (false === $this->request->isAjax()) {
- return $this->view->fetch();
- }
- //如果发送的来源是 Selectpage,则转发到 Selectpage
- if ($this->request->request('keyField')) {
- return $this->selectpage();
- }
- [$where, $sort, $order, $offset, $limit] = $this->buildparams();
- $ids = $this->request->param('ids');
- $list = $this->model->with('users')
- ->where($where)->where('trade_id', '=', $ids)
- ->order($sort, $order)
- ->paginate($limit);
- $result = ['total' => $list->total(), 'rows' => $list->items()];
- return json($result);
- }
-
- }
|