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

518 lines
8.0 KiB

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