|
|
@@ -41,18 +41,20 @@ class Home extends Api
|
|
|
];
|
|
|
// banner
|
|
|
$resp['banner_list'] = $announcement
|
|
|
- ->field('id,'.$this->lan.'_title as title,img_url,createtime')
|
|
|
+ ->field('id,title as title,img_url,createtime')
|
|
|
->where('type_id', $announcement::Banner)
|
|
|
->where('status', $announcement::Normal)
|
|
|
+ ->where('to_lang', getLangKey($this->lan))
|
|
|
->limit(0,10)
|
|
|
->order('id DESC,weigh desc')
|
|
|
->select();
|
|
|
|
|
|
// 最新公告
|
|
|
$resp['notice_list'] = $announcement
|
|
|
- ->field('id,'.$this->lan.'_title as title,img_url,createtime')
|
|
|
+ ->field('id,title as title,img_url,createtime')
|
|
|
->where('type_id', $announcement::Announ)
|
|
|
->where('status', $announcement::Normal)
|
|
|
+ ->where('to_lang', getLangKey($this->lan))
|
|
|
->limit(0,10)
|
|
|
->order('id DESC,weigh desc')
|
|
|
->select();
|