20201112
This commit is contained in:
1
application/api/common.php
Normal file
1
application/api/common.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
5
application/api/config.php
Normal file
5
application/api/config.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
//配置文件
|
||||
return [
|
||||
|
||||
];
|
||||
60
application/api/controller/Journal.php
Normal file
60
application/api/controller/Journal.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* @title 期刊web接口
|
||||
* @description 期刊web相关操作
|
||||
* @group 期刊web相关
|
||||
*/
|
||||
class Journal extends Controller {
|
||||
//put your code here
|
||||
protected $admin_obj = '';
|
||||
protected $journal_obj = '';
|
||||
protected $article_obj = '';
|
||||
protected $journal_topic_obj = '';
|
||||
protected $journal_stage_obj = '';
|
||||
protected $journal_abs_obj = '';
|
||||
protected $article_to_topic_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null) {
|
||||
parent::__construct($request);
|
||||
$this->admin_obj = Db::name('admin');
|
||||
$this->journal_obj = Db::name('journal');
|
||||
$this->article_obj = Db::name('article');
|
||||
$this->journal_topic_obj = Db::name('journal_topic');
|
||||
$this->journal_stage_obj = Db::name('journal_stage');
|
||||
$this->journal_abs_obj = Db::name('journal_abstracting');
|
||||
$this->article_to_topic_obj = Db::name('article_to_topic');
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊列表
|
||||
* @description 获取期刊列表
|
||||
* @author wangjinlei
|
||||
* @url /api/Journal/getJournalList
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @return journalList:期刊列表@
|
||||
* @journalList title:标题 issn:issn editorinchief:editorinchief acceptance:acceptance finaldecision:finaldecision apc:apc
|
||||
*/
|
||||
public function getJournalList(){
|
||||
$where['j_journal.state'] = 0;
|
||||
$res = $this->journal_obj
|
||||
->field('j_journal.*,j_admin.realname realname')
|
||||
->join('j_admin','j_admin.admin_id = j_journal.editor_id','LEFT')
|
||||
->where($where)
|
||||
->order('j_journal.sort desc')
|
||||
->select();
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['journalList'=>$res]]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -12,7 +12,8 @@ return [
|
||||
'app\master\controller\Admin',
|
||||
'app\master\controller\Mysystem',
|
||||
'app\master\controller\Journal',
|
||||
'app\master\controller\Article'
|
||||
'app\master\controller\Article',
|
||||
'app\api\controller\Journal'
|
||||
],
|
||||
'filter_method' => [
|
||||
//过滤 不解析的方法名称
|
||||
|
||||
Reference in New Issue
Block a user