作者 sgj
1 个管道 的构建 失败 耗费 1 秒

志愿者修改

... ... @@ -191,7 +191,7 @@ class SecondController extends RestBaseController
}
$Class=new ClassModel();
$map['status']=1;
$list=$Class->where($map)->paginate('10');
$list=$Class->where($map)->order('weight desc')->paginate('10');
$data=$list->items();
foreach ($data as $k=>$v) {
... ... @@ -350,7 +350,7 @@ class SecondController extends RestBaseController
$city=input('city');
$Team=new TeamModel();
$map['status']=2;
$team=$Team->where('city',$city)->where($map)->select()->toArray();
$team=$Team->where('city',$city)->where($map)->order('weight desc')->select()->toArray();
if (!empty($team)){
foreach ($team as $k=>$v) {
... ...
... ... @@ -17,7 +17,7 @@ class OnlineTrainController extends AdminBaseController
public function index(){
$param = $this->request->param();
$map=[];
$data=db('class')->where($map)->order('id desc')->paginate(10);
$data=db('class')->where($map)->order('weight desc')->paginate(10);
$data->appends($param);
$list=$data->items();
foreach ($list as $k=>$v){
... ...