From deb3a1baccaad9bff23ae20eb41f893ed87ab803 Mon Sep 17 00:00:00 2001 From: shenhan000 Date: Mon, 12 May 2025 15:07:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=9F=E7=90=83=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/PlanetComment.vue | 5 +++-- nuxt.config.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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,