refactor sect in vue

This commit is contained in:
bridge
2025-11-27 21:46:42 +08:00
parent a1210589b7
commit 796f48315f
14 changed files with 457 additions and 79 deletions

View File

@@ -615,12 +615,19 @@ def get_detail_info(
target = regions.get(int(target_id))
except (ValueError, TypeError):
target = None
elif target_type == "sect":
try:
sid = int(target_id)
target = sects_by_id.get(sid)
except (ValueError, TypeError):
target = None
if target is None:
raise HTTPException(status_code=404, detail="Target not found")
if hasattr(target, "get_structured_info"):
return target.get_structured_info()
info = target.get_structured_info()
return info
else:
# 回退到 hover info 如果没有结构化信息
if hasattr(target, "get_hover_info"):