From 73baf0a16673a27e852d6ae781071ffae515e52d Mon Sep 17 00:00:00 2001 From: shenhan000 Date: Wed, 14 May 2025 17:56:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=9F=E7=90=83=E5=8A=A0=E5=85=A5=E6=A0=87?= =?UTF-8?q?=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components.d.ts | 2 + app/components/PlanetComment.vue | 7 +-- app/components/PlanetHeader.vue | 2 +- app/components/PublishContent.vue | 49 ++++++++++++++++++++- app/pages/planet-detail/index.vue | 71 ++++++++++++++++++++++++++----- nuxt.config.ts | 4 +- 6 files changed, 117 insertions(+), 18 deletions(-) diff --git a/app/components.d.ts b/app/components.d.ts index 06b16cc..d10da6a 100644 --- a/app/components.d.ts +++ b/app/components.d.ts @@ -10,10 +10,12 @@ declare module 'vue' { NAffix: typeof import('naive-ui')['NAffix'] NAvatar: typeof import('naive-ui')['NAvatar'] NButton: typeof import('naive-ui')['NButton'] + NButtonGroup: typeof import('naive-ui')['NButtonGroup'] NCard: typeof import('naive-ui')['NCard'] NCarousel: typeof import('naive-ui')['NCarousel'] NCascader: typeof import('naive-ui')['NCascader'] NCheckbox: typeof import('naive-ui')['NCheckbox'] + NCheckboxGroup: typeof import('naive-ui')['NCheckboxGroup'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] NDatePicker: typeof import('naive-ui')['NDatePicker'] NDivider: typeof import('naive-ui')['NDivider'] diff --git a/app/components/PlanetComment.vue b/app/components/PlanetComment.vue index 24cc939..c4ed304 100644 --- a/app/components/PlanetComment.vue +++ b/app/components/PlanetComment.vue @@ -413,11 +413,12 @@ function handleDownload(index: number, item: any) { v-for="(subItem, subIndex) in item.fileName.split(',')" :key="subIndex" title="点击下载" - class="text-[#4a5563] text-sm cursor-pointer flex items-center hover:text-[#4a5563]/80 my-1" - @click="handleDownload(subIndex, item)" + class="text-[#4a5563] text-sm flex items-center hover:text-[#4a5563]/80 my-1" > - {{ subItem }} + + {{ subItem }} +
diff --git a/app/components/PlanetHeader.vue b/app/components/PlanetHeader.vue index fbee62e..7d85c19 100644 --- a/app/components/PlanetHeader.vue +++ b/app/components/PlanetHeader.vue @@ -171,7 +171,7 @@ function handleShowMessage() {
- 推出登录 + 退出登录
diff --git a/app/components/PublishContent.vue b/app/components/PublishContent.vue index ec21a2b..9664fce 100644 --- a/app/components/PublishContent.vue +++ b/app/components/PublishContent.vue @@ -24,6 +24,8 @@ const formData = ref({ fileUrl: '', fileName: '', imageUrl: '', + labelName: null, + isElite: 0, }) // 图片上传相关 @@ -59,6 +61,8 @@ async function handlePublish() { fileUrl: '', fileName: '', imageUrl: '', + labelName: '', + isElite: 0, } fileUrl.value = [] fileName.value = [] @@ -125,6 +129,25 @@ async function handlePictureChange(event: Event) { message.error(currentUploadType.value === 'img' ? '图片上传失败' : '文件上传失败') } } + +const tagList = ref([]) +async function getTagList() { + const params = { + communityId: props.communityId, + tenantId: props.tenantId, + } + const res = await request.post('/publishLabel/list', params) + for (let i = 0; i < res.data.length; i++) { + tagList.value.push({ + label: res.data[i], + value: res.data[i], + }) + } +} + +onMounted(() => { + getTagList() +})