fix:OCR识别到10位书号时转为13位ISBN,删除假ISBN生成
This commit is contained in:
parent
b7a6fbe73a
commit
3b2f3441e0
@ -2795,9 +2795,12 @@ export default {
|
|||||||
if (bookCode.length === 13 && bookCode.startsWith('978')) {
|
if (bookCode.length === 13 && bookCode.startsWith('978')) {
|
||||||
this.noIsbnIsbn = bookCode
|
this.noIsbnIsbn = bookCode
|
||||||
this.noIsbnUnifyIsbn = ''
|
this.noIsbnUnifyIsbn = ''
|
||||||
|
} else if (bookCode.length === 10 && /^\d{9}[\dXx]$/i.test(bookCode)) {
|
||||||
|
// 10位书号 → 转为13位ISBN
|
||||||
|
this.noIsbnIsbn = this.convertIsbn10To13(bookCode)
|
||||||
|
this.noIsbnUnifyIsbn = ''
|
||||||
} else {
|
} else {
|
||||||
this.noIsbnUnifyIsbn = texts.书号
|
this.noIsbnUnifyIsbn = texts.书号
|
||||||
this.noIsbnIsbn = '678' + String(Date.now()).slice(-10)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (texts.字数) this.noIsbnWordCount = this.processNoIsbnWordage(texts.字数)
|
if (texts.字数) this.noIsbnWordCount = this.processNoIsbnWordage(texts.字数)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user