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

556 lines
8.3 KiB

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