接口调整

This commit is contained in:
chengxl
2025-12-03 17:01:54 +08:00
parent 488a312006
commit bf8b4ecf74

View File

@@ -188,6 +188,7 @@ class References extends Base
if(!is_string($sContent)){
return json_encode(['status' => 2,'msg' => 'The content format is incorrect']);
}
$sContent = str_replace(['?',''], '.', $sContent);
$aContent = explode('.', $sContent);
$aUpdate = [];
if(count($aContent) > 1){
@@ -218,6 +219,7 @@ class References extends Base
$doiPattern = '/10\.\d{4,9}\/[^\s\/?#&=]+/i';
if (preg_match($doiPattern, $sDoi, $matches)) {
$aUpdate['doi'] = $matches[0];
$aUpdate['doilink'] = 'https://doi.org/'.''.$aUpdate['doi'];
}else{
$aUpdate['doi'] = $sDoi;
}