自动推广

This commit is contained in:
wangjinlei
2026-04-03 11:45:45 +08:00
parent 22947a56a4
commit a802b2e923
11 changed files with 2240 additions and 36 deletions

View File

@@ -2,6 +2,7 @@
namespace app\api\controller;
use app\api\controller\Base;
use think\Db;
use think\Validate;
class Crossrefdoi extends Base{
public function __construct(\think\Request $request = null) {
@@ -99,6 +100,21 @@ class Crossrefdoi extends Base{
return json_encode(['status' => 1,'msg' => 'Update successful']);
}
public function getOneDoi(){
$data = $this->request->post();
$rule = new Validate([
"doi"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$sCheckDoi = $this->fetchSingleDoiWithRetry($this->filterValidDoi($data['doi'])); // 过滤非法DOI
return jsonSuccess($sCheckDoi);
}
/**
* 过滤非法DOI仅保留10.xxxx/xxx格式
*/