From dbc697e57f52906bd1adc26eef896580023d40c4 Mon Sep 17 00:00:00 2001 From: chengxl Date: Fri, 28 Nov 2025 09:20:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9C=9F=E5=8D=B7=E5=8F=B7?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/application/common.php b/application/common.php index 92cfe64..ba27249 100644 --- a/application/common.php +++ b/application/common.php @@ -850,6 +850,29 @@ function my_doiToFrag2($data) $update['refer_type'] = "journal"; $update['is_ja'] = $joura == trim($bj[0]) ? 0 : 1; $update['dateno'] = str_replace(' ', '', str_replace('-', '–', trim($bj[1]))); + //新增处理 期卷页码 20251127 start + if(!empty($update['dateno'])){ + $sStr = $update['dateno']; + $aStr = explode(':', $sStr); + if(!empty($aStr[1])){ + $parts = explode('–', $aStr[1]); + if(count($parts) == 2){ + $prefix = empty($parts[0]) ? 0 : intval($parts[0]); + $suffix = empty($parts[1]) ? 0 : intval($parts[1]); + if($prefix > $suffix){ + $prefixLen = strlen($prefix); + $suffixLen = strlen($sufix); + $missingLen = $prefixLen - $suffixLen; + if ($missingLen > 0) { + $fillPart = substr($prefix, 0, $missingLen); + $newSuffix = $fillPart . $suffix; + $update['dateno'] = $aStr[0].':'.$prefix.'-'.$newSuffix; + } + } + } + } + } + //新增处理 期卷页码 20251127 end $update['doilink'] = strpos($data['refer_doi'],"http")===false?"https://doi.org/" . $data['refer_doi']:$data['refer_doi']; $update['cs'] = 1; }