|
|
/* 页面整体样式 */.consult-page { width: 100vw; height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; flex-direction: column; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; } /* 头部样式 */ .consult-header { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); padding: 15rpx 30rpx; border-bottom: 1rpx solid rgba(0, 0, 0, 0.1); position: relative; z-index: 100; box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); } .header-content { display: flex; align-items: center; justify-content: space-between; height: 90rpx; } .header-left { flex: 1; display: flex; justify-content: flex-start; } .header-center { flex: 2; display: flex; flex-direction: column; align-items: center; } .header-right { flex: 1; display: flex; justify-content: flex-end; } .back-btn { width: 70rpx; height: 70rpx; border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.05); display: flex; align-items: center; justify-content: center; transition: all 0.3s; } .back-btn:active { background: rgba(0, 0, 0, 0.1); transform: scale(0.95); } .back-icon { width: 30rpx; height: 30rpx; } .expert-name { font-size: 34rpx; font-weight: 600; color: #333; margin-bottom: 5rpx; } .expert-status { display: flex; align-items: center; justify-content: center; } .status-dot { width: 14rpx; height: 14rpx; border-radius: 50%; margin-right: 8rpx; } .status-dot.online { background: #07c160; box-shadow: 0 0 10rpx rgba(7, 193, 96, 0.5); } .status-dot.offline { background: #999; } .status-text { font-size: 24rpx; color: #666; } .header-action-btn { width: 70rpx; height: 70rpx; border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.05); display: flex; align-items: center; justify-content: center; transition: all 0.3s; } .header-action-btn:active { background: rgba(0, 0, 0, 0.1); transform: scale(0.95); } .header-action-icon { width: 32rpx; height: 32rpx; } /* 聊天容器 */ .chat-container { flex: 1; padding: 30rpx 20rpx 0; background: linear-gradient(180deg, #f5f7fa 0%, #f0f2f5 100%); overflow-y: auto; position: relative; } /* 欢迎语 */ .system-welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60rpx 40rpx; text-align: center; background: white; border-radius: 30rpx; margin: 0 auto 40rpx; max-width: 80%; box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.08); animation: fadeInUp 0.6s ease; } @keyframes fadeInUp { from { opacity: 0; transform: translateY(50rpx); } to { opacity: 1; transform: translateY(0); } } .welcome-avatar { width: 120rpx; height: 120rpx; border-radius: 50%; overflow: hidden; margin-bottom: 20rpx; border: 4rpx solid white; box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.1); } .welcome-avatar image { width: 100%; height: 100%; } .welcome-name { font-size: 34rpx; font-weight: 600; color: #333; margin-bottom: 8rpx; } .welcome-title { font-size: 26rpx; color: #666; margin-bottom: 25rpx; } .welcome-tip { font-size: 28rpx; color: #4caf50; line-height: 1.4; } /* 日期分隔线 */ .date-divider { display: flex; justify-content: center; margin: 40rpx 0; } .date-text { background: rgba(0, 0, 0, 0.05); padding: 8rpx 24rpx; border-radius: 20rpx; font-size: 24rpx; color: #999; font-weight: 500; } /* 时间分隔 */ .time-divider { display: flex; justify-content: center; margin: 30rpx 0; animation: fadeIn 0.3s ease; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .time-divider text { background: rgba(0, 0, 0, 0.05); padding: 6rpx 20rpx; border-radius: 15rpx; font-size: 22rpx; color: #999; } /* 消息项 */ .message-item { display: flex; margin-bottom: 40rpx; animation: slideIn 0.3s ease; } @keyframes slideIn { from { opacity: 0; transform: translateY(20rpx); } to { opacity: 1; transform: translateY(0); } } .message-left { justify-content: flex-start; } .message-right { justify-content: flex-end; } .message-avatar { width: 80rpx; height: 80rpx; border-radius: 10rpx; overflow: hidden; flex-shrink: 0; } .message-left .message-avatar { margin-right: 20rpx; } .message-right .message-avatar { margin-left: 20rpx; } .message-avatar image { width: 100%; height: 100%; } .message-content-wrapper { max-width: 65%; display: flex; flex-direction: column; } .message-left .message-content-wrapper { align-items: flex-start; } .message-right .message-content-wrapper { align-items: flex-end; } /* 消息气泡 */ .message-bubble { padding: 20rpx 25rpx; border-radius: 20rpx; position: relative; word-break: break-word; line-height: 1.5; transition: all 0.3s; } .message-bubble-left { background: white; border-radius: 0 20rpx 20rpx 20rpx; box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); } .message-bubble-right { background: linear-gradient(135deg, #95ec69 0%, #5ac725 100%); color: white; border-radius: 20rpx 0 20rpx 20rpx; box-shadow: 0 4rpx 20rpx rgba(90, 199, 37, 0.2); } .message-text { font-size: 30rpx; line-height: 1.5; } .message-bubble-left .message-text { color: #333; } .message-bubble-right .message-text { color: white; } /* 消息时间 */ .message-time { font-size: 22rpx; color: #999; margin-top: 8rpx; text-align: center; } /* 消息状态 */ .message-status { margin-bottom: 10rpx; } .status-icon { width: 28rpx; height: 28rpx; } /* 图片消息 */ .message-image { max-width: 300rpx; max-height: 400rpx; border-radius: 12rpx; display: block; } /* 视频消息 */ .message-video { width: 300rpx; height: 200rpx; border-radius: 12rpx; background: #000; } .video-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80rpx; height: 80rpx; border-radius: 50%; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; } .video-play-btn image { width: 40rpx; height: 40rpx; } /* 语音消息 */ .message-audio { display: flex; align-items: center; padding: 25rpx; } .audio-icon-left { width: 40rpx; height: 40rpx; margin-right: 20rpx; } .audio-icon-right { width: 40rpx; height: 40rpx; margin-left: 20rpx; } .audio-content { display: flex; align-items: center; } .audio-wave { display: flex; align-items: flex-end; height: 40rpx; margin-right: 15rpx; } .wave-bar { width: 4rpx; margin: 0 2rpx; background: currentColor; animation: wave 1.2s ease-in-out infinite; } .wave-bar:nth-child(1) { height: 20rpx; animation-delay: 0s; } .wave-bar:nth-child(2) { height: 30rpx; animation-delay: 0.2s; } .wave-bar:nth-child(3) { height: 40rpx; animation-delay: 0.4s; } .wave-bar:nth-child(4) { height: 30rpx; animation-delay: 0.6s; } .wave-bar:nth-child(5) { height: 20rpx; animation-delay: 0.8s; } @keyframes wave { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } } .audio-duration { font-size: 28rpx; font-weight: 500; } .message-bubble-left .audio-duration { color: #666; } .message-bubble-right .audio-duration { color: white; } /* 文件消息 */ .message-file { display: flex; align-items: center; padding: 25rpx; min-width: 300rpx; } .file-icon-box { position: relative; margin-right: 20rpx; } .file-icon { width: 60rpx; height: 60rpx; } .file-extension { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 18rpx; font-weight: 600; color: white; } .file-info { flex: 1; display: flex; flex-direction: column; } .file-name { font-size: 28rpx; font-weight: 500; margin-bottom: 8rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200rpx; } .message-bubble-left .file-name { color: #333; } .message-bubble-right .file-name { color: white; } .file-size { font-size: 24rpx; } .message-bubble-left .file-size { color: #999; } .message-bubble-right .file-size { color: rgba(255, 255, 255, 0.9); } .file-download-btn { background: rgba(0, 0, 0, 0.1); border: none; padding: 10rpx 20rpx; border-radius: 15rpx; font-size: 24rpx; color: white; margin-left: 15rpx; } .file-download-btn:active { background: rgba(0, 0, 0, 0.2); } /* 上传进度 */ .upload-progress { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); border-radius: 12rpx; display: flex; align-items: center; justify-content: center; } .progress-circle { position: relative; width: 80rpx; height: 80rpx; } .progress-fill { position: absolute; width: 100%; height: 100%; border: 6rpx solid #4caf50; border-radius: 50%; border-top-color: transparent; border-right-color: transparent; } .progress-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 22rpx; color: white; font-weight: 600; } /* 输入区域 */ .input-section { background: white; border-top: 1rpx solid #e0e0e0; padding: 20rpx 30rpx; position: relative; box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05); } /* 语音面板 */ .voice-panel { display: flex; align-items: center; justify-content: center; padding: 20rpx 0; } .voice-record-btn { width: 100%; height: 100rpx; background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%); border: none; border-radius: 50rpx; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: all 0.3s; } .voice-record-btn:active { background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%); transform: scale(0.98); } .mic-icon { width: 50rpx; height: 50rpx; margin-bottom: 10rpx; } .voice-tip { font-size: 26rpx; color: #666; } /* 输入面板 */ .input-panel { display: flex; align-items: center; gap: 20rpx; } .input-mode-btn { width: 80rpx; height: 80rpx; border-radius: 50%; border: none; background: #f5f5f5; display: flex; align-items: center; justify-content: center; transition: all 0.3s; } .input-mode-btn:active { background: #e0e0e0; transform: scale(0.95); } .mode-icon { width: 36rpx; height: 36rpx; } .input-box-wrapper { flex: 1; background: #f5f5f5; border-radius: 40rpx; padding: 0 30rpx; height: 80rpx; display: flex; align-items: center; transition: all 0.3s; } .input-box-wrapper:active { background: #e8e8e8; } .chat-input { flex: 1; height: 100%; font-size: 30rpx; color: #333; } .placeholder { color: #999; font-size: 28rpx; } .media-btn, .send-btn { width: 80rpx; height: 80rpx; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center; transition: all 0.3s; } .media-btn { background: #f5f5f5; } .media-btn:active { background: #e0e0e0; transform: scale(0.95); } .send-btn { background: linear-gradient(135deg, #95ec69 0%, #5ac725 100%); } .send-btn:active { background: linear-gradient(135deg, #5ac725 0%, #4caf50 100%); transform: scale(0.95); } .media-icon, .send-icon { width: 36rpx; height: 36rpx; } .send-icon { filter: brightness(0) invert(1); } /* 多媒体选择面板 */ .media-action-sheet { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: flex-end; justify-content: center; z-index: 1000; animation: fadeIn 0.3s ease; } .media-sheet-content { width: 100%; background: white; border-radius: 40rpx 40rpx 0 0; padding: 40rpx 30rpx 60rpx; animation: slideUp 0.3s ease; } @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } } .media-sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40rpx; } .sheet-title { font-size: 32rpx; font-weight: 600; color: #333; } .close-sheet-btn { width: 60rpx; height: 60rpx; border-radius: 50%; border: none; background: #f5f5f5; display: flex; align-items: center; justify-content: center; } .close-sheet-btn image { width: 24rpx; height: 24rpx; } .media-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30rpx; } .media-option { display: flex; flex-direction: column; align-items: center; border: none; background: none; padding: 20rpx 10rpx; border-radius: 20rpx; transition: all 0.3s; } .media-option:active { background: #f5f5f5; } .option-icon { width: 100rpx; height: 100rpx; border-radius: 25rpx; display: flex; align-items: center; justify-content: center; margin-bottom: 20rpx; } .photo-icon { background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); } .camera-icon { background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%); } .video-icon { background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); } .audio-icon { background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); } .file-icon { background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%); } .option-icon image { width: 50rpx; height: 50rpx; } .option-text { font-size: 26rpx; color: #666; } /* 录音模态框 */ .recording-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; z-index: 1001; animation: fadeIn 0.2s ease; } .recording-box { background: white; border-radius: 40rpx; padding: 60rpx; display: flex; flex-direction: column; align-items: center; box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.3); } .recording-wave-box { position: relative; width: 200rpx; height: 200rpx; margin-bottom: 30rpx; } .recording-wave { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border: 8rpx solid #5ac725; border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; } @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.2); opacity: 0; } } .recording-mic-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80rpx; height: 80rpx; } .recording-tip { font-size: 32rpx; color: #333; font-weight: 500; margin-bottom: 15rpx; } .recording-time { font-size: 36rpx; color: #5ac725; font-weight: bold; }
|