feat: silent wechat login, marketing tab optimization, admin page foundation
- Add silent WeChat login for MP/browser environments - Fix Python 3.6 compatibility (remove typing.Annotated usage) - Marketing page: tab-based content generation with category support - Translate page: add auto-detect language default - Homepage: add TTS playback, announcement ticker, remove redundant quick-actions - Fix FAB button overlap with custom tabbar on customers/quotation pages - Make openai/anthropic imports lazy for Python 3.6 compat
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from typing import Annotated
|
||||
from app.database import get_db
|
||||
from app.services.silent_pattern import SilentPatternService
|
||||
from app.api.v1.deps import get_current_user_id
|
||||
@@ -11,7 +10,7 @@ router = APIRouter()
|
||||
@router.get("/risk-analysis")
|
||||
async def get_silent_risk_analysis(
|
||||
user_id: str = Depends(get_current_user_id),
|
||||
db: Annotated[AsyncSession, Depends(get_db)] = None,
|
||||
db: AsyncSession = Depends(get_db),
|
||||
):
|
||||
service = SilentPatternService(db)
|
||||
risks = await service.analyze_silent_risk(user_id)
|
||||
@@ -27,7 +26,7 @@ async def get_silent_risk_analysis(
|
||||
async def get_followup_suggestions(
|
||||
customer_id: str,
|
||||
user_id: str = Depends(get_current_user_id),
|
||||
db: Annotated[AsyncSession, Depends(get_db)] = None,
|
||||
db: AsyncSession = Depends(get_db),
|
||||
):
|
||||
service = SilentPatternService(db)
|
||||
suggestions = await service.get_suggestions(user_id, customer_id)
|
||||
|
||||
Reference in New Issue
Block a user