From 7629c52bb7f182d09be78036c8af09f3668b91a6 Mon Sep 17 00:00:00 2001 From: yvan <8574526@qq.com> Date: Sat, 23 Aug 2025 17:43:36 +0800 Subject: [PATCH] 1 --- pages.json | 8 + pages/assistant/assistant.vue | 34 +++- pages/assistant/knowledge-detail.vue | 294 +++++++++++++++++++++++++++ 3 files changed, 329 insertions(+), 7 deletions(-) create mode 100644 pages/assistant/knowledge-detail.vue diff --git a/pages.json b/pages.json index 84d66a9..2b66508 100644 --- a/pages.json +++ b/pages.json @@ -24,6 +24,14 @@ "navigationBarTextStyle": "white" } }, + { + "path": "pages/assistant/knowledge-detail", + "style": { + "navigationBarTitleText": "知识详情", + "navigationBarBackgroundColor": "#FF8A80", + "navigationBarTextStyle": "white" + } + }, { "path": "pages/adoption/adoption", "style": { diff --git a/pages/assistant/assistant.vue b/pages/assistant/assistant.vue index 9914178..4e03a55 100644 --- a/pages/assistant/assistant.vue +++ b/pages/assistant/assistant.vue @@ -39,7 +39,7 @@ - + {{ message.content }} @@ -54,7 +54,7 @@ - + {{ message.content }} {{ message.time }} @@ -279,6 +279,26 @@ export default { }) }, + copyMessage(content) { + uni.setClipboardData({ + data: content, + success: () => { + uni.showToast({ + title: '已复制到剪贴板', + icon: 'success', + duration: 1500 + }); + }, + fail: () => { + uni.showToast({ + title: '复制失败', + icon: 'none', + duration: 1500 + }); + } + }); + }, + startVoiceInput() { uni.showToast({ title: '语音功能开发中', @@ -459,12 +479,12 @@ export default { .message-item.user { justify-content: flex-end; - padding: 0 0 0 60rpx; + padding: 0 0 0 40rpx; } .message-item.ai { justify-content: flex-start; - padding: 0 60rpx 0 0; + padding: 0 40rpx 0 0; } .message-avatar { @@ -511,7 +531,7 @@ export default { .message-content { display: flex; flex-direction: column; - max-width: 65%; + max-width: 80%; } .message-content.user { @@ -547,8 +567,8 @@ export default { } .message-text { - font-size: 28rpx; - line-height: 1.4; + font-size: 26rpx; + line-height: 1.5; color: #333333; } diff --git a/pages/assistant/knowledge-detail.vue b/pages/assistant/knowledge-detail.vue new file mode 100644 index 0000000..4fa0b9c --- /dev/null +++ b/pages/assistant/knowledge-detail.vue @@ -0,0 +1,294 @@ + + + + +