feat: media API (video/bbox/thumbnail), UUID unification, dot matrix text, portal fixes, API dictionary V1.3
This commit is contained in:
@@ -224,9 +224,7 @@
|
||||
import { ref, onMounted, computed } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import TranslatableText from '@/components/TranslatableText.vue'
|
||||
|
||||
const API_BASE = 'http://localhost:3003'
|
||||
const API_KEY = 'muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69'
|
||||
import { httpFetch, getCurrentConfig } from '@/api/client'
|
||||
|
||||
const route = useRoute()
|
||||
const chunkId = ref('')
|
||||
@@ -237,32 +235,24 @@ const loadDetail = async () => {
|
||||
const uuid = route.params.uuid as string
|
||||
chunkId.value = route.params.chunkId as string
|
||||
loading.value = true
|
||||
console.log('=== loadDetail START ===')
|
||||
console.log('uuid:', uuid, 'chunkId:', chunkId.value)
|
||||
|
||||
try {
|
||||
const url = `${API_BASE}/api/v1/videos/${uuid}/details?chunk_id=${chunkId.value}`
|
||||
console.log('Fetching URL:', url)
|
||||
const config = getCurrentConfig()
|
||||
const url = `${config.api_base_url}/api/v1/file/${uuid}/${chunkId.value}`
|
||||
|
||||
const res = await fetch(url, {
|
||||
headers: { 'X-API-Key': API_KEY }
|
||||
})
|
||||
const res = await httpFetch<any>(url)
|
||||
console.log('Response status:', res.status, res.statusText)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error(`API error: ${res.status} ${res.statusText}`)
|
||||
}
|
||||
|
||||
const result = await res.json()
|
||||
console.log('Result keys:', Object.keys(result))
|
||||
detail.value = result
|
||||
console.log('detail.value set')
|
||||
detail.value = res
|
||||
} catch (error) {
|
||||
console.error('ERROR:', error)
|
||||
console.error('Failed to load chunk detail:', error)
|
||||
alert('載入失敗: ' + error)
|
||||
} finally {
|
||||
loading.value = false
|
||||
console.log('=== loadDetail END ===')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user