fix(analytics): 敏感词页单字预览提示+文案耦合注释+处置按钮状态统一

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-04 23:11:47 +08:00
parent 518d02bc8f
commit c2d6d6feba
+7 -3
View File
@@ -20,8 +20,7 @@
</el-select>
<el-button
type="primary"
:disabled="!selectedHits.length"
:loading="disposing"
:disabled="!selectedHits.length || disposing"
@click="disposeSelected('confirmed')"
>
确认
@@ -336,7 +335,12 @@ async function previewStage(word: string, excludeWords: string[]): Promise<boole
prev = await previewWord({ word, exclude_words: excludeWords })
} catch (e) {
const msg = e instanceof Error ? e.message : String(e)
if (msg.includes('单字') || msg.includes('不做预览')) return true // 分支①
// 分支①:文案与 yunke-server app/analytics/sensitive/words.py 单字拒扫
// ValueError 的固定措辞耦合——后端改措辞需同步这里的关键词
if (msg.includes('单字') || msg.includes('不做预览')) {
ElMessage.info('单字词不做预览,已直接添加——生效后从命中列表观察')
return true
}
throw e
}
if (prev.warn) {