与牧同行-小程序用户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

454 lines
7.2 KiB

  1. .diagnosis-container {
  2. min-height: 100vh;
  3. width: 100%;
  4. display: flex;
  5. flex-direction: column;
  6. background: linear-gradient(180deg, #f8fafc 0%, #f0f9ff 100%);
  7. }
  8. /* 医生信息卡片 */
  9. .doctor-card {
  10. background: white;
  11. margin: 24rpx 32rpx;
  12. padding: 32rpx;
  13. border-radius: 20rpx;
  14. display: flex;
  15. align-items: center;
  16. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.06);
  17. position: relative;
  18. }
  19. .doctor-avatar {
  20. width: 120rpx;
  21. height: 120rpx;
  22. border-radius: 50%;
  23. background: linear-gradient(135deg, #86D8D0 0%, #A8E6CF 100%);
  24. display: flex;
  25. align-items: center;
  26. justify-content: center;
  27. margin-right: 24rpx;
  28. overflow: hidden;
  29. }
  30. .avatar-img {
  31. width: 100rpx;
  32. height: 100rpx;
  33. }
  34. .doctor-info {
  35. flex: 1;
  36. }
  37. .doctor-name {
  38. display: block;
  39. font-size: 32rpx;
  40. font-weight: 600;
  41. color: #333;
  42. margin-bottom: 8rpx;
  43. }
  44. .doctor-title {
  45. display: block;
  46. font-size: 24rpx;
  47. color: #86D8D0;
  48. margin-bottom: 16rpx;
  49. }
  50. .doctor-tags {
  51. display: flex;
  52. gap: 12rpx;
  53. }
  54. .tag {
  55. font-size: 20rpx;
  56. padding: 6rpx 12rpx;
  57. background: #E8F4F3;
  58. color: #6BC4BC;
  59. border-radius: 20rpx;
  60. }
  61. .online-status {
  62. position: absolute;
  63. right: 32rpx;
  64. bottom: 32rpx;
  65. font-size: 22rpx;
  66. padding: 4rpx 12rpx;
  67. border-radius: 12rpx;
  68. }
  69. .online-status.online {
  70. background: #e8f1f4;
  71. color: #6b8fc4;
  72. }
  73. /* 聊天容器 */
  74. .chat-container {
  75. flex: 1;
  76. display: flex;
  77. flex-direction: column;
  78. height: 100%;
  79. overflow-y: auto;
  80. }
  81. /* 消息样式 */
  82. .message-wrapper {
  83. display: flex;
  84. margin: 40rpx 0;
  85. animation: fadeIn 0.3s ease;
  86. }
  87. @keyframes fadeIn {
  88. from { opacity: 0; transform: translateY(20rpx); }
  89. to { opacity: 1; transform: translateY(0); }
  90. }
  91. .message-wrapper.user {
  92. justify-content: flex-end;
  93. }
  94. .message-content {
  95. max-width: 70%;
  96. display: flex;
  97. flex-direction: column;
  98. }
  99. .message-wrapper.user .message-content {
  100. align-items: flex-end;
  101. }
  102. .message-wrapper.assistant .message-content {
  103. align-items: flex-start;
  104. }
  105. .message-avatar {
  106. width: 80rpx;
  107. height: 80rpx;
  108. border-radius: 50%;
  109. overflow: hidden;
  110. margin: 0 20rpx;
  111. align-self: flex-end;
  112. flex-shrink: 0;
  113. }
  114. .avatar {
  115. width: 100%;
  116. height: 100%;
  117. }
  118. /* 消息气泡 */
  119. .message-bubble {
  120. padding: 24rpx;
  121. border-radius: 24rpx;
  122. position: relative;
  123. line-height: 1.5;
  124. word-break: break-word;
  125. }
  126. .assistant-bubble {
  127. background: #E8F4F3;
  128. border-radius: 0 24rpx 24rpx 24rpx;
  129. }
  130. .user-bubble {
  131. background: #86D8D0;
  132. border-radius: 24rpx 0 24rpx 24rpx;
  133. }
  134. .message-text {
  135. font-size: 28rpx;
  136. color: #333;
  137. white-space: pre-wrap;
  138. word-break: break-word;
  139. }
  140. .user-bubble .message-text {
  141. color: white;
  142. }
  143. /* 消息时间 */
  144. .message-time {
  145. font-size: 22rpx;
  146. color: #999;
  147. margin-top: 8rpx;
  148. }
  149. /* 诊断结果卡片 */
  150. .diagnosis-card {
  151. background: white;
  152. border-radius: 16rpx;
  153. padding: 24rpx;
  154. margin-top: 20rpx;
  155. border-left: 6rpx solid #86D8D0;
  156. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
  157. }
  158. .diagnosis-header {
  159. margin-bottom: 20rpx;
  160. }
  161. .diagnosis-title {
  162. font-size: 28rpx;
  163. font-weight: 600;
  164. color: #333;
  165. }
  166. .diagnosis-item {
  167. display: flex;
  168. margin-bottom: 16rpx;
  169. align-items: flex-start;
  170. }
  171. .diagnosis-label {
  172. font-size: 26rpx;
  173. color: #666;
  174. width: 140rpx;
  175. flex-shrink: 0;
  176. }
  177. .diagnosis-value {
  178. font-size: 26rpx;
  179. color: #333;
  180. flex: 1;
  181. line-height: 1.4;
  182. word-break: break-word;
  183. }
  184. .severity-level {
  185. padding: 4rpx 16rpx;
  186. border-radius: 20rpx;
  187. font-size: 24rpx;
  188. font-weight: 500;
  189. }
  190. .severity-level.low {
  191. background: #E8F4F3;
  192. color: #6BC4BC;
  193. }
  194. .severity-level.moderate {
  195. background: #FFF3E0;
  196. color: #FF9800;
  197. }
  198. .severity-level.high {
  199. background: #FFEBEE;
  200. color: #F44336;
  201. }
  202. .diagnosis-footer {
  203. margin-top: 20rpx;
  204. padding-top: 16rpx;
  205. border-top: 1rpx solid #eee;
  206. }
  207. .disclaimer {
  208. font-size: 22rpx;
  209. color: #999;
  210. font-style: italic;
  211. }
  212. /* AI正在输入 */
  213. .typing {
  214. min-width: 200rpx;
  215. }
  216. .typing-indicator {
  217. display: flex;
  218. align-items: center;
  219. gap: 8rpx;
  220. }
  221. .typing-dot {
  222. width: 12rpx;
  223. height: 12rpx;
  224. background: #86D8D0;
  225. border-radius: 50%;
  226. animation: typingAnimation 1.4s infinite ease-in-out;
  227. }
  228. .typing-dot:nth-child(1) { animation-delay: -0.32s; }
  229. .typing-dot:nth-child(2) { animation-delay: -0.16s; }
  230. @keyframes typingAnimation {
  231. 0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  232. 40% { transform: scale(1); opacity: 1; }
  233. }
  234. .typing-text {
  235. font-size: 26rpx;
  236. color: #666;
  237. margin-left: 12rpx;
  238. }
  239. /* 快捷症状选择 */
  240. .symptom-quick-select {
  241. padding: 0 32rpx 20rpx;
  242. }
  243. .section-title {
  244. display: block;
  245. font-size: 26rpx;
  246. color: #666;
  247. margin-bottom: 20rpx;
  248. }
  249. .symptom-tags {
  250. white-space: nowrap;
  251. display: flex;
  252. gap: 20rpx;
  253. }
  254. .symptom-tag {
  255. display: inline-block;
  256. padding: 16rpx 24rpx;
  257. background: white;
  258. border-radius: 24rpx;
  259. border: 1rpx solid #E8F4F3;
  260. box-shadow: 0 2rpx 8rpx rgba(134, 216, 208, 0.1);
  261. transition: all 0.2s ease;
  262. }
  263. .symptom-tag:active {
  264. transform: scale(0.95);
  265. background: #E8F4F3;
  266. }
  267. .tag-text {
  268. font-size: 26rpx;
  269. color: #666;
  270. }
  271. /* 输入区域 */
  272. .input-area {
  273. background: white;
  274. padding: 20rpx 32rpx 40rpx;
  275. border-top: 1rpx solid #f0f0f0;
  276. display: flex;
  277. align-items: flex-end;
  278. gap: 20rpx;
  279. width: 100%;
  280. box-sizing: border-box;
  281. }
  282. .input-wrapper {
  283. flex: 1;
  284. background: #f8fafc;
  285. border-radius: 24rpx;
  286. padding: 16rpx 24rpx;
  287. border: 1rpx solid #E8F4F3;
  288. display: flex;
  289. align-items: center;
  290. transition: all 0.1s ease;
  291. min-height: 60rpx;
  292. }
  293. .message-input {
  294. width: 100%;
  295. font-size: 28rpx;
  296. line-height: 1.5;
  297. padding: 0;
  298. margin: 0;
  299. border: none;
  300. background: transparent;
  301. max-height: 200rpx;
  302. overflow-y: auto;
  303. }
  304. .placeholder {
  305. color: #aaa;
  306. font-size: 28rpx;
  307. }
  308. .send-btn {
  309. width: 80rpx;
  310. height: 80rpx;
  311. border-radius: 50%;
  312. background: #86D8D0;
  313. display: flex;
  314. align-items: center;
  315. justify-content: center;
  316. box-shadow: 0 4rpx 12rpx rgba(134, 216, 208, 0.3);
  317. transition: all 0.2s ease;
  318. flex-shrink: 0;
  319. border: none;
  320. outline: none;
  321. }
  322. .send-btn-hover {
  323. background: #6BC4BC;
  324. transform: translateY(-2rpx);
  325. box-shadow: 0 6rpx 16rpx rgba(134, 216, 208, 0.4);
  326. }
  327. .send-icon {
  328. color: white;
  329. font-size: 36rpx;
  330. font-weight: 300;
  331. }
  332. /* 底部占位元素 - 用于滚动定位 */
  333. .scroll-bottom-placeholder {
  334. height: 20rpx;
  335. width: 100%;
  336. }
  337. /* 消息列表项 */
  338. .message-item {
  339. width: 100%;
  340. }
  341. /* 加载动画 */
  342. .loading-overlay {
  343. position: fixed;
  344. top: 0;
  345. left: 0;
  346. width: 100%;
  347. height: 100%;
  348. background: rgba(255, 255, 255, 0.9);
  349. z-index: 1001;
  350. display: flex;
  351. align-items: center;
  352. justify-content: center;
  353. }
  354. .loading-content {
  355. display: flex;
  356. flex-direction: column;
  357. align-items: center;
  358. }
  359. .pulse-animation {
  360. position: relative;
  361. width: 120rpx;
  362. height: 120rpx;
  363. }
  364. .pulse-circle {
  365. position: absolute;
  366. width: 100%;
  367. height: 100%;
  368. border: 4rpx solid #86D8D0;
  369. border-radius: 50%;
  370. animation: pulse 2s infinite ease-in-out;
  371. }
  372. .pulse-circle:nth-child(2) { animation-delay: 0.5s; }
  373. .pulse-circle:nth-child(3) { animation-delay: 1s; }
  374. @keyframes pulse {
  375. 0% { transform: scale(0.8); opacity: 1; }
  376. 100% { transform: scale(1.5); opacity: 0; }
  377. }
  378. .loading-text {
  379. margin-top: 40rpx;
  380. font-size: 28rpx;
  381. color: #666;
  382. }
  383. /* 隐藏textarea默认滚动条 */
  384. .message-input::-webkit-scrollbar {
  385. width: 0;
  386. background: transparent;
  387. }