modelClass = new TermsModel; } //分类管理 public function index() { if ($this->request->isAjax()) { [$page, $limit, $where, $sort, $order] = $this->buildTableParames(); $count = $this->modelClass ->where($where) ->where("module", "links") ->order($sort, $order) ->count(); $data = $this->modelClass ->where($where) ->where("module", "links") ->order($sort, $order) ->page($page, $limit) ->select(); $result = ["code" => 0, 'count' => $count, 'data' => $data]; return json($result); } return $this->fetch(); } }