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

331 lines
5.3 KiB

  1. /* pages/experience/experience.wxss */
  2. .page-container {
  3. background-color: #f5f7fa;
  4. min-height: 100vh;
  5. }
  6. /* 搜索区域 */
  7. .search-container {
  8. background: linear-gradient(135deg, #4A90E2 0%, #6AC5F8 100%);
  9. padding: 20rpx 32rpx 32rpx;
  10. }
  11. .search-box {
  12. background-color: white;
  13. border-radius: 50rpx;
  14. padding: 20rpx 32rpx;
  15. display: flex;
  16. align-items: center;
  17. box-shadow: 0 4rpx 16rpx rgba(74, 144, 226, 0.2);
  18. }
  19. .search-icon {
  20. width: 32rpx;
  21. height: 32rpx;
  22. margin-right: 16rpx;
  23. }
  24. .search-input {
  25. width: 95%;
  26. font-size: 28rpx;
  27. color: #333;
  28. }
  29. .placeholder {
  30. color: #999;
  31. font-size: 28rpx;
  32. }
  33. .clear-btn {
  34. width: 32rpx;
  35. height: 32rpx;
  36. display: flex;
  37. align-items: center;
  38. justify-content: center;
  39. }
  40. .clear-icon {
  41. width: 30rpx;
  42. height: 30rpx;
  43. filter: brightness(0) contrast(100%);
  44. }
  45. /* 分类区域 */
  46. .category-container {
  47. background-color: white;
  48. padding: 20rpx 32rpx;
  49. white-space: nowrap;
  50. box-sizing: border-box;
  51. }
  52. .category-list {
  53. display: inline-flex;
  54. }
  55. .category-item {
  56. display: inline-flex;
  57. align-items: center;
  58. padding: 12rpx 28rpx;
  59. margin-right: 20rpx;
  60. border-radius: 40rpx;
  61. background-color: #f5f7fa;
  62. border: 2rpx solid #f5f7fa;
  63. transition: all 0.3s ease;
  64. }
  65. .category-item.active {
  66. background-color: #E8F3FF;
  67. border-color: #4A90E2;
  68. }
  69. .category-text {
  70. font-size: 26rpx;
  71. color: #666;
  72. font-weight: 400;
  73. }
  74. .category-item.active .category-text {
  75. color: #4A90E2;
  76. font-weight: 500;
  77. }
  78. .category-item.active .category-count {
  79. background-color: rgba(74, 144, 226, 0.1);
  80. color: #4A90E2;
  81. }
  82. /* 经验列表 */
  83. .experience-list {
  84. padding: 32rpx;
  85. }
  86. .experience-item {
  87. background-color: white;
  88. border-radius: 20rpx;
  89. padding: 32rpx;
  90. margin-bottom: 24rpx;
  91. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);
  92. transition: all 0.3s ease;
  93. }
  94. .experience-item:active {
  95. transform: translateY(-2rpx);
  96. box-shadow: 0 6rpx 24rpx rgba(0, 0, 0, 0.08);
  97. }
  98. .tag{
  99. display: flex;
  100. align-items: center;
  101. justify-content: space-between;
  102. padding-bottom: 20rpx;
  103. }
  104. .item-category-tag {
  105. display: inline-block;
  106. background-color: #E8F3FF;
  107. padding: 6rpx 16rpx;
  108. border-radius: 20rpx;
  109. }
  110. .tag-text {
  111. font-size: 22rpx;
  112. color: #4A90E2;
  113. font-weight: 500;
  114. }
  115. .item-title {
  116. font-size: 34rpx;
  117. color: #1a1a1a;
  118. font-weight: 600;
  119. line-height: 1.4;
  120. margin-bottom: 16rpx;
  121. }
  122. .item-summary {
  123. font-size: 28rpx;
  124. color: #666;
  125. line-height: 1.5;
  126. margin-bottom: 24rpx;
  127. display: -webkit-box;
  128. -webkit-box-orient: vertical;
  129. -webkit-line-clamp: 2;
  130. overflow: hidden;
  131. }
  132. .item-footer {
  133. display: flex;
  134. align-items: center;
  135. justify-content: space-between;
  136. padding-top: 20rpx;
  137. border-top: 1rpx solid #f0f0f0;
  138. }
  139. .author-info {
  140. display: flex;
  141. align-items: center;
  142. flex: 1;
  143. }
  144. .author-avatar {
  145. width: 48rpx;
  146. height: 48rpx;
  147. border-radius: 50%;
  148. margin-right: 12rpx;
  149. }
  150. .author-name {
  151. font-size: 24rpx;
  152. color: #999;
  153. }
  154. .view-info {
  155. display: flex;
  156. align-items: center;
  157. margin-right: 32rpx;
  158. }
  159. .view-icon {
  160. width: 28rpx;
  161. height: 28rpx;
  162. margin-right: 8rpx;
  163. opacity: 0.6;
  164. }
  165. .view-count {
  166. font-size: 24rpx;
  167. color: #999;
  168. }
  169. .publish-time {
  170. font-size: 24rpx;
  171. color: #ccc;
  172. flex-shrink: 0;
  173. }
  174. /* 空状态 */
  175. .empty-state {
  176. display: flex;
  177. flex-direction: column;
  178. align-items: center;
  179. justify-content: center;
  180. padding: 100rpx 0;
  181. }
  182. .empty-text {
  183. font-size: 32rpx;
  184. color: #999;
  185. margin-bottom: 16rpx;
  186. }
  187. .empty-hint {
  188. font-size: 26rpx;
  189. color: #ccc;
  190. }
  191. /* 新增样式 */
  192. .experience-scroll {
  193. box-sizing: border-box;
  194. }
  195. /* 加载更多样式 */
  196. .load-more {
  197. text-align: center;
  198. padding: 40rpx 0;
  199. color: #4A90E2;
  200. font-size: 28rpx;
  201. }
  202. .load-more-text {
  203. padding: 16rpx 32rpx;
  204. background-color: #E8F3FF;
  205. border-radius: 24rpx;
  206. display: inline-block;
  207. }
  208. .loading {
  209. text-align: center;
  210. padding: 40rpx 0;
  211. color: #999;
  212. font-size: 28rpx;
  213. }
  214. .loading-text {
  215. display: inline-block;
  216. padding: 16rpx 32rpx;
  217. }
  218. .no-more {
  219. text-align: center;
  220. padding: 40rpx 0;
  221. color: #ccc;
  222. font-size: 26rpx;
  223. }
  224. .no-more-text {
  225. display: inline-block;
  226. padding: 16rpx 32rpx;
  227. }
  228. /* 优化空状态样式 */
  229. .empty-state {
  230. display: flex;
  231. flex-direction: column;
  232. align-items: center;
  233. justify-content: center;
  234. padding: 120rpx 0;
  235. text-align: center;
  236. }
  237. .empty-text {
  238. font-size: 32rpx;
  239. color: #999;
  240. margin-bottom: 20rpx;
  241. font-weight: 500;
  242. }
  243. .empty-hint {
  244. font-size: 28rpx;
  245. color: #ccc;
  246. }
  247. /* 优化列表项样式 */
  248. .experience-item {
  249. position: relative;
  250. overflow: hidden;
  251. }
  252. .experience-item:last-child {
  253. margin-bottom: 0;
  254. }
  255. /* 响应式调整 */
  256. @media (max-width: 375px) {
  257. .load-more,
  258. .loading,
  259. .no-more {
  260. padding: 30rpx 0;
  261. }
  262. .empty-state {
  263. padding: 80rpx 0;
  264. }
  265. }
  266. /* 响应式调整 */
  267. @media (max-width: 375px) {
  268. .search-container {
  269. padding: 16rpx 24rpx 24rpx;
  270. }
  271. .experience-list {
  272. padding: 24rpx;
  273. }
  274. .experience-item {
  275. padding: 24rpx;
  276. }
  277. }