This commit is contained in:
@@ -1236,14 +1236,25 @@ class Journal extends Controller {
|
||||
*/
|
||||
public function getMainPageStages() {
|
||||
$data = $this->request->post();
|
||||
$show_type = $this->journal_obj->where(['journal_id'=> $data['journal_id'],'state'=>0])->value('topic_show_type');
|
||||
$frag = [];
|
||||
if($show_type==0){
|
||||
$list = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('stage_year', date("Y"))->where('is_publish', 1)->where('state', 0)->order("stage_no desc")->select();
|
||||
if (count($list) == 0) {
|
||||
$frag = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('stage_year', date("Y", strtotime("-1 year")))->where('is_publish', 1)->where('state', 0)->order("stage_no desc")->select();
|
||||
} else {
|
||||
$frag = $list;
|
||||
}
|
||||
$re['topic_show_type'] = $this->journal_obj->where(['journal_id'=> $data['journal_id'],'state'=>0])->value('topic_show_type');
|
||||
}else{
|
||||
$frag=$this->journal_stage_obj
|
||||
->where('journal_id', $data['journal_id'])
|
||||
->where('is_publish', 1)
|
||||
->where('state', 0)
|
||||
->order("stage_year desc,stage_no desc")
|
||||
->limit(1,4)
|
||||
->select();
|
||||
}
|
||||
$re['topic_show_type'] = $show_type;
|
||||
$re['stages'] = $frag;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ class Main extends Controller {
|
||||
// $push_url = 'http://www.journal.com/api/Main/getImgFile';
|
||||
|
||||
//定义需要查询同化的数组
|
||||
$list = ['articleCite','articlePDF','articleicon','articleSUB','boardIcon','articleSUB2','baseTopic','journalCfp','journalfooter','journalicon','journalline','rotation','journaltopic','specialIcon','system','articleCDF'];
|
||||
$list = ['articleCite','articlePDF','articleicon','articleSUB','boardIcon','articleSUB2','baseTopic','journalCfp','journalstage','journalfooter','journalicon','journalline','rotation','journaltopic','specialIcon','system','articleCDF'];
|
||||
|
||||
foreach ($list as $v){
|
||||
$dir = $root_url."public/".$v."/".date('Ymd');
|
||||
|
||||
Reference in New Issue
Block a user