主要更新: - 前端改用 Ant Design 组件(Table、Modal、Select 等) - 支持三种搜索方式:星图ID、达人unique_id、达人昵称模糊匹配 - 列表页实时调用云图 API 获取 A3 数据和成本指标 - 详情弹窗显示完整 6 大类指标,支持文字复制 - 品牌 API URL 格式修复为查询参数形式 - 优化云图 API 参数格式和会话池管理 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||
from typing import List
|
||
|
||
|
||
class Settings(BaseSettings):
|
||
"""Application settings."""
|
||
|
||
model_config = SettingsConfigDict(
|
||
env_file=".env",
|
||
env_file_encoding="utf-8",
|
||
extra="ignore", # 忽略额外的环境变量
|
||
)
|
||
|
||
# Database
|
||
DATABASE_URL: str = "postgresql+asyncpg://user:password@localhost:5432/yuntu_kol"
|
||
|
||
# CORS
|
||
CORS_ORIGINS: List[str] = ["http://localhost:3000"]
|
||
|
||
# Brand API
|
||
BRAND_API_BASE_URL: str = "https://api.internal.intelligrow.cn"
|
||
BRAND_API_TOKEN: str = "" # Bearer Token for Brand API authentication
|
||
|
||
# Yuntu API (for SessionID pool)
|
||
YUNTU_API_TOKEN: str = "" # Bearer Token for Yuntu Cookie API
|
||
YUNTU_AADVID: str = "1648829117232140" # 广告主ID,用于巨量云图API调用
|
||
|
||
# API Settings
|
||
MAX_QUERY_LIMIT: int = 1000
|
||
BRAND_API_TIMEOUT: float = 3.0
|
||
BRAND_API_CONCURRENCY: int = 10
|
||
YUNTU_API_TIMEOUT: float = 10.0 # 巨量云图API超时
|
||
|
||
|
||
settings = Settings()
|