From b5af8b4ce8c3f5651ae25938f1210c571b6a4928 Mon Sep 17 00:00:00 2001 From: Peanut Date: Sun, 26 Jul 2026 11:54:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20ScriptDetailView=20=E5=A2=9E=E5=BC=BA?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E7=94=A8=E6=88=B7=E5=BF=83=E6=84=BF=E5=92=8C?= =?UTF-8?q?=E5=A4=A7=E7=BA=B2=E5=85=83=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/main/ScriptDetailView.vue | 69 ++++++++++++++++++- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/mini-program/src/pages/main/ScriptDetailView.vue b/mini-program/src/pages/main/ScriptDetailView.vue index d030ae3..20374b7 100644 --- a/mini-program/src/pages/main/ScriptDetailView.vue +++ b/mini-program/src/pages/main/ScriptDetailView.vue @@ -14,6 +14,10 @@ PARALLEL LIFE {{ script?.title || '未命名剧本' }} {{ script?.summary || '命运正在整理章节。' }} + + 💭 用户心愿 + {{ userWish }} + {{ script?.style || '爽文' }} @@ -39,8 +43,17 @@ - - + + + + {{ index + 1 }} + + {{ item.title }} + {{ item.text }} + + + + {{ index + 1 }} {{ item.title }} @@ -83,6 +96,34 @@ const lengthText = computed(() => { return map[script.value?.length] || script.value?.length || '中篇' }) +/** + * 用户心愿原文(从 EpicScript.theme 字段读取) + */ +const userWish = computed(() => script.value?.theme || '') + +/** + * 大纲(从 plotJson.stages.outline 读取后端真实保存的 outline JSON) + * 后端 ShortNovelServiceImpl 在 novel_done 时会把 outline_created 事件累积到 metadata.stages.outline + */ +const outlineFromMeta = computed(() => { + const stages = script.value?.plotJson?.stages + if (!stages || !stages.outline) return [] + const outline = stages.outline + const items = [] + if (outline.title) items.push({ title: '标题', text: outline.title }) + if (outline.logline) items.push({ title: '简介', text: outline.logline }) + if (Array.isArray(outline.beats)) { + outline.beats.forEach((beat, i) => { + items.push({ + title: beat.title || `章节 ${i + 1}`, + text: beat.text || beat.description || JSON.stringify(beat) + }) + }) + } + if (outline.ending) items.push({ title: '结局', text: outline.ending }) + return items +}) + const detailTtsActionText = computed(() => { if (!script.value?.id) return '播放' if (ttsPlayer.loading.value) return '生成中' @@ -271,6 +312,30 @@ onUnmounted(() => { line-height: 1.62; } +.wish-block { + margin-top: 24rpx; + padding: 20rpx 22rpx; + border-radius: 22rpx; + background: linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(232, 121, 249, 0.08)); + border: 1rpx solid rgba(168, 85, 247, 0.24); +} + +.wish-label { + display: block; + font-size: 22rpx; + color: #c186ff; + font-weight: 700; + letter-spacing: 2rpx; + margin-bottom: 8rpx; +} + +.wish-text { + display: block; + font-size: 26rpx; + line-height: 1.62; + color: rgba(255, 255, 255, 0.92); +} + .stats { display: grid; grid-template-columns: repeat(3, 1fr);