20201112
This commit is contained in:
@@ -431,6 +431,8 @@ class Article extends Controller {
|
||||
*
|
||||
* @param name:article_id type:int require:1 desc:文章id
|
||||
* @param name:title type:string require:1 desc:标题
|
||||
* @param name:subtitle type:string require:0 desc:副标题
|
||||
* @param name:rotation type:string require:0 desc:轮播图
|
||||
* @param name:icon type:string require:1 desc:图片
|
||||
* @param name:tradition_tag type:string require:1 desc:封皮标签
|
||||
* @param name:tradition type:string require:1 desc:封皮简介
|
||||
@@ -456,7 +458,9 @@ class Article extends Controller {
|
||||
$this->editArticleLtai($data['ltai'], $data['article_id']);
|
||||
}
|
||||
$updata['icon'] = $data['icon'];
|
||||
$updata['title'] = $data['title'];
|
||||
$updata['title'] = trim($data['title']);
|
||||
$updata['subtitle'] = isset($data['subtitle'])?trim($data['subtitle']):'';
|
||||
$updata['rotation'] = isset($data['rotation'])?$data['rotation']:'';
|
||||
$updata['journal_stage_id'] = $data['journal_stage_id'];
|
||||
$updata['journal_special_id'] = $data['journal_special_id'];
|
||||
$updata['tradition_tag'] = $data['tradition_tag'];
|
||||
@@ -514,7 +518,7 @@ class Article extends Controller {
|
||||
* @method POST
|
||||
*
|
||||
* @param name:article_id type:int require:1 desc:文章id
|
||||
* @param name:filetype type:string require:1 desc:文件类型(PDF/HTML/SUB/SUB2/endNote/bibTex)
|
||||
* @param name:filetype type:string require:1 desc:文件类型(PDF/HTML/SUB/SUB2/endNote/bibTex/CDF)
|
||||
* @param name:fileURL type:string require:1 desc:文件地址
|
||||
*
|
||||
*/
|
||||
@@ -532,6 +536,8 @@ class Article extends Controller {
|
||||
$updata['endnote'] = $data['fileURL'];
|
||||
} elseif ($data['filetype'] == 'bibTex') {
|
||||
$updata['bibtex'] = $data['fileURL'];
|
||||
}elseif($data['filetype'] == 'CDF'){
|
||||
$updata['file_cdf'] = $data['fileURL'];
|
||||
}
|
||||
$this->article_obj->where('article_id', $data['article_id'])->update($updata);
|
||||
return json(['code' => 0, 'msg' => 'success']);
|
||||
@@ -773,6 +779,29 @@ class Article extends Controller {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 轮播图上传
|
||||
* @description 轮播图上传
|
||||
* @author wangjinlei
|
||||
* @url /master/Article/up_rotation_file
|
||||
* @method POST
|
||||
*
|
||||
* @param name:name type:string require:1 default:rotation desc:文件域名称
|
||||
*
|
||||
* @return upurl:图片地址
|
||||
*/
|
||||
public function up_rotation_file(){
|
||||
$file = request()->file('rotation');
|
||||
if ($file) {
|
||||
$info = $file->move(ROOT_PATH . 'public' . DS . 'rotation');
|
||||
if ($info) {
|
||||
return json(['code' => 0, 'msg' => 'success', 'upurl' => str_replace("\\", "/", $info->getSaveName())]);
|
||||
} else {
|
||||
return json(['code' => 1, 'msg' => $file->getError()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title cite图片上传
|
||||
@@ -796,6 +825,29 @@ class Article extends Controller {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title CDF文件上传
|
||||
* @description CDF文件上传
|
||||
* @author wangjinlei
|
||||
* @url /master/Article/up_cdf_file
|
||||
* @method POST
|
||||
*
|
||||
* @param name:name type:string require:1 default:articleCDF desc:文件域名称
|
||||
*
|
||||
* @return upurl:图片地址
|
||||
*/
|
||||
public function up_cdf_file(){
|
||||
$file = request()->file('articleCDF');
|
||||
if ($file) {
|
||||
$info = $file->move(ROOT_PATH . 'public' . DS . 'articleCDF');
|
||||
if ($info) {
|
||||
return json(['code' => 0, 'msg' => 'success', 'upurl' => str_replace("\\", "/", $info->getSaveName())]);
|
||||
} else {
|
||||
return json(['code' => 1, 'msg' => $file->getError()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 文章文件上传
|
||||
@@ -804,8 +856,8 @@ class Article extends Controller {
|
||||
* @url /master/Article/article_file
|
||||
* @method GET
|
||||
*
|
||||
* @param name:name type:string require:1 desc:文件域名称(articlePDF/articleHTML/articleSUB/articleSUB2/bibTex/endNote)
|
||||
* @param name:type type:string require:1 desc:pathinfo(articlePDF/articleHTML/articleSUB/articleSUB2/bibTex/endNote)
|
||||
* @param name:name type:string require:1 desc:文件域名称(articlePDF/articleHTML/articleSUB/articleSUB2/bibTex/endNote/articleCDF)
|
||||
* @param name:type type:string require:1 desc:pathinfo(articlePDF/articleHTML/articleSUB/articleSUB2/bibTex/endNote/articleCDF)
|
||||
*
|
||||
* @return upurl:图片地址
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user