Files
wxapp_escort/pages/ai/aichat.wxss
T
lik 76197b838f feat(ai): 等待气泡展示后台处理进度
- AI 聊天用工具/子代理/推理帧推断等待阶段,提示已完成步数,子代理输出不再并入主回答
- 下单弹层去掉 01-04 编号分组标题
- 同步首页设计规范与 UI 测试断言,补充首页品牌图
2026-11-18 22:31:58 +08:00

131 lines
11 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* 与首页同源:暖白纸面、清晰左基线、克制的暖橙强调。
页面不滚动,唯一滚动容器是消息区;底部为自定义 tabBar 留位。 */
.chat-container {
display: flex;
flex-direction: column;
height: 100vh;
box-sizing: border-box;
overflow: hidden;
padding-bottom: calc(104rpx + env(safe-area-inset-bottom));
background: var(--paper);
}
/* 页首身份条已移除:原生导航栏已有页名,欢迎区直接作为落点。
常见问题与清空聊天收进输入面板的「更多」菜单 */
.login-notice { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 16rpx; margin: 16rpx 32rpx 0; padding: 4rpx 20rpx; border: 2rpx solid var(--brand-line); border-radius: 20rpx; background: var(--brand-soft); }
.login-notice-text { flex: 1; min-width: 0; color: var(--ink-2); font-size: var(--fs-26); line-height: 1.6; }
.login-notice-link { display: flex; align-items: center; flex-shrink: 0; min-height: 88rpx; color: var(--brand-ink); font-size: var(--fs-28); font-weight: 500; }
.message-list { flex: 1; height: 0; min-height: 0; box-sizing: border-box; }
.welcome-area { padding: 32rpx 32rpx 24rpx; }
.welcome-title { display: block; color: var(--ink); font-size: 44rpx; font-weight: 600; line-height: 1.45; }
.question-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12rpx; margin: 32rpx 0 16rpx; color: var(--ink); font-size: var(--fs-28); font-weight: 500; }
.question-heading-sub { color: var(--muted); font-size: var(--fs-24); font-weight: 400; }
.question-list { display: flex; flex-direction: column; gap: 12rpx; width: 100%; box-sizing: border-box; }
.quick-item { display: flex; align-items: center; justify-content: space-between; gap: 16rpx; min-height: 96rpx; box-sizing: border-box; padding: 20rpx; border: 2rpx solid var(--line); border-radius: 20rpx; background: var(--white); color: var(--ink-2); font-size: var(--fs-28); line-height: 1.6; }
.quick-item > text { flex: 1; min-width: 0; word-break: break-all; }
.question-mark { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40rpx; height: 40rpx; border-radius: 12rpx; background: var(--paper); color: var(--brand-ink); font-size: var(--fs-26); }
.quick-item.question-hover, .quick-item:active { background: var(--brand-soft); border-color: var(--brand-line); }
.welcome-note { display: block; margin-top: 20rpx; color: var(--muted); font-size: var(--fs-24); line-height: 1.7; }
/* 对话正文占据主要宽度,避免头像左右分栏挤压长回答和报告表格。 */
.message-item { display: flex; flex-direction: column; padding: 20rpx 32rpx; }
.message-item.user { align-items: flex-end; }
.message-head { display: flex; align-items: center; gap: 10rpx; margin-bottom: 12rpx; }
.message-item.user .message-head { flex-direction: row-reverse; }
.avatar { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44rpx; height: 44rpx; border-radius: 14rpx; background: var(--white); border: 2rpx solid var(--line); }
.avatar-img { width: 30rpx; height: 30rpx; }
.message-item.user .avatar { background: transparent; border-color: transparent; }
.message-author { color: var(--ink-2); font-size: var(--fs-24); font-weight: 500; }
.message-time { color: var(--muted); font-size: var(--fs-24); margin: 0 6rpx; }
.message-content { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 100%; }
.message-item.ai .message-content { width: 100%; }
.message-item.user .message-content { align-items: flex-end; max-width: 90%; }
.message-bubble { box-sizing: border-box; min-width: 0; max-width: 100%; padding: 24rpx; border-radius: 24rpx; word-wrap: break-word; word-break: break-word; }
.message-item.ai .message-bubble { width: 100%; border: 2rpx solid var(--line); border-top-left-radius: 8rpx; background: var(--white); }
.message-item.user .message-bubble { border: 2rpx solid var(--brand-line); border-top-right-radius: 8rpx; background: var(--brand-soft); }
.message-text { font-size: var(--fs-30); line-height: 1.75; white-space: pre-wrap; color: var(--ink-2); }
.message-item.user .message-text { color: var(--brand-ink); }
.message-markdown {
display: block;
width: 100%;
min-width: 0;
font-size: var(--fs-30);
line-height: 1.75;
color: var(--ink-2);
/* 组件内的色彩通过实际消费的 TDesign 变量传入,不依赖跨组件选择器。 */
--td-text-color-primary: var(--ink-2);
--td-bg-color-component: var(--brand-soft);
--td-bg-color-page: var(--paper);
--td-bg-color-secondarycontainer: var(--paper);
--td-component-border: var(--line);
}
.message-markdown .t-chat-markdown-table { max-width: 100%; overflow-x: auto; border: 2rpx solid var(--line); border-radius: 12rpx; }
.message-markdown .t-chat-markdown-table__container { display: table; min-width: 100%; border-collapse: collapse; }
.message-markdown .t-chat-markdown-table__container-th, .message-markdown .t-chat-markdown-table__container-td { padding: 12rpx; font-size: var(--fs-26); line-height: 1.6; word-break: break-word; }
.message-markdown .t-chat-markdown-table__container-th { background: var(--brand-soft); color: var(--ink); }
.message-markdown .t-chat-markdown-table__container-tr:nth-child(2n) { background: var(--paper); }
.message-markdown .t-chat-markdown-code, .message-markdown .t-chat-markdown-codespan { font-size: var(--fs-26); word-break: break-all; }
.message-image { display: block; width: 400rpx; max-width: 100%; border-radius: 16rpx; }
.message-image-placeholder { font-size: var(--fs-28); color: var(--muted); line-height: 1.6; }
.message-note { margin-top: 10rpx; color: var(--muted); font-size: var(--fs-24); line-height: 1.6; }
.message-retry { display: flex; align-items: center; min-height: 88rpx; color: var(--brand-ink); font-size: var(--fs-26); }
.message-item.system { align-items: center; }
.system-message { max-width: 100%; padding: 8rpx 16rpx; color: var(--muted); font-size: var(--fs-26); line-height: 1.7; text-align: center; }
.system-login-link { display: inline-block; padding: 16rpx; color: var(--brand-ink); font-size: var(--fs-28); }
.message-item.ai .typing-bubble { display: flex; align-items: center; gap: 20rpx; width: auto; min-height: 88rpx; }
.typing-main { display: flex; align-items: center; gap: 12rpx; }
.typing-indicator { display: flex; align-items: center; gap: 8rpx; flex-shrink: 0; }
.typing-lines { display: flex; flex-direction: column; gap: 2rpx; }
.dot { width: 10rpx; height: 10rpx; border-radius: 50%; background: var(--brand-ink); animation: typing 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
.typing-text { font-size: var(--fs-26); color: var(--muted); line-height: 1.6; }
.typing-progress { font-size: 22rpx; color: var(--muted); line-height: 1.5; opacity: 0.85; }
/* 统一白色输入面板,语音/图片/更多在左,发送在右,所有操作横向展开。
position: relative 供「更多」菜单定位(菜单从按钮上方展开) */
.composer { position: relative; flex-shrink: 0; margin: 12rpx 24rpx 8rpx; padding: 20rpx 20rpx 12rpx; border: 2rpx solid var(--line); border-radius: 28rpx; background: var(--white); box-shadow: var(--shadow-card); }
.input-area { padding: 0 4rpx; }
.message-input { display: block; box-sizing: border-box; width: 100%; min-height: 76rpx; max-height: 180rpx; padding: 4rpx 0 12rpx; color: var(--ink); font-size: var(--fs-30); line-height: 1.6; background: transparent; }
.message-input.is-readonly { color: var(--muted); }
.input-placeholder { color: var(--muted); font-size: var(--fs-28); }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 16rpx; }
.input-tools { display: flex; align-items: center; gap: 8rpx; }
.input-tool { display: flex; align-items: center; justify-content: center; gap: 8rpx; box-sizing: border-box; min-width: 104rpx; min-height: 88rpx; padding: 12rpx; border-radius: 16rpx; color: var(--muted); font-size: var(--fs-24); }
.input-tool.is-recording { color: var(--brand-ink); background: var(--brand-soft); }
.input-tool.is-open { color: var(--brand-ink); background: var(--brand-soft); }
.input-tool:active { background: var(--paper); }
/* 三个点用 CSS 画,不依赖图标名;与「语音/图片」同一条文字基线 */
.more-dots { display: flex; align-items: center; justify-content: center; gap: 5rpx; width: 34rpx; height: 34rpx; }
.more-dot { width: 8rpx; height: 8rpx; border-radius: 50%; background: var(--muted); }
.input-tool.is-open .more-dot { background: var(--brand-ink); }
.send-btn { display: flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 10rpx; box-sizing: border-box; min-width: 136rpx; min-height: 88rpx; padding: 16rpx 20rpx; border-radius: 20rpx; background: var(--paper); color: var(--muted); font-size: var(--fs-28); font-weight: 500; }
.send-btn.active { background: var(--brand-strong); color: var(--white); }
.send-btn.active:active { background: var(--brand-ink); }
/* ===== 「更多」菜单 =====
透明遮罩负责点外部关闭;菜单锚在输入面板上方左侧,向上展开,
不挤占输入区、也不与自定义 tabBar 重叠(层级高于 tabBar) */
.more-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 120; background: transparent; }
.more-menu { position: absolute; left: 20rpx; bottom: calc(100% + 8rpx); z-index: 121; box-sizing: border-box; min-width: 320rpx; padding: 8rpx 0; border: 2rpx solid var(--line); border-radius: 20rpx; background: var(--white); box-shadow: var(--shadow-card); animation: more-menu-in 0.16s ease-out; }
@keyframes more-menu-in { from { opacity: 0; transform: translateY(8rpx); } to { opacity: 1; transform: translateY(0); } }
.more-item { display: flex; align-items: center; gap: 14rpx; box-sizing: border-box; min-height: 88rpx; padding: 0 24rpx; color: var(--ink-2); font-size: var(--fs-28); line-height: 1.4; }
.more-item:active { background: var(--brand-soft); }
.more-item-muted { color: var(--muted); }
.more-divider { height: 2rpx; margin: 0 20rpx; background: var(--line); }
.voice-status { display: flex; align-items: center; flex-shrink: 0; gap: 16rpx; margin: 8rpx 24rpx 0; padding: 8rpx 16rpx; border: 2rpx solid var(--brand-line); border-radius: 20rpx; background: var(--brand-soft); }
.voice-dot { flex-shrink: 0; width: 12rpx; height: 12rpx; border-radius: 50%; background: var(--brand-strong); }
.voice-dot.recording { animation: record-pulse 1.2s infinite ease-in-out; }
.voice-status-main { display: flex; flex: 1; flex-direction: column; gap: 4rpx; min-width: 0; }
.voice-status-text { font-size: var(--fs-26); font-weight: 500; color: var(--ink-2); line-height: 1.5; }
.voice-status-sub { font-size: var(--fs-24); color: var(--muted); line-height: 1.5; }
.voice-cancel { display: flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 8rpx; min-width: 88rpx; min-height: 88rpx; padding: 0 8rpx; color: var(--brand-ink); font-size: var(--fs-26); }
@keyframes typing { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
@keyframes record-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dot, .voice-dot.recording, .more-menu { animation: none; } }
@media (max-width: 340px) {
.input-tool { min-width: 88rpx; padding: 8rpx; }
.composer-actions { gap: 8rpx; }
}