['cid'] ]; } /** * @notes 文章/帮助列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author Tab * @date 2021/7/14 9:48 */ public function lists(): array { $lists = Article::field('id,title,synopsis,image,visit,create_time') ->where(['is_show'=>1]) ->where($this->searchWhere) ->order([ 'sort' => 'desc', 'id' => 'desc' ]) ->limit($this->limitOffset, $this->limitLength) ->select() ->toArray(); return $lists; } /** * @notes 文章/帮助总记录数 * @return int * @author Tab * @date 2021/7/14 9:48 */ public function count(): int { return Article::where($this->searchWhere)->count(); } }