作者 何书鹏

分类排序

@@ -48,7 +48,7 @@ class Classification extends Api @@ -48,7 +48,7 @@ class Classification extends Api
48 { 48 {
49 $id = $this->request->post('id',0); 49 $id = $this->request->post('id',0);
50 $model = new Category(); 50 $model = new Category();
51 - $list = $model->field('id,name')->order('weight desc')->select(); 51 + $list = $model->field('id,name')->order('weigh desc')->select();
52 foreach ($list as $key => &$value){ 52 foreach ($list as $key => &$value){
53 $value['is_myself'] = $value['id']==$id?'1':'0'; 53 $value['is_myself'] = $value['id']==$id?'1':'0';
54 } 54 }