feat: AI 场景路由、ASR 服务及前后端全链路同步
- 新增 AI 场景路由控制器和管理接口 - 新增 ASR 语音识别服务及前后端集成 - 同步 AI Runtime 客户端到 Web/小程序/Life-Script - 完善 AI 配置测试修复和管理后台路由配置 - 新增数据库迁移脚本 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+18
-12
@@ -1,7 +1,6 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
|
||||
import { useAppStore } from './stores/app.js'
|
||||
import { logRuntimeEnv } from './services/request.js'
|
||||
import analytics from './services/analytics.js'
|
||||
|
||||
@@ -9,20 +8,27 @@ const statusBarHeight = ref(0)
|
||||
const safeAreaTop = ref(0)
|
||||
const safeAreaBottom = ref(0)
|
||||
|
||||
onLaunch(async () => {
|
||||
const hydrateSafeArea = () => {
|
||||
try {
|
||||
const windowInfo = uni.getWindowInfo ? uni.getWindowInfo() : uni.getSystemInfoSync()
|
||||
statusBarHeight.value = windowInfo.statusBarHeight || 20
|
||||
safeAreaTop.value = windowInfo.safeAreaInsets?.top || windowInfo.statusBarHeight || 20
|
||||
safeAreaBottom.value = windowInfo.safeAreaInsets?.bottom || 0
|
||||
uni.setStorageSync('statusBarHeight', statusBarHeight.value)
|
||||
uni.setStorageSync('safeAreaTop', safeAreaTop.value)
|
||||
uni.setStorageSync('safeAreaBottom', safeAreaBottom.value)
|
||||
} catch (error) {
|
||||
statusBarHeight.value = 20
|
||||
safeAreaTop.value = 20
|
||||
safeAreaBottom.value = 0
|
||||
}
|
||||
}
|
||||
|
||||
onLaunch(() => {
|
||||
console.log('App Launch')
|
||||
analytics.initAnalytics()
|
||||
logRuntimeEnv('app:onLaunch')
|
||||
const store = useAppStore()
|
||||
await store.initialize()
|
||||
|
||||
const windowInfo = uni.getWindowInfo()
|
||||
statusBarHeight.value = windowInfo.statusBarHeight || 20
|
||||
safeAreaTop.value = windowInfo.safeAreaInsets?.top || windowInfo.statusBarHeight || 20
|
||||
safeAreaBottom.value = windowInfo.safeAreaInsets?.bottom || 0
|
||||
uni.setStorageSync('statusBarHeight', statusBarHeight.value)
|
||||
uni.setStorageSync('safeAreaTop', safeAreaTop.value)
|
||||
uni.setStorageSync('safeAreaBottom', safeAreaBottom.value)
|
||||
hydrateSafeArea()
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
|
||||
Reference in New Issue
Block a user