小bug修复
This commit is contained in:
@@ -1381,13 +1381,24 @@ class Production extends Base
|
||||
$typesetInfo['refers'] = json_encode($rs);
|
||||
|
||||
$main_list = $this->article_main_obj->where("article_id",$data['article_id'])->whereIn("state",[0,2])->order("sort")->select();
|
||||
|
||||
$start = 0;
|
||||
foreach ($main_list as $k => $v){
|
||||
$cas = strip_tags($v['content']);
|
||||
if(strtolower(substr($cas, 0, 8)) === "keywords"){
|
||||
$start = $k;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$mainList = [];
|
||||
$images = [];
|
||||
$tables = [];
|
||||
foreach ($main_list as $k =>$item){
|
||||
if($start>=$k){
|
||||
continue;
|
||||
}
|
||||
$main_string = "";
|
||||
if($item['type']==1){
|
||||
continue;
|
||||
$info = $this->article_main_image_obj->where("ami_id",$item['ami_id'])->find();
|
||||
$arr['image'] = $info['url'];
|
||||
$arr['title'] = "<r>".$info['title']."</r>";
|
||||
@@ -1395,6 +1406,7 @@ class Production extends Base
|
||||
$images[$info['ami_id']] = $arr;
|
||||
$main_string = "<img src='https://submission.tmrjournals.com/public/articleImage/".$info['url']."' imageId='".$info['ami_id']."'/>";
|
||||
}else if($item['type']==2){
|
||||
continue;
|
||||
$info = $this->article_main_table_obj->where("amt_id",$item['amt_id'])->find();
|
||||
$arr_table['title'] = "<t>".strip_tags($info['title'])."</t>";
|
||||
$arr_table['table_data'] = $info['table_data'];
|
||||
@@ -1414,8 +1426,34 @@ class Production extends Base
|
||||
$mainList[] = $main_string;
|
||||
}
|
||||
$typesetInfo['mainText'] = json_encode($mainList);
|
||||
$typesetInfo['images'] = $images==[]?null:$images;
|
||||
$typesetInfo['tables'] = $tables==[]?null:$tables;
|
||||
// $typesetInfo['images'] = $images==[]?null:$images;
|
||||
// $typesetInfo['tables'] = $tables==[]?null:$tables;
|
||||
|
||||
$as = $this->user_obj->field("t_user.*,t_article_reviewer_question.is_anonymous")
|
||||
->join("t_article_reviewer","t_article_reviewer.reviewer_id=t_user.user_id","left")
|
||||
->join("t_article_reviewer_question","t_article_reviewer_question.art_rev_id=t_article_reviewer.art_rev_id","left")
|
||||
->where("t_article_reviewer.article_id",$article_info['article_id'])
|
||||
->whereIn("t_article_reviewer.state",[1,2,3])
|
||||
->select();
|
||||
$as_str = "";
|
||||
$has_yc = false;
|
||||
foreach ($as as $v){
|
||||
if($v['is_anonymous']==1){
|
||||
$has_yc = true;
|
||||
}else{
|
||||
$as_str .= $v["realname"].", ";
|
||||
}
|
||||
}
|
||||
$aca= trim(trim($as_str),",");
|
||||
// return jsonSuccess(["ddd"=>$has_yc?$aca." and other anonymous reviewers":$aca]);
|
||||
if($as_str==""){
|
||||
$author_str = "all anonymous reviewers";
|
||||
}else{
|
||||
$author_str = $has_yc?$aca." and other anonymous reviewers":$aca;
|
||||
}
|
||||
$typesetInfo['author_str'] = $author_str;
|
||||
$typesetInfo['images'] = null;
|
||||
$typesetInfo['tables'] = null;
|
||||
|
||||
$url = $this->ts_base_url."api/typeset/createDocx";
|
||||
// $url = "http://192.168.110.110:8081/typeset/createDocx";
|
||||
|
||||
Reference in New Issue
Block a user