1
This commit is contained in:
@@ -139,6 +139,13 @@ class Preaccept extends Base
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$doi = trim($data['doi']);
|
||||
$url = "https://citation.crosscite.org/format?doi=$doi&style=cancer-translational-medicine&lang=en-US";
|
||||
$res = myGet($url);
|
||||
$frag = trim(substr($res, strpos($res, '.') + 1));
|
||||
if ($frag == "") {
|
||||
return jsonError("doi error");
|
||||
}
|
||||
$this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->update(['refer_doi'=>$data['doi']]);
|
||||
my_doiToFrag2($this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->find());
|
||||
return jsonSuccess([]);
|
||||
|
||||
Reference in New Issue
Block a user