feat: 修复 H5 底部导航覆盖 + 更新项目进度文档

## H5 底部导航修复 (Bug #10)
- 精简 App.vue,移除重复 tabbar,仅保留全局样式
- uni-page 设置 height: calc(100% - 50px) + overflow-y: auto
- 内容区域精确停在底部导航上方,独立滚动不再叠加
- 恢复 custom-tab-bar 组件

## 项目进度文档
- PROGRESS.md 更新至 10 个 Bug 修复
- 新增 H5 底部导航修复记录
- 新增历史变更条目
This commit is contained in:
TradeMate Dev
2026-05-12 20:24:42 +08:00
parent 69e164dcae
commit 7b62c2f8b4
125 changed files with 19725 additions and 728 deletions
+50
View File
@@ -0,0 +1,50 @@
from typing import Optional
import logging
logger = logging.getLogger(__name__)
try:
import edge_tts
HAS_EDGE_TTS = True
except ImportError:
HAS_EDGE_TTS = False
logger.warning("edge-tts not installed, TTS disabled")
VOICE_MAP = {
"zh": "zh-CN-XiaoxiaoNeural",
"en": "en-US-AriaNeural",
"ja": "ja-JP-NanamiNeural",
"ko": "ko-KR-SunHiNeural",
"fr": "fr-FR-DeniseNeural",
"de": "de-DE-KatjaNeural",
"es": "es-ES-ElviraNeural",
"pt": "pt-BR-FranciscaNeural",
"ru": "ru-RU-SvetlanaNeural",
"ar": "ar-SA-ZariyahNeural",
}
SUPPORTED_LANGS = list(VOICE_MAP.keys())
class TextToSpeechService:
@staticmethod
async def synthesize(text: str, lang: str = "en", rate: str = "0%", pitch: str = "0Hz") -> Optional[bytes]:
if not HAS_EDGE_TTS:
logger.warning("edge-tts not available")
return None
voice = VOICE_MAP.get(lang, VOICE_MAP["en"])
try:
communicate = edge_tts.Communicate(text, voice, rate=rate, pitch=pitch)
audio_data = b""
async for chunk in communicate.stream():
if chunk["type"] == "audio":
audio_data += chunk["data"]
return audio_data if audio_data else None
except Exception as e:
logger.error(f"TTS failed: {e}")
return None
tts_service = TextToSpeechService()