作者 何书鹏

分类排序

@@ -66,7 +66,7 @@ class Index extends Api @@ -66,7 +66,7 @@ class Index extends Api
66 { 66 {
67 67
68 $model = new Category(); 68 $model = new Category();
69 - $list = $model->where('is_index','1')->field('id,name,image')->limit(10)->select(); 69 + $list = $model->where('is_index','1')->field('id,name,image')->order('weigh desc')->limit(10)->select();
70 $this->success('首页分类',$list); 70 $this->success('首页分类',$list);
71 } 71 }
72 72