更新了AI页和我的页,一级页面都重构完成。

This commit is contained in:
lik
2026-10-04 21:21:50 +08:00
parent 428fb7c52c
commit f542b1dced
26 changed files with 1482 additions and 1141 deletions
+38 -12
View File
@@ -10,11 +10,11 @@
<!-- 欢迎区:空会话时的落点 -->
<view class="welcome-area" wx:if="{{messages.length === 0}}">
<view class="welcome-icon">
<t-icon name="chat" size="72rpx" color="#9B4508" />
<image class="welcome-icon-img" src="/images/ai-ink.png" mode="aspectFit" />
</view>
<text class="welcome-title">AI陪诊助手</text>
<text class="welcome-title">陪诊助手</text>
<text class="welcome-desc">我是您的智能陪诊助手,可以为您解答陪诊相关问题</text>
<view class="quick-questions">
<view class="question-list">
<view
class="quick-item"
wx:for="{{quickQuestions}}"
@@ -48,7 +48,7 @@
</view>
<view class="message-content">
<view class="message-bubble">
<view class="message-bubble" wx:if="{{item.contentType !== 'questions'}}">
<t-chat-markdown
wx:if="{{item.type === 'ai' && item.contentType === 'text'}}"
class="message-markdown"
@@ -64,9 +64,28 @@
data-src="{{item.content}}"
/>
</view>
<!-- 常见问题:由「常见问题」按钮触发,把问题清单直接铺进会话流里。
复用欢迎区的白卡 + chevron 语言,点一下即发送该问题 -->
<view wx:else class="question-list">
<view
class="quick-item"
wx:for="{{item.content}}"
wx:for-item="question"
wx:key="*this"
bindtap="onQuickQuestionTap"
data-question="{{question}}"
>
<text>{{question}}</text>
<t-icon name="chevron-right" size="26rpx" color="#9B4508" />
</view>
</view>
<!-- AI 声明:挂在每条 AI 回复的气泡正下方,替掉原来页面底部那行常驻声明
(它太占底部空间)。放在 .message-content 内,与气泡同宽同左边缘 -->
<text wx:if="{{item.type === 'ai'}}" class="message-note">内容由AI生成,仅供参考</text>
(它太占底部空间)。放在 .message-content 内,与气泡同宽同左边缘。
问题清单由本地生成、非 AI 内容,故不挂声明 -->
<text
wx:if="{{item.type === 'ai' && item.contentType !== 'questions'}}"
class="message-note"
>内容由AI生成,仅供参考</text>
</view>
</view>
@@ -110,11 +129,18 @@
</view>
</view>
<!-- 清空入口:紧贴输入区下方——拇指最容易够到的位置,操作方便。
低频但破坏性,故做成只描边不填充的暖橙小按钮(圆角与输入框同为 20rpx),
与输入区右侧浅橙底的发送键区分开,不做成裸文字链 -->
<view class="clear-btn" wx:if="{{messages.length > 0}}" bindtap="clearChat">
<t-icon name="delete" size="26rpx" color="#9B4508" />
<text class="clear-btn-text">清空聊天</text>
<!-- 辅助入口:紧贴输入区下方——拇指最容易够到的位置,操作方便。
两者都是低频动作,故做成只描边不填充的暖橙小按钮(圆角与输入框同为 20rpx),
与输入区右侧浅橙底的发送键区分开,不做成裸文字链。
「常见问题」在左、「清空聊天」在右:破坏性动作收在最右端 -->
<view class="tool-bar" wx:if="{{messages.length > 0}}">
<view class="tool-btn" bindtap="showQuickQuestions">
<t-icon name="help-circle" size="26rpx" color="#9B4508" />
<text class="tool-btn-text">常见问题</text>
</view>
<view class="tool-btn" bindtap="clearChat">
<t-icon name="delete" size="26rpx" color="#9B4508" />
<text class="tool-btn-text">清空聊天</text>
</view>
</view>
</view>