1
This commit is contained in:
@@ -6,6 +6,7 @@ use app\api\controller\Base;
|
||||
use think\Db;
|
||||
use think\Queue;
|
||||
use think\Validate;
|
||||
use PhpOffice\PhpWord\IOFactory;
|
||||
|
||||
/**
|
||||
* @title 文章接口
|
||||
@@ -1905,6 +1906,38 @@ class Article extends Base
|
||||
return json(['code' => 0]);
|
||||
}
|
||||
|
||||
|
||||
/**分解文章的图片和表格
|
||||
* @return void
|
||||
*/
|
||||
public function markArticleImgTab(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$article_info = $this->article_obj->where("article_id",$data['article_id'])->find();
|
||||
$files = $this->article_file_obj->where("article_id",$data['article_id'])->where("type_name","manuscirpt")->where("state",0)->order("ctme desc")->limit(1)->select();
|
||||
if(isset($files[0])){
|
||||
$file = $files[0]['file_url'];
|
||||
}
|
||||
$dir = ROOT_PATH."public/articleImage/".$article_info['accept_sn'];
|
||||
if (!is_dir($dir)) {
|
||||
mkdir($dir, 0777, true);
|
||||
}
|
||||
$url = $this->ts_base_url."api/typeset/markImages";
|
||||
$program['url'] = "https://submission.tmrjournals.com/public/".$files;
|
||||
$program['sn'] = $article_info['accept_sn'];
|
||||
$res = object_to_array(json_decode(myPost($url, $program)));
|
||||
$file_runs = $res['list'];
|
||||
return jsonSuccess($file_runs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 编辑添加审稿实例(临时开启,为了补充审稿实例不够)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user