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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 编辑添加审稿实例(临时开启,为了补充审稿实例不够)
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ use hashids\hashids;
|
||||
class Base extends Controller
|
||||
{
|
||||
|
||||
protected $ts_base_url = "http://ts.tmrjournals.cn/";
|
||||
protected $ts_base_url = "http://ts.tmrjournals.com/";
|
||||
|
||||
protected $user_obj = '';
|
||||
protected $captcha_obj = '';
|
||||
|
||||
@@ -849,7 +849,7 @@ class Reviewer extends Base
|
||||
if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $content)>0){//含有中文
|
||||
if($journal_info['journal_id']==1){
|
||||
if(mb_strlen($content, 'UTF8')<150){
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 100 words).");
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 150 words).");
|
||||
}
|
||||
}else{
|
||||
if(mb_strlen($content, 'UTF8')<100){
|
||||
@@ -860,7 +860,7 @@ class Reviewer extends Base
|
||||
if($journal_info['journal_id']==1){
|
||||
$carray = explode(" ", $content);
|
||||
if(count($carray)<150){
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 100 words).");
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 150 words).");
|
||||
}
|
||||
}else{
|
||||
$carray = explode(" ", $content);
|
||||
|
||||
@@ -1898,7 +1898,7 @@ class User extends Base
|
||||
$user_info = $this->user_obj->where('account', $account)->find();
|
||||
if ($user_info['type'] == 2) {
|
||||
$ros[] = 'editor';
|
||||
if($account=="liuna"){
|
||||
if($account=="liuna"||$account=="zhuwenjing"){
|
||||
$ros[] = "superadmin";
|
||||
}
|
||||
return $ros;
|
||||
|
||||
Reference in New Issue
Block a user