Files
hjc-web/app/components
weicw-dshsa 80136ac414 fix(search): 搜索页一律 noindex,并把配色对齐 template-07
两处收尾,均针对当前启用的 template-07。

1) SEO 收口(ticket 05)
原实现只在带关键词时 noindex,不带关键词时输出 index,follow——等于邀请
搜索引擎收录一个只有「请输入关键词」的空页。改为无条件 noindex,follow:

- 带关键词:同一批内容有无数种关键词组合入口,典型低质量/易重复页面
  (沿用 useModuleRoute.ts 对 /article?keywords= 的既有约定)
- 不带关键词:空页,对搜索引擎和用户都是垃圾页
- 保留 follow 而非 nofollow,让爬虫仍能顺着结果链接爬到详情页

无关键词时空页保持显示引导文案,不 404、不重定向——被索引才是问题,
而它已被 noindex 解决。canonical 维持指向 /search;sitemap 经运行时验证
本就不含搜索页(269 条 URL 无命中)。

明确不做:不把 /search 加进 robots.txt 的 Disallow。Disallow 是「禁止抓取」,
爬虫遵守后就不会去读页面里的 noindex,URL 仍可能出现在结果里(只是没有标题
摘要)——反而更糟。故 server/api/robots.txt.ts 未改动。

2) 配色对齐 template-07
搜索页原用 navy #1E2A47,与本模板不符:template-07 主色是 #1a6dff,
其 TenderList 用 text-blue-600 渲染价格。已改为:
- 主色(按钮/聚焦边框/选中 Tab/计数)#1E2A47 -> #1a6dff
- 标书价格 red #E5472E -> #2563eb(对齐 TenderList 的 text-blue-600)
- 链接蓝统一为小写 #2563eb

实测:带/不带关键词两种情况的 robots 均为 noindex,follow;页面总数与三个
Tab 渲染正常;eslint 0 error / 0 warning。
2026-09-29 05:18:29 +08:00
..