fix: 第20轮搜索审计修复 — AND子组层级/OR模式NOT/长格式标签等6项
CI / backend (push) Canceled after 0s
CI / frontend (push) Canceled after 0s

Bug-R20-1 (HIGH): AND子组在括号内被提升为顶层AND条件 — 新增sub_group_refs层级追踪
Bug-R20-2 (HIGH): OR模式NOT条件未独立AND — 分离UnaryExpression独立AND
Bug-R20-3 (MEDIUM): is_pubmed_syntax()不识别小写布尔运算符 — 添加re.IGNORECASE
Bug-R20-4 (MEDIUM): 长格式字段标签不被识别 — _ALL_FIELD_TAGS新增40+条目
Bug-R20-5 (MEDIUM): 400错误URL持久化导致刷新循环 — syncSearchToUrl移入try块
Bug-R20-6 (LOW): 空括号[]产生空Term — stripped为空时跳过
This commit is contained in:
34047007@qq.com
2026-07-28 16:30:03 +08:00
parent 2b6ffd6de4
commit 5dcf639b0b
4 changed files with 189 additions and 16 deletions
+1 -1
View File
@@ -363,6 +363,7 @@ const { page, total, goToPage } = usePagination({
}
yearCounts.value = data.year_counts || []
searchError.value = ''
syncSearchToUrl() // 成功时同步 URL
} catch (e: any) {
if (e?.name === 'CanceledError' || e?.code === 'ERR_CANCELED') return
results.value = []
@@ -376,7 +377,6 @@ const { page, total, goToPage } = usePagination({
toast.apiError(e, '搜索失败,请重试')
}
finally {
syncSearchToUrl() // P6: sync URL even on error (avoid URL/state desync)
if (gen === searchGeneration.value) loading.value = false
}
},