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

450 lines
7.5 KiB

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%,
  123. 80%,
  124. 100% {
  125. transform: scale(0);
  126. }
  127. 40% {
  128. transform: scale(1);
  129. }
  130. }
  131. .loading-text {
  132. font-size: 28rpx;
  133. color: #64748B;
  134. }
  135. /* 搜索结果 */
  136. .result-list {
  137. height: calc(100vh - 240rpx);
  138. }
  139. .result-count {
  140. display: flex;
  141. align-items: center;
  142. padding: 32rpx 32rpx 24rpx;
  143. font-size: 28rpx;
  144. color: #475569;
  145. }
  146. /* 知识列表 */
  147. .knowledge-list {
  148. padding: 0 32rpx;
  149. }
  150. .knowledge-item {
  151. background: #FFFFFF;
  152. border-radius: 24rpx;
  153. padding: 32rpx;
  154. margin-bottom: 24rpx;
  155. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
  156. border: 1rpx solid rgba(226, 232, 240, 0.6);
  157. }
  158. .item-header {
  159. display: flex;
  160. justify-content: space-between;
  161. align-items: flex-start;
  162. margin-bottom: 24rpx;
  163. }
  164. .title-wrapper {
  165. width: 100%;
  166. display: flex;
  167. justify-content: space-between;
  168. align-items: center;
  169. }
  170. .item-title {
  171. font-size: 32rpx;
  172. font-weight: 600;
  173. color: #1E293B;
  174. }
  175. .item-category {
  176. padding: 8rpx 20rpx;
  177. background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
  178. color: #065F46;
  179. font-size: 24rpx;
  180. border-radius: 20rpx;
  181. font-weight: 500;
  182. }
  183. .item-content {
  184. font-size: 28rpx;
  185. color: #475569;
  186. line-height: 1.6;
  187. margin-bottom: 28rpx;
  188. display: -webkit-box;
  189. -webkit-box-orient: vertical;
  190. -webkit-line-clamp: 3;
  191. overflow: hidden;
  192. }
  193. /* 底部信息 */
  194. .item-footer {
  195. border-top: 1rpx solid #F1F5F9;
  196. padding-top: 24rpx;
  197. }
  198. .tags {
  199. display: flex;
  200. flex-wrap: wrap;
  201. gap: 12rpx;
  202. margin-bottom: 24rpx;
  203. }
  204. .tag {
  205. padding: 8rpx 20rpx;
  206. background: #F1F5F9;
  207. color: #475569;
  208. font-size: 24rpx;
  209. border-radius: 16rpx;
  210. }
  211. .actions {
  212. display: flex;
  213. justify-content: space-between;
  214. align-items: center;
  215. }
  216. .date-info {
  217. display: flex;
  218. align-items: center;
  219. }
  220. .date {
  221. font-size: 24rpx;
  222. color: #94A3B8;
  223. }
  224. .copy-btn {
  225. display: flex;
  226. align-items: center;
  227. padding: 12rpx 24rpx;
  228. background: #F8FAFC;
  229. border-radius: 20rpx;
  230. font-size: 26rpx;
  231. color: #3B82F6;
  232. border: 1rpx solid #E2E8F0;
  233. transition: all 0.2s ease;
  234. }
  235. .copy-btn:active {
  236. background: #F1F5F9;
  237. }
  238. /* 空状态 */
  239. .empty-state {
  240. display: flex;
  241. flex-direction: column;
  242. align-items: center;
  243. padding: 80rpx 32rpx;
  244. text-align: center;
  245. }
  246. .empty-text {
  247. font-size: 32rpx;
  248. font-weight: 600;
  249. color: #1E293B;
  250. margin-bottom: 48rpx;
  251. }
  252. .suggestions {
  253. display: flex;
  254. flex-direction: column;
  255. gap: 20rpx;
  256. width: 100%;
  257. max-width: 500rpx;
  258. }
  259. .suggestion-item {
  260. display: flex;
  261. align-items: center;
  262. padding: 24rpx;
  263. background: #F8FAFC;
  264. border-radius: 16rpx;
  265. font-size: 28rpx;
  266. color: #475569;
  267. }
  268. .suggestion-dot {
  269. width: 12rpx;
  270. height: 12rpx;
  271. background: #3B82F6;
  272. border-radius: 50%;
  273. margin-right: 16rpx;
  274. }
  275. /* 弹框样式 */
  276. .modal-mask {
  277. position: fixed;
  278. top: 0;
  279. left: 0;
  280. right: 0;
  281. bottom: 0;
  282. background: rgba(15, 23, 42, 0.8);
  283. display: flex;
  284. align-items: center;
  285. justify-content: center;
  286. z-index: 1000;
  287. backdrop-filter: blur(4rpx);
  288. animation: fadeIn 0.3s ease-out;
  289. font-family: '思源宋体 Light' !important;
  290. }
  291. @keyframes fadeIn {
  292. from {
  293. opacity: 0;
  294. }
  295. to {
  296. opacity: 1;
  297. }
  298. }
  299. .modal-content {
  300. background: #FFFFFF;
  301. border-radius: 32rpx;
  302. width: 80%;
  303. max-width: 600rpx;
  304. overflow: hidden;
  305. animation: slideUp 0.3s ease-out;
  306. }
  307. @keyframes slideUp {
  308. from {
  309. opacity: 0;
  310. transform: translateY(80rpx);
  311. }
  312. to {
  313. opacity: 1;
  314. transform: translateY(0);
  315. }
  316. }
  317. .modal-header {
  318. display: flex;
  319. flex-direction: column;
  320. align-items: center;
  321. padding: 48rpx 0 40rpx;
  322. background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  323. }
  324. .modal-icon {
  325. width: 60rpx;
  326. height: 60rpx;
  327. margin-bottom: 20rpx;
  328. }
  329. .modal-title {
  330. font-size: 36rpx;
  331. font-weight: 600;
  332. color: #0C4A6E;
  333. }
  334. .modal-body {
  335. padding: 40rpx 48rpx;
  336. }
  337. .tip-item {
  338. display: flex;
  339. align-items: flex-start;
  340. margin-bottom: 32rpx;
  341. }
  342. .tip-item:last-child {
  343. margin-bottom: 0;
  344. }
  345. .tip-number {
  346. width: 48rpx;
  347. height: 48rpx;
  348. background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
  349. color: #FFFFFF;
  350. border-radius: 50%;
  351. display: flex;
  352. align-items: center;
  353. justify-content: center;
  354. font-size: 24rpx;
  355. font-weight: 600;
  356. margin-right: 20rpx;
  357. flex-shrink: 0;
  358. }
  359. .tip-text {
  360. font-size: 28rpx;
  361. color: #334155;
  362. line-height: 1.5;
  363. padding-top: 10rpx;
  364. }
  365. .modal-footer {
  366. padding: 0 48rpx 48rpx;
  367. }
  368. .modal-confirm {
  369. width: 100%;
  370. height: 88rpx;
  371. background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
  372. color: #FFFFFF;
  373. border-radius: 44rpx;
  374. font-size: 32rpx;
  375. font-weight: 500;
  376. line-height: 88rpx;
  377. border: none;
  378. box-shadow: 0 8rpx 24rpx rgba(59, 130, 246, 0.3);
  379. transition: transform 0.2s ease;
  380. }
  381. .modal-confirm:active {
  382. transform: scale(0.98);
  383. }
  384. .modal-confirm::after {
  385. border: none;
  386. }