diff --git a/app/components/PlanetComment.vue b/app/components/PlanetComment.vue index e10ea56..24cc939 100644 --- a/app/components/PlanetComment.vue +++ b/app/components/PlanetComment.vue @@ -313,7 +313,8 @@ async function handleSelect(event: any, type: string, item: any) { } // 下载 -function handleDownload(url: string) { +function handleDownload(index: number, item: any) { + const url = item.fileUrl.split(',')[index] const a = document.createElement('a') a.href = url a.download = url.split('/').pop() || 'downloaded_file' @@ -413,7 +414,7 @@ function handleDownload(url: string) { :key="subIndex" title="点击下载" class="text-[#4a5563] text-sm cursor-pointer flex items-center hover:text-[#4a5563]/80 my-1" - @click="handleDownload(subItem)" + @click="handleDownload(subIndex, item)" > {{ subItem }} diff --git a/nuxt.config.ts b/nuxt.config.ts index e39ff4a..ce6833d 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -85,9 +85,9 @@ export default defineNuxtConfig({ preset: 'node-server', devProxy: { '/api': { - // target: 'http://113.45.190.154:8080', // 线上 + target: 'http://113.45.190.154:8080', // 线上 // target: 'http://192.168.2.29:8080', // 代 - target: 'http://192.168.2.21:8080', // 嗨 + // target: 'http://192.168.2.21:8080', // 嗨 // target: 'https://2d1a399f.r27.cpolar.top', // 嗨 changeOrigin: true, prependPath: true,