feat:接口联调

This commit is contained in:
2026-07-21 11:09:17 +08:00
parent eea6319c41
commit 538194d8a5
39 changed files with 3553 additions and 3386 deletions
+10
View File
@@ -0,0 +1,10 @@
export default defineEventHandler((event) => {
const config = useRuntimeConfig()
const targetBase = String(config.officialApiProxyTarget || 'http://localhost:8080').replace(/\/$/, '')
const rawPath = event.context.params?.path || ''
const path = Array.isArray(rawPath) ? rawPath.join('/') : rawPath
const requestUrl = getRequestURL(event)
const targetUrl = `${targetBase}/api/${path}${requestUrl.search}`
return proxyRequest(event, targetUrl)
})