ShopsN查询多条数据不分页使用select方法,例如:
/** * 获取商品列表 * @author 王波 * $date 2020-09-03 **/ public function getGoodsList() { $where = []; $where[] = ['shelves','=',1]; $where[] = ['approval_status','=',1]; $field = 'id,title,pic_url'; $goods = GoodsModel::field($field) ->where($where) ->order('id','desc') ->select()->toarray(); if(empty($goods)){ $this->errorMessage = "暂无商品信息"; return false; } return $goods; }