This commit is contained in:
wangjinlei
2025-01-16 14:17:25 +08:00
parent 60eb394f4f
commit f7d0ff0006
2 changed files with 21 additions and 0 deletions

View File

@@ -168,6 +168,22 @@ class Publish extends Base
return jsonSuccess($re); return jsonSuccess($re);
} }
public function getPublishArticleDetail(){
$data = $this->request->post();
$rule = new Validate([
"article_id"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/getArticleDetail';
$pra = [];
$pra['article_id'] = $data['article_id'];
$res = object_to_array(json_decode(myPost($url, $pra)));
$re['detail'] = $res['data']["detail"];
return jsonSuccess($re);
}
public function createHtmlForType2(){ public function createHtmlForType2(){
$data = $this->request->post(); $data = $this->request->post();
$rule = new Validate([ $rule = new Validate([
@@ -184,6 +200,10 @@ class Publish extends Base
if(!$check){ if(!$check){
$this->addArticleMainEx($product['article_id']); $this->addArticleMainEx($product['article_id']);
} }
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/changeArticleType2';
$pra = [];
$pra['article_id'] = $data['article_id'];
myPost($url, $pra);
$mains = $this->article_main_obj->where("article_id",$product['article_id'])->whereIn("state",[0,2])->order("sort asc")->select(); $mains = $this->article_main_obj->where("article_id",$product['article_id'])->whereIn("state",[0,2])->order("sort asc")->select();
if(!$mains){ if(!$mains){
return jsonError("error"); return jsonError("error");

View File

@@ -730,6 +730,7 @@ function my_doiToFrag2($data)
if (mb_substr_count($frag, '.') != 3) { if (mb_substr_count($frag, '.') != 3) {
$f = $frag . " Available at: " . PHP_EOL . "http://doi.org/" . $data['refer_doi']; $f = $frag . " Available at: " . PHP_EOL . "http://doi.org/" . $data['refer_doi'];
$update['refer_frag'] = $f; $update['refer_frag'] = $f;
$update['refer_type'] = "other";
$update['cs'] = 1; $update['cs'] = 1;
} else { } else {
$res = explode('.', $frag); $res = explode('.', $frag);