|
@@ -25,6 +25,7 @@ class Store extends Api
|
|
$category_id = input('category_id',0,'intval');
|
|
$category_id = input('category_id',0,'intval');
|
|
$longitude = input('longitude',0,'trim');
|
|
$longitude = input('longitude',0,'trim');
|
|
$latitude = input('latitude',0,'trim');
|
|
$latitude = input('latitude',0,'trim');
|
|
|
|
+ $sort = input('sort','asc','trim');
|
|
|
|
|
|
$where = [];
|
|
$where = [];
|
|
if($category_id){
|
|
if($category_id){
|
|
@@ -36,7 +37,7 @@ class Store extends Api
|
|
|
|
|
|
$list = Db::name('store')->field($field)
|
|
$list = Db::name('store')->field($field)
|
|
->where('status',1)->where($where)
|
|
->where('status',1)->where($where)
|
|
- ->order('weigh', 'desc')->autopage()->select();
|
|
|
|
|
|
+ ->order('distance', $sort)->autopage()->select();
|
|
$list = list_domain_image($list, ['image']);
|
|
$list = list_domain_image($list, ['image']);
|
|
|
|
|
|
foreach($list as $k=>$v){
|
|
foreach($list as $k=>$v){
|