afa 7 달 전
부모
커밋
3df134ca94
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      application/api/controller/Announcement.php

+ 2 - 2
application/api/controller/Announcement.php

@@ -24,8 +24,8 @@ class Announcement extends Api
         $typeId = $this->request->param('type_id', 1, 'intval');
         $paginator = $announcementModel->where('type_id', $typeId)
             ->where('status', 1)->where('to_lang', $this->lan)
-            ->order('weigh desc')
-            ->field('id,to_lang,img_url,createtime,title as title,introduction,body')
+            ->field('id,to_lang,weigh,img_url,createtime,title as title,introduction,body')
+            ->order('weigh desc, id desc')
             ->paginate($this->pageSize);
         $this->success('', $this->buildResp($paginator->total(), $paginator->currentPage(), $paginator->items()));
     }