['special_type','special_way', 'title', 'cover_type', 'cover', 'describe', 'content', 'goods_id', 'user_head', 'user_nickname', 'vue_web', 'vue_param', 'weight', 'view_num', 'tags', 'status', 'create_time', 'update_time'], ]; } /** * @notes 获取列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/11/18 10:05 */ public function lists(): array { return HomeSpecial::where($this->searchWhere) ->field(['id', 'special_type','special_way', 'title', 'cover_type', 'cover', 'describe', 'content', 'goods_id', 'user_head', 'user_nickname', 'vue_web', 'vue_param', 'weight', 'view_num', 'tags', 'status', 'original_price' ,'present_price','create_time','update_time']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取数量 * @return int * @author likeadmin * @date 2024/11/18 10:05 */ public function count(): int { return HomeSpecial::where($this->searchWhere)->count(); } }