paginate(['list_rows'=>$get['limit'],'page'=>$get['page']]); $list = $lists->items(); foreach ($list as $key => $goods){ $price = $goods['min_price'].'~'.$goods['max_price']; if($goods['min_price'] !== $goods['max_price']){ $price = $goods['min_price']; } $list[$key]['price'] = $price; } $count = $lists->total(); return ['count'=>$count,'lists'=>$list]; } }