mirror of
https://github.com/xr843/Master-skill.git
synced 2026-05-10 05:16:25 +00:00
fix: correct FoJin URL format for juan paths
FoJin frontend route is '/texts/:id/read?juan=N' (query param),
not '/texts/{id}/juan/{N}' (path segment). Old format fell through
to React router 404.
Verified against FoJin frontend App.tsx route definitions:
- /texts/:id → TextDetailPage
- /texts/:id/read → TextReaderPage (uses ?juan= query)
This commit is contained in:
+4
-3
@@ -90,7 +90,7 @@ def format_semantic_results(data: dict, brief: bool = False) -> str:
|
||||
|
||||
link = f"https://fojin.app/texts/{text_id}" if text_id else ""
|
||||
if text_id and juan:
|
||||
link += f"/juan/{juan}"
|
||||
link = f"https://fojin.app/texts/{text_id}/read?juan={juan}"
|
||||
|
||||
score_str = f" (score={score:.2f})" if isinstance(score, (int, float)) else ""
|
||||
snippet = str(content).strip().replace("\n", " ")[:80]
|
||||
@@ -116,9 +116,10 @@ def format_semantic_results(data: dict, brief: bool = False) -> str:
|
||||
if score:
|
||||
lines.append(f"相似度: {score}")
|
||||
if text_id:
|
||||
link = f"https://fojin.app/texts/{text_id}"
|
||||
if juan:
|
||||
link += f"/juan/{juan}"
|
||||
link = f"https://fojin.app/texts/{text_id}/read?juan={juan}"
|
||||
else:
|
||||
link = f"https://fojin.app/texts/{text_id}"
|
||||
lines.append(f"FoJin链接: {link}")
|
||||
if content:
|
||||
content_str = str(content)
|
||||
|
||||
Reference in New Issue
Block a user