model = new UserPointsLogModel(); } public function index() { if ($this->request->isAjax()) { if (input('selectFields')) { return $this->selectList(); } list($page, $limit, $where) = $this->buildTableParames(); $param = ['page' => $page, 'limit' => $limit]; $pageList = UserPointsLogModel::getPageList($param, $where, ''); $data = [ 'code' => 0, 'msg' => '', 'count' => $pageList['count'], 'data' => $pageList['data'] ]; return json($data); } return $this->fetch(); } }