diff --git a/application/api/controller/Index.php b/application/api/controller/Index.php index 352d072..e5c93c6 100644 --- a/application/api/controller/Index.php +++ b/application/api/controller/Index.php @@ -223,7 +223,7 @@ class Index extends Api } $data = Job::where($where) ->field("*,{$distance} distance") - ->order(['is_top'=>'desc','top_time'=>'desc','distance'=>'asc','weigh'=>'asc']) + ->order(['distance'=>'asc','weigh'=>'desc']) ->paginate($page_num,false,['page'=>$page]) ->each(function($v){ $v->visible(['id','cover','job_name','salary','people_num','factory_price_total','factory_price','subsidy_price']); @@ -308,7 +308,7 @@ class Index extends Api ->join('job_collect jc','jc.job_id = j.id and user_id = '.$this->auth->id) ->where($where) ->field('j.*') - ->order(['j.is_top'=>'desc','j.top_time'=>'desc','jc.createtime'=>'desc','weigh'=>'asc']) + ->order(['jc.createtime'=>'desc','j.weigh'=>'desc']) ->paginate($page_num,false,['page'=>$page]) ->each(function($v){ $v->visible(['id','cover','job_name','salary','people_num','factory_price_total','factory_price','subsidy_price']);