新增搜索标题和网页标题双字段

- 数据库新增 search_title 字段存储搜索结果标题
- product_names 存储抓取到的网页标题
- 搜索页面显示两个标题(搜索标题 + 网页标题)
- 内容库页面也显示两个标题
This commit is contained in:
2026-07-14 00:00:50 +08:00
parent d23d526629
commit 76e24c4fa3
7 changed files with 57 additions and 10 deletions
+2 -2
View File
@@ -390,9 +390,9 @@ class SearchService:
return results
def save_to_articles(self, product_names, category, keywords, summary, content, source, url=None):
def save_to_articles(self, product_names, category, keywords, summary, content, source, url=None, search_title=None):
"""保存搜索结果到内容库"""
return db.add_article(product_names, category, keywords, summary, content, source, url)
return db.add_article(product_names, category, keywords, summary, content, source, url, search_title)
# 全局搜索服务实例
search_service = SearchService()