diff --git a/application/api/controller/Supplementary.php b/application/api/controller/Supplementary.php index b0880e2..ab09c56 100644 --- a/application/api/controller/Supplementary.php +++ b/application/api/controller/Supplementary.php @@ -23,7 +23,7 @@ class Supplementary extends Base public function getJournalBoard(){ - //获取参数 + //获取参数 $aParam = $this->request->post(); //参数验证 @@ -38,17 +38,17 @@ class Supplementary extends Base $aWhere = ['state' => 0,'issn' => ['in',$sIssn]]; $aJournal = Db::name('journal')->where($aWhere)->column('journal_id,issn'); if(empty($aJournal)){ - return json_encode(['status' => 3,'msg' => 'No journal information found']); + return json_encode(['status' => 3,'msg' => 'No journal information found']); } //查询期刊编辑信息 $aWhere = ['state' => 0,'journal_id' => ['in',array_keys($aJournal)]]; if(isset($aParam['type'])){//编辑类型 - $aWhere['type'] = $aParam['type']; + $aWhere['type'] = $aParam['type']; } $aJournalBoard = Db::name('board_to_journal')->field('journal_id,user_id')->where($aWhere)->select(); if(empty($aJournalBoard)){ - return json_encode(['status' => 4,'msg' => 'No editorial information was found for the journal']); + return json_encode(['status' => 4,'msg' => 'No editorial information was found for the journal']); } //查询编辑详情 @@ -62,10 +62,13 @@ class Supplementary extends Base continue; } $sRealName = empty($aUser[$value['user_id']]) ? '' : $aUser[$value['user_id']]; + if(!empty($sRealName) && strlen($sRealName) >= 3 && substr($sRealName, 0, 3) === "\xEF\xBB\xBF") { + $sRealName = substr($sRealName, 3); + } $aUserData[$sIssn][] = $sRealName; } - return json_encode(['status' => 1,'msg' => 'success','data' => $aUserData]); - } + return json_encode(['status' => 1,'msg' => 'success','data' => $aUserData]); + } /** * @title 获取文章底部信息 * @description 获取期刊编辑接口