qifengquan 1 рік тому
батько
коміт
ae57afa1c7
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      application/api/controller/Community.php

+ 1 - 1
application/api/controller/Community.php

@@ -99,7 +99,7 @@ class Community extends Api
             case 4:
                 $where = ['belong'=>4];
         }
-        $data = Document::where($where)->select();
+        $data = Document::where($where)->order('weigh desc')->select();
         $res = [];
         foreach ($data as $k=>$v){
             array_push($res,$v->toarray());