fix(analytics): 敏感词页单字预览提示+文案耦合注释+处置按钮状态统一
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -20,8 +20,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="!selectedHits.length"
|
:disabled="!selectedHits.length || disposing"
|
||||||
:loading="disposing"
|
|
||||||
@click="disposeSelected('confirmed')"
|
@click="disposeSelected('confirmed')"
|
||||||
>
|
>
|
||||||
确认
|
确认
|
||||||
@@ -336,7 +335,12 @@ async function previewStage(word: string, excludeWords: string[]): Promise<boole
|
|||||||
prev = await previewWord({ word, exclude_words: excludeWords })
|
prev = await previewWord({ word, exclude_words: excludeWords })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const msg = e instanceof Error ? e.message : String(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
|
throw e
|
||||||
}
|
}
|
||||||
if (prev.warn) {
|
if (prev.warn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user