fix:OCR识别到10位书号时转为13位ISBN,删除假ISBN生成

This commit is contained in:
97694732@qq.com 2026-06-15 11:36:07 +08:00
parent b7a6fbe73a
commit 3b2f3441e0

View File

@ -2795,9 +2795,12 @@ export default {
if (bookCode.length === 13 && bookCode.startsWith('978')) {
this.noIsbnIsbn = bookCode
this.noIsbnUnifyIsbn = ''
} else if (bookCode.length === 10 && /^\d{9}[\dXx]$/i.test(bookCode)) {
// 10 13ISBN
this.noIsbnIsbn = this.convertIsbn10To13(bookCode)
this.noIsbnUnifyIsbn = ''
} else {
this.noIsbnUnifyIsbn = texts.书号
this.noIsbnIsbn = '678' + String(Date.now()).slice(-10)
}
}
if (texts.字数) this.noIsbnWordCount = this.processNoIsbnWordage(texts.字数)