与牧同行-小程序用户端
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.

554 lines
8.3 KiB

6 days ago
6 days ago
6 days ago
6 days ago
6 days ago
6 days ago
6 days ago
  1. /* 页面容器 */
  2. .home-container {
  3. width: 100%;
  4. min-height: 100vh;
  5. background: linear-gradient(180deg, #86D8D0 0%, #a9dfda 30%, #cfe9e7 60%, #ECF8F7 90%);
  6. padding-top: env(safe-area-inset-top);
  7. }
  8. /* 主要内容区域 */
  9. .box {
  10. width: 93%;
  11. margin: 0 auto;
  12. padding-bottom: 40rpx;
  13. }
  14. /* AI问诊 */
  15. .Aidiagnosis {
  16. position: fixed;
  17. right: 0;
  18. bottom: 150px;
  19. margin: 0 auto;
  20. z-index: 100;
  21. }
  22. .Aidiagnosis image {
  23. width: 120rpx;
  24. height: 120rpx;
  25. border-radius: 50%;
  26. }
  27. /* 定位 */
  28. .orientation {
  29. display: flex;
  30. align-items: center;
  31. padding: 20rpx 0;
  32. color: #fff;
  33. font-weight: bold;
  34. font-size: 26rpx;
  35. }
  36. .orientation image {
  37. width: 40rpx;
  38. height: 40rpx;
  39. margin-right: 10rpx;
  40. }
  41. /* 轮播图区域 */
  42. .swiper-container {
  43. position: relative;
  44. border-radius: 20rpx;
  45. overflow: hidden;
  46. box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.1);
  47. animation: scaleIn 0.6s ease-out 0.4s both;
  48. }
  49. @keyframes scaleIn {
  50. from {
  51. opacity: 0;
  52. transform: scale(0.95);
  53. }
  54. to {
  55. opacity: 1;
  56. transform: scale(1);
  57. }
  58. }
  59. .custom-swiper {
  60. border-radius: 20rpx;
  61. }
  62. .swiper-item {
  63. position: relative;
  64. height: 360rpx;
  65. overflow: hidden;
  66. border-radius: 20rpx;
  67. transition: transform 0.5s ease;
  68. }
  69. .swiper-item.active {
  70. transform: scale(1.02);
  71. }
  72. .swiper-image {
  73. width: 100%;
  74. height: 100%;
  75. transition: transform 8s ease;
  76. }
  77. .swiper-mask {
  78. position: absolute;
  79. top: 0;
  80. left: 0;
  81. right: 0;
  82. bottom: 0;
  83. background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent 50%);
  84. }
  85. .swiper-content {
  86. position: absolute;
  87. bottom: 60rpx;
  88. left: 40rpx;
  89. z-index: 2;
  90. max-width: 60%;
  91. }
  92. .swiper-tag {
  93. display: inline-block;
  94. padding: 6rpx 20rpx;
  95. background: rgba(76, 175, 80, 0.9);
  96. color: white;
  97. font-size: 20rpx;
  98. border-radius: 20rpx;
  99. margin-bottom: 16rpx;
  100. backdrop-filter: blur(10rpx);
  101. }
  102. .swiper-title {
  103. display: block;
  104. font-size: 36rpx;
  105. font-weight: bold;
  106. color: #FFFFFF;
  107. margin-bottom: 8rpx;
  108. text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
  109. line-height: 1.4;
  110. }
  111. .swiper-desc {
  112. display: block;
  113. font-size: 24rpx;
  114. color: rgba(255, 255, 255, 0.9);
  115. text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
  116. }
  117. .swiper-gradient {
  118. position: absolute;
  119. bottom: 0;
  120. left: 0;
  121. right: 0;
  122. height: 120rpx;
  123. background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  124. }
  125. .custom-indicator {
  126. position: absolute;
  127. bottom: 30rpx;
  128. right: 30rpx;
  129. display: flex;
  130. align-items: center;
  131. z-index: 3;
  132. }
  133. .indicator-dot {
  134. width: 12rpx;
  135. height: 12rpx;
  136. border-radius: 50%;
  137. background: rgba(255, 255, 255, 0.5);
  138. margin: 0 6rpx;
  139. transition: all 0.3s ease;
  140. }
  141. .indicator-dot.active {
  142. width: 30rpx;
  143. background: #96DBD4;
  144. border-radius: 6rpx;
  145. }
  146. /* 卡片类型 */
  147. .kap {
  148. animation: kapIn 0.5s ease-out 0.5s both;
  149. }
  150. @keyframes kapIn {
  151. from {
  152. opacity: 0;
  153. }
  154. to {
  155. opacity: 1;
  156. }
  157. }
  158. .card {
  159. width: 100%;
  160. display: grid;
  161. grid-template-columns: 1.1fr 2fr;
  162. column-gap: 20rpx;
  163. margin: 20rpx 0;
  164. }
  165. .card2 {
  166. background-color: #F8918C;
  167. border-radius: 25rpx;
  168. padding: 30rpx 20rpx 120rpx;
  169. }
  170. .card2 view:nth-child(1) {
  171. font-size: 38rpx;
  172. color: #fff;
  173. font-weight: bold;
  174. letter-spacing: 0.1em;
  175. }
  176. .card2_1 {
  177. margin: 10rpx 0;
  178. font-size: 26rpx;
  179. color: #FDE8E1;
  180. }
  181. .card3 {
  182. display: grid;
  183. grid-template-rows: 1fr 1fr;
  184. row-gap: 20rpx;
  185. }
  186. .card3>view {
  187. border-radius: 25rpx;
  188. padding: 0 0 0 20rpx;
  189. }
  190. .card3_1 {
  191. background-color: #5EBEB8;
  192. }
  193. .card3_1 view:last-child {
  194. color: #D9F0EE;
  195. }
  196. .card3_2 {
  197. background-color: #E9B770;
  198. }
  199. .card3_2 view:last-child {
  200. color: #F4E8DB;
  201. }
  202. .card3_kp view:first-child {
  203. font-size: 38rpx;
  204. color: #fff;
  205. margin: 30rpx 0 10rpx 0;
  206. }
  207. .card3_kp view:last-child {
  208. font-size: 26rpx;
  209. }
  210. /* 知识库 */
  211. .repository {
  212. width: 100%;
  213. display: grid;
  214. grid-template-columns: 1fr 1fr 1fr;
  215. column-gap: 20rpx;
  216. }
  217. .repository>view {
  218. padding: 20rpx 0 20rpx 20rpx;
  219. border-radius: 20rpx;
  220. }
  221. .zsk view:first-child {
  222. color: #fff;
  223. margin-bottom: 5rpx;
  224. }
  225. .zsk view:last-child {
  226. background-color: #fff;
  227. font-size: 22rpx;
  228. display: inline-block;
  229. padding: 0 10rpx;
  230. }
  231. .repository1_1 {
  232. background-color: #6CAB86;
  233. }
  234. .repository1_2 {
  235. background-color: #017D77;
  236. }
  237. .repository1_3 {
  238. background-color: #FD8140;
  239. }
  240. /* 通知公告区域 */
  241. .notice-section {
  242. background: #FFFFFF;
  243. border-radius: 20rpx;
  244. padding: 20rpx 20rpx 0;
  245. margin: 20rpx 0;
  246. box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.05);
  247. animation: fadeIn 0.6s ease-out 0.6s both;
  248. }
  249. @keyframes fadeIn {
  250. from {
  251. opacity: 0;
  252. }
  253. to {
  254. opacity: 1;
  255. }
  256. }
  257. .notice-content {
  258. position: relative;
  259. }
  260. .notice-swiper {
  261. height: 200rpx;
  262. }
  263. .notice-item {
  264. padding: 20rpx 0;
  265. transition: all 0.3s ease;
  266. display: flex;
  267. flex-direction: column;
  268. position: relative;
  269. }
  270. .notice-item.highlight {
  271. background: rgba(76, 175, 80, 0.05);
  272. border-radius: 12rpx;
  273. padding: 20rpx;
  274. margin: -10rpx -10rpx 0;
  275. }
  276. .notice-item-header {
  277. display: flex;
  278. justify-content: space-between;
  279. align-items: center;
  280. margin-bottom: 16rpx;
  281. }
  282. .notice-type {
  283. padding: 4rpx 16rpx;
  284. border-radius: 20rpx;
  285. font-size: 22rpx;
  286. font-weight: 500;
  287. }
  288. .notice-type.urgent {
  289. background: rgba(244, 67, 54, 0.1);
  290. color: #F44336;
  291. }
  292. .notice-type.important {
  293. background: rgba(255, 152, 0, 0.1);
  294. color: #FF9800;
  295. }
  296. .notice-type.normal {
  297. background: rgba(33, 150, 243, 0.1);
  298. color: #2196F3;
  299. }
  300. .notice-time {
  301. font-size: 22rpx;
  302. color: #999999;
  303. }
  304. .notice-text {
  305. font-size: 28rpx;
  306. color: #333333;
  307. line-height: 1.5;
  308. flex: 1;
  309. display: -webkit-box;
  310. -webkit-box-orient: vertical;
  311. -webkit-line-clamp: 2;
  312. overflow: hidden;
  313. }
  314. /* 用户提问板块 - 优化样式 */
  315. .user-question-section {
  316. background: #FFFFFF;
  317. border-radius: 24rpx;
  318. padding: 32rpx;
  319. margin: 40rpx 0 20rpx;
  320. box-shadow: 0 8rpx 40rpx rgba(0, 0, 0, 0.06);
  321. animation: slideUp 0.8s ease-out 0.8s both;
  322. }
  323. @keyframes slideUp {
  324. from {
  325. opacity: 0;
  326. transform: translateY(60rpx);
  327. }
  328. to {
  329. opacity: 1;
  330. transform: translateY(0);
  331. }
  332. }
  333. /* 标题区域 */
  334. .question-header {
  335. display: flex;
  336. justify-content: space-between;
  337. align-items: center;
  338. margin-bottom: 40rpx;
  339. padding-bottom: 24rpx;
  340. border-bottom: 1px solid rgba(150, 219, 212, 0.3);
  341. }
  342. .question-title {
  343. display: flex;
  344. flex-direction: column;
  345. }
  346. .title-text {
  347. font-size: 38rpx;
  348. font-weight: bold;
  349. color: #333;
  350. margin-bottom: 8rpx;
  351. position: relative;
  352. padding-left: 20rpx;
  353. }
  354. .title-text::before {
  355. content: '';
  356. position: absolute;
  357. left: 0;
  358. top: 50%;
  359. transform: translateY(-50%);
  360. width: 8rpx;
  361. height: 32rpx;
  362. background: #60C0B9;
  363. border-radius: 4rpx;
  364. }
  365. .title-sub {
  366. font-size: 24rpx;
  367. color: #999;
  368. padding-left: 20rpx;
  369. }
  370. .view-all {
  371. display: flex;
  372. align-items: center;
  373. font-size: 26rpx;
  374. color: #60C0B9;
  375. padding: 12rpx 24rpx;
  376. background: rgba(96, 192, 185, 0.1);
  377. border-radius: 30rpx;
  378. transition: all 0.3s ease;
  379. }
  380. .view-all:active {
  381. background: rgba(96, 192, 185, 0.2);
  382. transform: scale(0.98);
  383. }
  384. /* 问题元信息 */
  385. .question-meta {
  386. display: flex;
  387. justify-content: space-between;
  388. align-items: flex-start;
  389. margin-bottom: 28rpx;
  390. }
  391. .question-tag {
  392. flex: 1;
  393. display: flex;
  394. align-items: flex-start;
  395. gap: 12rpx;
  396. }
  397. .tag-icon {
  398. font-size: 28rpx;
  399. font-weight: bold;
  400. color: #60C0B9;
  401. background: rgba(96, 192, 185, 0.1);
  402. padding: 6rpx 16rpx;
  403. border-radius: 12rpx;
  404. flex-shrink: 0;
  405. line-height: 1.4;
  406. }
  407. .tag-text {
  408. font-size: 30rpx;
  409. color: #333;
  410. line-height: 1.5;
  411. font-weight: 500;
  412. display: -webkit-box;
  413. -webkit-box-orient: vertical;
  414. -webkit-line-clamp: 2;
  415. overflow: hidden;
  416. }
  417. /* 用户信息 */
  418. .question-info {
  419. display: flex;
  420. justify-content: space-between;
  421. align-items: center;
  422. margin-bottom: 28rpx;
  423. padding-bottom: 20rpx;
  424. border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  425. }
  426. .user-info {
  427. display: flex;
  428. align-items: center;
  429. gap: 16rpx;
  430. }
  431. .user-avatar {
  432. width: 64rpx;
  433. height: 64rpx;
  434. border-radius: 50%;
  435. background: #E0F2F1;
  436. border: 2rpx solid #60C0B9;
  437. }
  438. .user-detail {
  439. display: flex;
  440. flex-direction: column;
  441. }
  442. .user-name {
  443. font-size: 26rpx;
  444. font-weight: 500;
  445. color: #333;
  446. margin-bottom: 6rpx;
  447. }
  448. .user-location {
  449. display: flex;
  450. align-items: center;
  451. gap: 6rpx;
  452. }
  453. .user-location text {
  454. font-size: 22rpx;
  455. color: #999;
  456. }
  457. .time-info {
  458. font-size: 22rpx;
  459. color: #999;
  460. background: rgba(0, 0, 0, 0.04);
  461. padding: 6rpx 16rpx;
  462. border-radius: 16rpx;
  463. }