From 9e623e65aba1de175f9c66c53213a03a82556da5 Mon Sep 17 00:00:00 2001 From: "97694732@qq.com" Date: Mon, 15 Jun 2026 11:32:16 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=E4=B8=8D=E5=AE=8C=E6=95=B4?= =?UTF-8?q?=E4=B9=A6=E5=8F=B7=E4=B8=8D=E8=A7=A6=E5=8F=91=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?,=E9=98=B2=E6=AD=A2=E6=B1=A1=E6=9F=93ISBN=E5=AD=97=E6=AE=B5"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b2fe3b2fa77616115ca64b29bfa7f8ac0df8fbb3. --- pages/upload/upload.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/upload/upload.vue b/pages/upload/upload.vue index deeae82..cf8e308 100644 --- a/pages/upload/upload.vue +++ b/pages/upload/upload.vue @@ -1262,12 +1262,12 @@ export default { methods: { // ISBN-10 转 ISBN-13(自动转换) convertIsbn10To13(isbn) { - if (!isbn) return '' + if (!isbn) return isbn // 去掉连字符和空格 var clean = isbn.replace(/[-\s]/g, '') // 只处理10位纯数字(可能有X结尾) var match = clean.match(/^(\d{9})([\dXx])$/) - if (!match) return '' + if (!match) return isbn // 前9位 + 前缀978 var digits = '978' + match[1] // 计算ISBN-13校验码