Files
life-echo/api/routers/home.py

23 lines
526 B
Python
Raw Normal View History

"""
应用官网主页路由
"""
from pathlib import Path
from fastapi import APIRouter
from fastapi.responses import HTMLResponse
router = APIRouter(tags=["home"])
_STATIC_DIR = Path(__file__).resolve().parent.parent / "static"
@router.get("/", response_class=HTMLResponse)
async def get_home():
"""
应用官网主页
包含应用介绍功能展示下载链接定价方案等
"""
html_path = _STATIC_DIR / "home.html"
return HTMLResponse(content=html_path.read_text(encoding="utf-8"))