forked from natuka/web.puabadge.com
修改:严格对比下单主体的数量和导入图片的主体识别数量
This commit is contained in:
1 parent
0199b924ac
commit
02d926e91e
1 file changed
+2
-3
@@ -416,10 +416,9 @@ function checkSubjectMatch(inspectResult: ImageInspect) {
|
||||
headcount: Number(inspectResult.personCount) || 0,
|
||||
petCount: Number(inspectResult.petCount) || 0,
|
||||
}
|
||||
// 订单只写了人数时,只比对人数;写了宠物则一并比对
|
||||
// 严格比对:订单「1人」不允许识别出「1人+1宠物」
|
||||
const peopleOk = detected.headcount === orderSubject.headcount
|
||||
const petOk =
|
||||
orderSubject.petCount > 0 ? detected.petCount === orderSubject.petCount : true
|
||||
const petOk = detected.petCount === orderSubject.petCount
|
||||
const matched = peopleOk && petOk
|
||||
subjectMatched.value = matched
|
||||
if (!matched) {
|
||||
|
||||
Reference in new issue
Block a user