This commit is contained in:
@@ -161,8 +161,12 @@ class Special extends Controller {
|
||||
public function getSpecials(){
|
||||
$data = $this->request->post();
|
||||
$list = $this->journal_special_obj->where('journal_id',$data['journal_id'])->where('state',2)->order('journal_special_id desc')->limit(4)->select();
|
||||
$f = [];
|
||||
//获取作者
|
||||
foreach ($list as $k => $v){
|
||||
if(strtotime($v['deadline'])< time()){
|
||||
continue;
|
||||
}
|
||||
$frag = '';
|
||||
$caches = $this->journal_special_to_editor_obj
|
||||
->field('j_journal_special_editor.*')
|
||||
@@ -173,10 +177,11 @@ class Special extends Controller {
|
||||
foreach ($caches as $val){
|
||||
$frag .= $frag == ''?$val['first_name'].' '.$val['last_name']:', '.$val['first_name'].' '.$val['last_name'];
|
||||
}
|
||||
$list[$k]['editor'] = $frag;
|
||||
$v['editor'] = $frag;
|
||||
$f[] = $v;
|
||||
}
|
||||
|
||||
$re['specials'] = $list;
|
||||
$re['specials'] = $f;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user