forked from natuka/web.puabadge.com
修改:主体不一致不拦截,只提示
This commit is contained in:
1 parent
ff30dbb6b4
commit
b25e3ca473
2 files changed
+7
-12
No files matched your search
@@ -355,7 +355,7 @@ const canSend = computed(() => {
|
||||
// 编辑:需有飞入的效果图 + 调整文案
|
||||
return !!pendingPreview.value && draft.value.trim().length > 0
|
||||
}
|
||||
if (!subjectMatched.value && pendingPreview.value) return false
|
||||
// 主体不一致只提示,不拦截发送
|
||||
// 首轮生图需上传照片(对齐 agent:upload → submit → poll)
|
||||
return !!pendingPreview.value
|
||||
})
|
||||
@@ -420,8 +420,9 @@ function checkSubjectMatch(inspectResult: ImageInspect) {
|
||||
if (!matched) {
|
||||
const need = subjectNameFromStat.value || formatSubjectCountsLabel(orderSubject)
|
||||
const got = formatSubjectCountsLabel(detected)
|
||||
// 仅提示不一致,不拦截后续发送
|
||||
showToast({
|
||||
message: `图片主体(${got})与下单主体(${need})不一致,请更换与订单相符的照片`,
|
||||
message: config.messages.subjectMismatchToast(got, need),
|
||||
duration: 3200,
|
||||
})
|
||||
}
|
||||
@@ -863,12 +864,6 @@ function onSend() {
|
||||
return
|
||||
}
|
||||
|
||||
if (pendingPreview.value && !subjectMatched.value) {
|
||||
const need = subjectNameFromStat.value || '订单主体'
|
||||
showToast(`图片主体与下单主体(${need})不一致,请更换照片`)
|
||||
return
|
||||
}
|
||||
|
||||
if (titleSpec.value && !productTitle.value.trim()) {
|
||||
titleInvalid.value = true
|
||||
showToast(config.messages.needProductTitle(titleSpec.value.label))
|
||||
|
||||
Reference in new issue
Block a user