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

478 lines
8.0 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. /* 基础样式 */
  2. .container_zsl {
  3. min-height: 100vh;
  4. background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  5. padding: 0;
  6. font-family: '思源宋体 Light' !important;
  7. }
  8. /* 搜索区域 */
  9. .search-area {
  10. background: #FFFFFF;
  11. padding: 32rpx 32rpx 24rpx;
  12. border-bottom-left-radius: 32rpx;
  13. border-bottom-right-radius: 32rpx;
  14. box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.04);
  15. position: sticky;
  16. top: 0;
  17. z-index: 100;
  18. }
  19. .search-box {
  20. display: flex;
  21. align-items: center;
  22. margin-bottom: 32rpx;
  23. }
  24. .search-input-wrapper {
  25. flex: 1;
  26. height: 80rpx;
  27. background: #F8FAFC;
  28. border-radius: 40rpx;
  29. padding: 0 20rpx;
  30. display: flex;
  31. align-items: center;
  32. border: 2rpx solid #E2E8F0;
  33. transition: all 0.3s ease;
  34. }
  35. .search-input-wrapper:focus-within {
  36. border-color: #3B82F6;
  37. box-shadow: 0 0 0 3rpx rgba(59, 130, 246, 0.1);
  38. }
  39. .search-icon {
  40. width: 45rpx;
  41. height: 45rpx;
  42. margin-right: 16rpx;
  43. }
  44. .search-input {
  45. flex: 1;
  46. height: 100%;
  47. font-size: 28rpx;
  48. color: #1E293B;
  49. }
  50. .placeholder {
  51. color: #94A3B8;
  52. font-size: 28rpx;
  53. }
  54. .clear-icon {
  55. color: #94A3B8;
  56. padding: 8rpx;
  57. border-radius: 50%;
  58. background: rgba(148, 163, 184, 0.1);
  59. }
  60. /* 分类筛选 */
  61. .category-filter {
  62. display: flex;
  63. gap: 20rpx;
  64. overflow-x: auto;
  65. padding-bottom: 8rpx;
  66. }
  67. .category-filter::-webkit-scrollbar {
  68. display: none;
  69. }
  70. .category-item {
  71. padding: 16rpx 32rpx;
  72. background: #F1F5F9;
  73. border-radius: 40rpx;
  74. font-size: 28rpx;
  75. color: #64748B;
  76. display: flex;
  77. align-items: center;
  78. white-space: nowrap;
  79. transition: all 0.3s ease;
  80. position: relative;
  81. }
  82. .category-item.active {
  83. background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
  84. color: #FFFFFF;
  85. font-weight: 500;
  86. box-shadow: 0 8rpx 20rpx rgba(59, 130, 246, 0.3);
  87. }
  88. .category-dot {
  89. width: 8rpx;
  90. height: 8rpx;
  91. background: #FFFFFF;
  92. border-radius: 50%;
  93. margin-left: 8rpx;
  94. }
  95. /* 加载状态 */
  96. .loading {
  97. display: flex;
  98. flex-direction: column;
  99. align-items: center;
  100. justify-content: center;
  101. padding: 120rpx 0;
  102. }
  103. .spinner {
  104. display: flex;
  105. gap: 12rpx;
  106. margin-bottom: 32rpx;
  107. }
  108. .spinner-item {
  109. width: 20rpx;
  110. height: 20rpx;
  111. background: #3B82F6;
  112. border-radius: 50%;
  113. animation: bounce 1.4s infinite ease-in-out both;
  114. }
  115. .spinner-item:nth-child(1) {
  116. animation-delay: -0.32s;
  117. }
  118. .spinner-item:nth-child(2) {
  119. animation-delay: -0.16s;
  120. }
  121. @keyframes bounce {
  122. 0%, 80%, 100% {
  123. transform: scale(0);
  124. }
  125. 40% {
  126. transform: scale(1);
  127. }
  128. }
  129. .loading-text {
  130. font-size: 28rpx;
  131. color: #64748B;
  132. }
  133. /* 搜索结果 */
  134. .result-list {
  135. height: calc(100vh - 240rpx);
  136. }
  137. .result-count {
  138. display: flex;
  139. align-items: center;
  140. padding: 32rpx 32rpx 24rpx;
  141. font-size: 28rpx;
  142. color: #475569;
  143. }
  144. /* 知识列表 */
  145. .knowledge-list {
  146. padding: 0 32rpx;
  147. }
  148. .knowledge-item {
  149. background: #FFFFFF;
  150. border-radius: 24rpx;
  151. padding: 32rpx;
  152. margin-bottom: 24rpx;
  153. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
  154. border: 1rpx solid rgba(226, 232, 240, 0.6);
  155. }
  156. .item-header {
  157. display: flex;
  158. justify-content: space-between;
  159. align-items: flex-start;
  160. margin-bottom: 24rpx;
  161. }
  162. .title-wrapper {
  163. width: 100%;
  164. display: flex;
  165. justify-content: space-between;
  166. align-items: center;
  167. }
  168. .item-title {
  169. font-size: 32rpx;
  170. font-weight: 600;
  171. color: #1E293B;
  172. }
  173. .item-category {
  174. padding: 8rpx 20rpx;
  175. background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
  176. color: #065F46;
  177. font-size: 24rpx;
  178. border-radius: 20rpx;
  179. font-weight: 500;
  180. }
  181. .item-content {
  182. font-size: 28rpx;
  183. color: #475569;
  184. line-height: 1.6;
  185. margin-bottom: 28rpx;
  186. display: -webkit-box;
  187. -webkit-box-orient: vertical;
  188. -webkit-line-clamp: 3;
  189. overflow: hidden;
  190. }
  191. /* 底部信息 */
  192. .item-footer {
  193. border-top: 1rpx solid #F1F5F9;
  194. padding-top: 24rpx;
  195. }
  196. .tags {
  197. display: flex;
  198. flex-wrap: wrap;
  199. gap: 12rpx;
  200. margin-bottom: 24rpx;
  201. }
  202. .tag {
  203. padding: 8rpx 20rpx;
  204. background: #F1F5F9;
  205. color: #475569;
  206. font-size: 24rpx;
  207. border-radius: 16rpx;
  208. }
  209. .actions {
  210. display: flex;
  211. justify-content: space-between;
  212. align-items: center;
  213. }
  214. .date-info {
  215. display: flex;
  216. align-items: center;
  217. }
  218. .date {
  219. font-size: 24rpx;
  220. color: #94A3B8;
  221. }
  222. .copy-btn {
  223. display: flex;
  224. align-items: center;
  225. padding: 12rpx 24rpx;
  226. background: #F8FAFC;
  227. border-radius: 20rpx;
  228. font-size: 26rpx;
  229. color: #3B82F6;
  230. border: 1rpx solid #E2E8F0;
  231. transition: all 0.2s ease;
  232. }
  233. .copy-btn:active {
  234. background: #F1F5F9;
  235. }
  236. /* 加载更多样式 */
  237. .load-more {
  238. padding: 40rpx 0;
  239. text-align: center;
  240. color: #94A3B8;
  241. font-size: 26rpx;
  242. }
  243. .load-more-loading {
  244. display: flex;
  245. flex-direction: column;
  246. align-items: center;
  247. }
  248. .loading-dots {
  249. display: flex;
  250. gap: 8rpx;
  251. margin-bottom: 16rpx;
  252. }
  253. .loading-dots .dot {
  254. width: 12rpx;
  255. height: 12rpx;
  256. background: #3B82F6;
  257. border-radius: 50%;
  258. animation: dotPulse 1.5s infinite ease-in-out;
  259. }
  260. .loading-dots .dot:nth-child(2) {
  261. animation-delay: 0.2s;
  262. }
  263. .loading-dots .dot:nth-child(3) {
  264. animation-delay: 0.4s;
  265. }
  266. @keyframes dotPulse {
  267. 0%, 60%, 100% {
  268. transform: translateY(0);
  269. opacity: 0.6;
  270. }
  271. 30% {
  272. transform: translateY(-20rpx);
  273. opacity: 1;
  274. }
  275. }
  276. .no-more {
  277. padding: 40rpx 0;
  278. text-align: center;
  279. color: #94A3B8;
  280. font-size: 26rpx;
  281. }
  282. /* 空状态 */
  283. .empty-state {
  284. display: flex;
  285. flex-direction: column;
  286. align-items: center;
  287. padding: 80rpx 32rpx;
  288. text-align: center;
  289. }
  290. .empty-text {
  291. font-size: 32rpx;
  292. font-weight: 600;
  293. color: #1E293B;
  294. margin-bottom: 48rpx;
  295. }
  296. .suggestions {
  297. display: flex;
  298. flex-direction: column;
  299. gap: 20rpx;
  300. width: 100%;
  301. max-width: 500rpx;
  302. }
  303. .suggestion-item {
  304. display: flex;
  305. align-items: center;
  306. padding: 24rpx;
  307. background: #F8FAFC;
  308. border-radius: 16rpx;
  309. font-size: 28rpx;
  310. color: #475569;
  311. }
  312. .suggestion-dot {
  313. width: 12rpx;
  314. height: 12rpx;
  315. background: #3B82F6;
  316. border-radius: 50%;
  317. margin-right: 16rpx;
  318. }
  319. /* 弹框样式 */
  320. .modal-mask {
  321. position: fixed;
  322. top: 0;
  323. left: 0;
  324. right: 0;
  325. bottom: 0;
  326. background: rgba(15, 23, 42, 0.8);
  327. display: flex;
  328. align-items: center;
  329. justify-content: center;
  330. z-index: 1000;
  331. backdrop-filter: blur(4rpx);
  332. animation: fadeIn 0.3s ease-out;
  333. font-family: '思源宋体 Light' !important;
  334. }
  335. @keyframes fadeIn {
  336. from { opacity: 0; }
  337. to { opacity: 1; }
  338. }
  339. .modal-content {
  340. background: #FFFFFF;
  341. border-radius: 32rpx;
  342. width: 80%;
  343. max-width: 600rpx;
  344. overflow: hidden;
  345. animation: slideUp 0.3s ease-out;
  346. }
  347. @keyframes slideUp {
  348. from {
  349. opacity: 0;
  350. transform: translateY(80rpx);
  351. }
  352. to {
  353. opacity: 1;
  354. transform: translateY(0);
  355. }
  356. }
  357. .modal-header {
  358. display: flex;
  359. flex-direction: column;
  360. align-items: center;
  361. padding: 48rpx 0 40rpx;
  362. background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  363. }
  364. .modal-icon {
  365. width: 60rpx;
  366. height: 60rpx;
  367. margin-bottom: 20rpx;
  368. }
  369. .modal-title {
  370. font-size: 36rpx;
  371. font-weight: 600;
  372. color: #0C4A6E;
  373. }
  374. .modal-body {
  375. padding: 40rpx 48rpx;
  376. }
  377. .tip-item {
  378. display: flex;
  379. align-items: flex-start;
  380. margin-bottom: 32rpx;
  381. }
  382. .tip-item:last-child {
  383. margin-bottom: 0;
  384. }
  385. .tip-text {
  386. font-size: 28rpx;
  387. color: #334155;
  388. line-height: 1.5;
  389. padding-top: 10rpx;
  390. }
  391. .modal-footer {
  392. padding: 0 48rpx 48rpx;
  393. }
  394. .modal-confirm {
  395. width: 100%;
  396. height: 88rpx;
  397. background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
  398. color: #FFFFFF;
  399. border-radius: 44rpx;
  400. font-size: 32rpx;
  401. font-weight: 500;
  402. line-height: 88rpx;
  403. border: none;
  404. box-shadow: 0 8rpx 24rpx rgba(59, 130, 246, 0.3);
  405. transition: transform 0.2s ease;
  406. }
  407. .modal-confirm:active {
  408. transform: scale(0.98);
  409. }
  410. .modal-confirm::after {
  411. border: none;
  412. }