20201112
This commit is contained in:
@@ -97,7 +97,6 @@ class Article extends Controller {
|
||||
$re['cite'] = $cite;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
private function sys_author($authors, $organs, $atto) {
|
||||
$cache = [];
|
||||
foreach ($organs as $k => $v) {
|
||||
@@ -221,7 +220,6 @@ class Article extends Controller {
|
||||
}
|
||||
$list[$k]['title'] = $cache_title;
|
||||
}
|
||||
|
||||
$re['stageInfo'] = $stage_info;
|
||||
$re['articleList'] = $list;
|
||||
return jsonSuccess($re);
|
||||
@@ -299,5 +297,263 @@ class Article extends Controller {
|
||||
$re['articleList'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取文章ris文件
|
||||
* @description 获取文章ris文件
|
||||
* @author wangjinlei
|
||||
* @url /api/Article/getArticleRis
|
||||
* @method POST
|
||||
*
|
||||
* @param name:article_id type:int require:1 desc:文章id
|
||||
*
|
||||
* @return url:地址
|
||||
*/
|
||||
public function getArticleRis(){
|
||||
$data = $this->request->post();
|
||||
$article_info = $this->article_obj->where('article_id',$data['article_id'])->find();
|
||||
$filename = trim(strrchr($article_info['doi'], '/'),'/');
|
||||
$file_path = '../public/article/ris/'.$filename.'.ris';
|
||||
if(!file_exists($file_path)){
|
||||
//创建ris文件的内容
|
||||
$ris = 'TY - JOUR'."\n";
|
||||
$ris .= 'T1 - '.$article_info['title']."\n";
|
||||
$authors = $this->article_author_obj->where('article_id',$article_info['article_id'])->where('state',0)->select();
|
||||
$journal = $this->journal_obj->where('journal_id',$article_info['journal_id'])->find();
|
||||
foreach ($authors as $vv){
|
||||
$ris .= 'AU - '.$vv['last_name'].', '.$vv['first_name']."\n";
|
||||
}
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id',$article_info['journal_stage_id'])->find();
|
||||
$ris .= 'JO - '.$journal['title']."\n";
|
||||
$ris .= 'VL - '.$stage_info['stage_vol']."\n";
|
||||
$ca_fq = explode('-', $stage_info['stage_page']);
|
||||
$ris .= 'SP - '.$ca_fq[0]."\n";if(isset($ca_fq[1])){
|
||||
$ris .= 'EP - '.$ca_fq[1]."\n";
|
||||
}
|
||||
$ris .= 'PY - '.$stage_info['stage_year']."\n";
|
||||
$ris .= 'DA - '. $this->chendate($stage_info['issue_date'])."\n";
|
||||
$ris .= 'SN - '.$journal['issn']."\n";
|
||||
$ris .= 'DO - https://doi.org/'.$article_info['doi']."\n";
|
||||
$ris .= 'UR - https://www.tmrjournals.com/article.html?J_num='.$journal['journal_id'].'&a_id='.$article_info['article_id']."\n";
|
||||
$ris .= 'J2 - '.$journal['jabbr']."\n";
|
||||
$ris .= 'JF - '.$journal['title']."\n";
|
||||
$kws = explode(', ', $article_info['keywords']);
|
||||
foreach ($kws as $vvv){
|
||||
$ris .= 'KW - '.str_replace('</i>','',str_replace('<i>','',$vvv))."\n";
|
||||
}
|
||||
$abs = str_replace('Abstract','',strip_tags(str_replace(" ","",htmlspecialchars_decode($article_info['abstract']))));
|
||||
$ris .= 'AB - '.$abs."\n";
|
||||
$ris .= 'ER - '."\n";
|
||||
//生成ris文件
|
||||
file_put_contents($file_path,$ris);
|
||||
}
|
||||
$re['url'] = '/public/article/ris/'.$filename.'.ris';
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取文章enw文件
|
||||
* @description 获取文章enw文件
|
||||
* @author wangjinlei
|
||||
* @url /api/Article/getArticleenw
|
||||
* @method POST
|
||||
*
|
||||
* @param name:article_id type:int require:1 desc:文章id
|
||||
*
|
||||
* @return url:地址
|
||||
*/
|
||||
public function getArticleenw(){
|
||||
$data = $this->request->post();
|
||||
// $data['article_id'] = 3;
|
||||
$article_info = $this->article_obj->where('article_id',$data['article_id'])->find();
|
||||
$filename = trim(strrchr($article_info['doi'], '/'),'/');
|
||||
$file_path = '../public/article/enw/'.$filename.'.enw';
|
||||
if(!file_exists($file_path)){
|
||||
//创建ris文件的内容
|
||||
$ris = 'TY - JOUR'."\n";
|
||||
$ris .= 'T1 - '.$article_info['title']."\n";
|
||||
$authors = $this->article_author_obj->where('article_id',$article_info['article_id'])->where('state',0)->select();
|
||||
$journal = $this->journal_obj->where('journal_id',$article_info['journal_id'])->find();
|
||||
foreach ($authors as $vv){
|
||||
$ris .= 'AU - '.$vv['last_name'].', '.$vv['first_name']."\n";
|
||||
}
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id',$article_info['journal_stage_id'])->find();
|
||||
$ris .= 'JO - '.$journal['title']."\n";
|
||||
$ris .= 'VL - '.$stage_info['stage_vol']."\n";
|
||||
$ca_fq = explode('-', $stage_info['stage_page']);
|
||||
$ris .= 'SP - '.$ca_fq[0]."\n";
|
||||
if(isset($ca_fq[1])){
|
||||
$ris .= 'EP - '.$ca_fq[1]."\n";
|
||||
}
|
||||
$ris .= 'PY - '.$stage_info['stage_year']."\n";
|
||||
$ris .= 'DA - '. $this->chendate($stage_info['issue_date'])."\n";
|
||||
$ris .= 'SN - '.$journal['issn']."\n";
|
||||
$ris .= 'DO - https://doi.org/'.$article_info['doi']."\n";
|
||||
$ris .= 'UR - https://www.tmrjournals.com/article.html?J_num='.$journal['journal_id'].'&a_id='.$article_info['article_id']."\n";
|
||||
$ris .= 'J2 - '.$journal['jabbr']."\n";
|
||||
$ris .= 'JF - '.$journal['title']."\n";
|
||||
$kws = explode(', ', $article_info['keywords']);
|
||||
foreach ($kws as $vvv){
|
||||
|
||||
$ris .= 'KW - '.str_replace('</i>','',str_replace('<i>','',$vvv))."\n";
|
||||
}
|
||||
$abs = str_replace('Abstract','',strip_tags(str_replace(" ","",htmlspecialchars_decode($article_info['abstract']))));
|
||||
$ris .= 'AB - '.$abs."\n";
|
||||
$ris .= 'ER - '."\n";
|
||||
//生成ris文件
|
||||
file_put_contents($file_path,$ris);
|
||||
}
|
||||
$re['url'] = '/public/article/enw/'.$filename.'.enw';
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取文章bib文件
|
||||
* @description 获取文章bib文件
|
||||
* @author wangjinlei
|
||||
* @url /api/Article/getArticlebib
|
||||
* @method POST
|
||||
*
|
||||
* @param name:article_id type:int require:1 desc:文章id
|
||||
*
|
||||
* @return url:地址
|
||||
*/
|
||||
public function getArticlebib(){
|
||||
$data = $this->request->post();
|
||||
$article_info = $this->article_obj->where('article_id',$data['article_id'])->find();
|
||||
$filename = trim(strrchr($article_info['doi'], '/'),'/');
|
||||
$file_path = '../public/article/bib/'.$filename.'.bib';
|
||||
if(!file_exists($file_path)){
|
||||
//创建ris文件的内容
|
||||
$ris = '@article{'.$article_info['doi'].",\n";
|
||||
$ris .= 'title = "'.$article_info['title'].'"'.",\n";
|
||||
$authors = $this->article_author_obj->where('article_id',$article_info['article_id'])->where('state',0)->select();
|
||||
$journal = $this->journal_obj->where('journal_id',$article_info['journal_id'])->find();
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id',$article_info['journal_stage_id'])->find();
|
||||
$ris .= 'journal = "'.$journal['title'].'"'.",\n";
|
||||
$ris .= 'volume = "'.$stage_info['stage_vol'].'"'.",\n";
|
||||
$ris .= 'pages = "'.$stage_info['stage_page'].'"'.",\n";
|
||||
$ris .= 'year = "'.$stage_info['stage_year'].'"'.",\n";
|
||||
$ris .= 'issn = "'.$journal['issn'].'"'.",\n";
|
||||
$ris .= 'doi = "https://doi.org/'.$article_info['doi'].'"'.",\n";
|
||||
$ris .= 'url = "https://www.tmrjournals.com/article.html?J_num='.$journal['journal_id'].'&a_id='.$article_info['article_id'].'"'.",\n";
|
||||
$auts = '';
|
||||
foreach ($authors as $vv){
|
||||
$auts .= $vv['first_name'].' '.$vv['last_name']." and ";
|
||||
}
|
||||
$ris .= 'author = "'.substr($auts, 0,-5).'"'.",\n";
|
||||
$ris .= 'keywords = "'.str_replace('</i>','',str_replace('<i>','',$article_info['keywords'])).'"'.".\n";
|
||||
$ris .= 'abstract = "'.str_replace('Abstract','',strip_tags(str_replace(" ","",htmlspecialchars_decode($article_info['abstract'])))).'"'."\n";
|
||||
$ris .= '}';
|
||||
|
||||
file_put_contents($file_path,$ris);
|
||||
}
|
||||
$re['url'] = '/public/article/bib/'.$filename.'.bib';
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取文章text文件
|
||||
* @description 获取文章text文件
|
||||
* @author wangjinlei
|
||||
* @url /api/Article/getArticletext
|
||||
* @method POST
|
||||
*
|
||||
* @param name:article_id type:int require:1 desc:文章id
|
||||
*
|
||||
* @return url:地址
|
||||
*/
|
||||
public function getArticletext(){
|
||||
$data = $this->request->post();
|
||||
$article_info = $this->article_obj->where('article_id',$data['article_id'])->find();
|
||||
$filename = trim(strrchr($article_info['doi'], '/'),'/');
|
||||
$file_path = '../public/article/text/'.$filename.'.txt';
|
||||
if(!file_exists($file_path)){
|
||||
$authors = $this->article_author_obj->where('article_id',$article_info['article_id'])->where('state',0)->select();
|
||||
$journal = $this->journal_obj->where('journal_id',$article_info['journal_id'])->find();
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id',$article_info['journal_stage_id'])->find();
|
||||
$auts = '';
|
||||
foreach ($authors as $vv){
|
||||
$auts .= $vv['first_name'].' '.$vv['last_name'].", ";
|
||||
}
|
||||
$ris = substr($auts, 0,-2).",\n";
|
||||
$ris .= $article_info['title'].",\n";
|
||||
$ris .= $journal['title'].",\n";
|
||||
$ris .= 'Volume '.$stage_info['stage_vol'].",\n";
|
||||
$ris .= $stage_info['stage_year'].",\n";
|
||||
$ris .= 'Pages '.$stage_info['stage_page'].",\n";
|
||||
$ris .= 'ISSN '.$journal['issn'].",\n";
|
||||
$ris .= 'https://doi.org/'.$article_info['doi'].",\n";
|
||||
$ris .= '(https://www.tmrjournals.com/article.html?J_num='.$journal['journal_id'].'&a_id='.$article_info['article_id'].')'."\n";
|
||||
$ris .= 'Abstract:'.str_replace('Abstract','',strip_tags(str_replace(" ","",htmlspecialchars_decode($article_info['abstract']))))."\n";
|
||||
$ris .= 'Keywords:'. str_replace('</i>','',str_replace('<i>','',str_replace(',',';', $article_info['keywords'])))."\n";
|
||||
|
||||
file_put_contents($file_path,$ris);
|
||||
}
|
||||
$re['url'] = '/public/article/text/'.$filename.'.txt';
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
private function chendate($rq) {
|
||||
$st = explode(' ', $rq);
|
||||
$yf = '01';
|
||||
if(!isset($st[1])){
|
||||
return $rq;
|
||||
}
|
||||
switch ($st[1]){
|
||||
case 'January':
|
||||
$yf = '01';
|
||||
break;
|
||||
case 'February':
|
||||
$yf = '02';
|
||||
break;
|
||||
case 'March';
|
||||
$yf = '03';
|
||||
break;
|
||||
case 'April';
|
||||
$yf = '04';
|
||||
break;
|
||||
case 'May';
|
||||
$yf = '05';
|
||||
break;
|
||||
case 'June';
|
||||
$yf = '06';
|
||||
break;
|
||||
case 'July';
|
||||
$yf = '07';
|
||||
break;
|
||||
case 'August';
|
||||
$yf = '08';
|
||||
break;
|
||||
case 'September';
|
||||
$yf = '09';
|
||||
break;
|
||||
case 'October';
|
||||
$yf = '10';
|
||||
break;
|
||||
case 'November';
|
||||
$yf = '11';
|
||||
break;
|
||||
case 'December';
|
||||
$yf = '12';
|
||||
break;
|
||||
}
|
||||
return $st[2].'/'.$yf.'/'.$st[0].'/';
|
||||
}
|
||||
|
||||
|
||||
// public function ggname(){
|
||||
// $list = $this->article_author_obj->where('article_author_id >= 1500')->select();
|
||||
// foreach ($list as $v){
|
||||
// $cache = explode(' ', $v['author_name']);
|
||||
// $first = str_replace('-', '', $cache[0]);
|
||||
// $last = isset($cache[1])?$cache[1]:'';
|
||||
// $this->article_author_obj->where('article_author_id',$v['article_author_id'])->update(['first_name'=>$first,'last_name'=>$last]);
|
||||
// }
|
||||
// echo '<pre>';
|
||||
// var_dump($list);
|
||||
// echo '</pre>';
|
||||
// die;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ return [
|
||||
'app\master\controller\Journal',
|
||||
'app\master\controller\Article',
|
||||
'app\master\controller\Special',
|
||||
'app\master\controller\Datebase',
|
||||
'app\api\controller\Journal',
|
||||
'app\api\controller\Article',
|
||||
'app\api\controller\Special',
|
||||
|
||||
@@ -709,7 +709,7 @@ class Article extends Controller {
|
||||
*/
|
||||
public function getJournalSpecials(){
|
||||
$data = $this->request->post();
|
||||
$list = $this->journal_special_obj->where('journal_id',$data['journal_id'])->where('state',0)->select();
|
||||
$list = $this->journal_special_obj->where('journal_id',$data['journal_id'])->where('state',2)->select();
|
||||
|
||||
$re['specials'] = $list;
|
||||
return jsonSuccess($re);
|
||||
|
||||
205
application/master/controller/Datebase.php
Normal file
205
application/master/controller/Datebase.php
Normal file
@@ -0,0 +1,205 @@
|
||||
<?php
|
||||
namespace app\master\controller;
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* @title 数据库接口
|
||||
* @description 数据库接口
|
||||
* @group 数据库接口
|
||||
*/
|
||||
class Datebase extends Controller{
|
||||
|
||||
protected $admin_obj = '';
|
||||
protected $journal_obj = '';
|
||||
protected $article_obj = '';
|
||||
protected $journal_topic_obj = '';
|
||||
protected $journal_stage_obj = '';
|
||||
protected $journal_line_obj = '';
|
||||
protected $journal_notices_obj = '';
|
||||
protected $journal_abs_obj = '';
|
||||
protected $article_to_topic_obj = '';
|
||||
protected $article_to_line_obj = '';
|
||||
protected $journal_cfp_obj = '';
|
||||
protected $journal_paper_obj = '';
|
||||
protected $journal_paper_art_obj = '';
|
||||
protected $db_obj = '';
|
||||
protected $db_data_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_line_obj = Db::name('journal_line');
|
||||
$this->journal_notices_obj = Db::name('journal_notices');
|
||||
$this->journal_abs_obj = Db::name('journal_abstracting');
|
||||
$this->article_to_topic_obj = Db::name('article_to_topic');
|
||||
$this->article_to_line_obj = Db::name('article_to_line');
|
||||
$this->journal_cfp_obj = Db::name('journal_cfp');
|
||||
$this->journal_paper_obj = Db::name('journal_paper');
|
||||
$this->journal_paper_art_obj = Db::name('journal_paper_art');
|
||||
$this->db_obj = Db::name('db');
|
||||
$this->db_data_obj = Db::name('db_data');
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 增加数据库
|
||||
* @description 增加数据库
|
||||
* @author wangjinlei
|
||||
* @url /master/Datebase/addDb
|
||||
* @method POST
|
||||
*
|
||||
* @param name:name type:string require:1 desc:数据库名字
|
||||
* @param name:intro type:string require:1 desc:简介
|
||||
*/
|
||||
public function addDb(){
|
||||
$data = $this->request->post();
|
||||
$insert['name'] = $data['name'];
|
||||
$insert['intro'] = $data['intro'];
|
||||
$insert['ctime'] = time();
|
||||
|
||||
$this->db_obj->insert($insert);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除数据库
|
||||
* @description 删除数据库
|
||||
* @author wangjinlei
|
||||
* @url /master/Datebase/delDb
|
||||
* @method POST
|
||||
*
|
||||
* @param name:db_id type:int require:1 desc:数据库id
|
||||
*/
|
||||
public function delDb(){
|
||||
$data = $this->request->post();
|
||||
$this->db_obj->where('db_id',$data['db_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取数据库
|
||||
* @description 获取数据库
|
||||
* @author wangjinlei
|
||||
* @url /master/Datebase/getDbs
|
||||
* @method POST
|
||||
*
|
||||
* @return dblist:数据库列表array#
|
||||
*/
|
||||
public function getDbs(){
|
||||
$list = $this->db_obj->where('state',0)->select();
|
||||
|
||||
$re['dblist'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取数据库主页
|
||||
* @description 获取数据库主页
|
||||
* @author wangjinlei
|
||||
* @url /master/Datebase/getDbMain
|
||||
* @method POST
|
||||
*
|
||||
* @param name:db_id type:int require:1 desc:数据库id
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
*
|
||||
* @return dbInfo:数据库信息#
|
||||
*/
|
||||
public function getDbMain(){
|
||||
$data = $this->request->post();
|
||||
$info = $this->db_obj->where('db_id',$data['db_id'])->find();
|
||||
|
||||
//获取数据库完成情况(预留)
|
||||
|
||||
$re['dbInfo'] = $info;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 增加数据库资料
|
||||
* @description 增加数据库资料
|
||||
* @author wangjinlei
|
||||
* @url /master/Datebase/addData
|
||||
* @method POST
|
||||
*
|
||||
* @param name:db_id type:int require:1 desc:数据库id
|
||||
* @param name:name type:string require:1 desc:资料名称
|
||||
* @param name:url type:string require:1 desc:资料地址
|
||||
*/
|
||||
public function addData(){
|
||||
$data = $this->request->post();
|
||||
$insert['db_id'] = $data['db_id'];
|
||||
$insert['title'] = $data['name'];
|
||||
$insert['url'] = $data['url'];
|
||||
$insert['ctime'] = time();
|
||||
$this->db_data_obj->insert($insert);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除数据库资料
|
||||
* @description 删除数据库资料
|
||||
* @author wangjinlei
|
||||
* @url /master/Datebase/delData
|
||||
* @method POST
|
||||
*
|
||||
* @param name:db_data_id type:int require:1 desc:数据库资料id
|
||||
*/
|
||||
public function delData(){
|
||||
$data = $this->request->post();
|
||||
$this->db_data_obj->where('db_data_id',$data['db_data_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取数据库资料
|
||||
* @description 获取数据库资料
|
||||
* @author wangjinlei
|
||||
* @url /master/Datebase/getDatas
|
||||
* @method POST
|
||||
*
|
||||
* @param name:db_id type:int require:1 desc:数据库id
|
||||
* @param name:pageIndex type:int require:1 desc:当前页码数
|
||||
* @param name:pageSize type:int require:1 desc:单页数据条数
|
||||
*
|
||||
* @return count:总数据数
|
||||
* @return dataList:array#
|
||||
*/
|
||||
public function getDatas(){
|
||||
$data = $this->request->post();
|
||||
|
||||
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
|
||||
$list = $this->db_data_obj->where('db_id',$data['db_id'])->where('state',0)->limit($limit_start,$data['pageSize'])->select();
|
||||
$count = $this->db_data_obj->where('db_id',$data['db_id'])->count();
|
||||
|
||||
$re['dataList'] = $list;
|
||||
$re['count'] = $count;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 图片上传
|
||||
* @description 图片上传
|
||||
* @author wangjinlei
|
||||
* @url /master/Datebase/up_file
|
||||
* @method POST
|
||||
*
|
||||
* @param name:name type:string require:1 default:dbdata desc:文件域名称
|
||||
*
|
||||
* @return upurl:图片地址
|
||||
*/
|
||||
public function up_file() {
|
||||
$file = request()->file('dbdata');
|
||||
if ($file) {
|
||||
$info = $file->move(ROOT_PATH . 'public' . DS . 'dbdata');
|
||||
if ($info) {
|
||||
return json(['code'=>0 , 'msg'=>'success', 'upurl' => str_replace("\\", "/", $info->getSaveName())]);
|
||||
} else {
|
||||
return json(['code' => 1, 'msg' => $file->getError()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,7 +173,8 @@ class Journal extends Controller {
|
||||
* @param name:jabbr type:string require:0 desc:期刊简称
|
||||
* @param name:apc type:string require:1
|
||||
* @param name:publish_stage_id type:int require:1 desc:推广分期id
|
||||
* @param name:icon type:string require:1
|
||||
* @param name:icon type:string require:1
|
||||
* @param name:licon type:string require:1 desc:简易缩略图
|
||||
* @param name:editor_id type:int require:1 desc:编辑id
|
||||
* @param name:system_color type:string require:1
|
||||
* @param name:submission_url type:string require:1
|
||||
@@ -192,6 +193,7 @@ class Journal extends Controller {
|
||||
$insert_data['publish_stage_id'] = $data['publish_stage_id'];
|
||||
$insert_data['apc'] = $data['apc'];
|
||||
$insert_data['icon'] = $data['icon'];
|
||||
$insert_data['licon'] = $data['licon'];
|
||||
$insert_data['editor_id'] = $data['editor_id'];
|
||||
$insert_data['system_color'] = $data['system_color'];
|
||||
$insert_data['submission_url'] = $data['submission_url'];
|
||||
@@ -628,6 +630,29 @@ class Journal extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title footer图片上传
|
||||
* @description footer图片上传
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/up_footer_file
|
||||
* @method POST
|
||||
*
|
||||
* @param name:name type:string require:1 default:journalfooter desc:文件域名称
|
||||
*
|
||||
* @return upurl:图片地址
|
||||
*/
|
||||
public function up_footer_file() {
|
||||
$file = request()->file('journalfooter');
|
||||
if ($file) {
|
||||
$info = $file->move(ROOT_PATH . 'public' . DS . 'journalfooter');
|
||||
if ($info) {
|
||||
return json(['code'=>0 , 'msg'=>'success', 'upurl' => str_replace("\\", "/", $info->getSaveName())]);
|
||||
} else {
|
||||
return json(['code' => 1, 'msg' => $file->getError()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 添加期刊分期
|
||||
* @description 添加期刊分期
|
||||
|
||||
Reference in New Issue
Block a user