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:
TradeMate Dev
2026-05-14 00:30:48 +08:00
parent f70dd24c7d
commit 23a31f7c00
30 changed files with 485 additions and 269 deletions
+8 -2
View File
@@ -114,13 +114,14 @@ const inputText = ref('')
const result = ref('')
const suggestions = ref([])
const loading = ref(false)
const targetIndex = ref(1)
const targetIndex = ref(0)
const keyboardHeight = ref(0)
const rating = ref(0)
const extractedInfo = ref(null)
const preferences = ref(null)
const targetLangs = ref([
{ code: 'auto', name: '自动检测' },
{ code: 'en', name: 'English' },
{ code: 'zh', name: '中文' },
{ code: 'es', name: 'Español' },
@@ -143,9 +144,14 @@ const handleTranslate = async () => {
try {
if (mode.value === 'translate') {
let targetLang = targetLangs[targetIndex.value].code
if (targetLang === 'auto') {
const hasChinese = /[\u4e00-\u9fa5]/.test(inputText.value)
targetLang = hasChinese ? 'en' : 'zh'
}
const res = await translateApi.translate(
inputText.value,
targetLangs[targetIndex.value].code
targetLang
)
result.value = res.translated
loadPreferences()