微信小店联盟带货小程序

index.wxss 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /* pages/category/index.wxss */
  2. .container {
  3. background-color: #fafafa;
  4. min-height: 100vh;
  5. padding-bottom: 20rpx;
  6. }
  7. /* 排序栏 */
  8. .sort-bar {
  9. display: flex;
  10. background-color: #fff;
  11. padding: 0 20rpx;
  12. height: 88rpx;
  13. align-items: center;
  14. position: sticky;
  15. top: 0;
  16. z-index: 10;
  17. border-bottom: 1rpx solid #eee;
  18. }
  19. .sort-item {
  20. flex: 1;
  21. text-align: center;
  22. font-size: 28rpx;
  23. color: #666;
  24. position: relative;
  25. height: 88rpx;
  26. line-height: 88rpx;
  27. }
  28. .sort-item.active {
  29. color: #ff4d4f;
  30. font-weight: bold;
  31. }
  32. .sort-item.active::after {
  33. content: "";
  34. position: absolute;
  35. bottom: 0;
  36. left: 50%;
  37. transform: translateX(-50%);
  38. width: 40rpx;
  39. height: 4rpx;
  40. background-color: #ff4d4f;
  41. }
  42. /* 商品列表样式 */
  43. .goods-list {
  44. display: flex;
  45. flex-wrap: wrap;
  46. margin: 0 -8rpx;
  47. padding: 20rpx;
  48. }
  49. .goods-item {
  50. width: calc(50% - 16rpx);
  51. margin: 8rpx;
  52. background: #fff;
  53. border-radius: 12rpx;
  54. overflow: hidden;
  55. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
  56. transition: all 0.3s ease;
  57. }
  58. .goods-item:active {
  59. transform: scale(0.98);
  60. }
  61. .goods-img {
  62. width: 100%;
  63. height: 280rpx;
  64. background: #f5f5f5;
  65. display: flex;
  66. align-items: center;
  67. justify-content: center;
  68. }
  69. .goods-img image {
  70. width: 100%;
  71. height: 100%;
  72. object-fit: cover;
  73. }
  74. .goods-info {
  75. padding: 16rpx 20rpx 20rpx;
  76. }
  77. .goods-name {
  78. font-size: 26rpx;
  79. color: #262626;
  80. line-height: 1.4;
  81. margin-bottom: 16rpx;
  82. display: -webkit-box;
  83. -webkit-box-orient: vertical;
  84. -webkit-line-clamp: 2;
  85. overflow: hidden;
  86. }
  87. .price-box {
  88. display: flex;
  89. justify-content: space-between;
  90. align-items: center;
  91. }
  92. .price-group {
  93. display: flex;
  94. align-items: baseline;
  95. }
  96. .price-symbol {
  97. font-size: 24rpx;
  98. color: #262626;
  99. margin-right: 2rpx;
  100. font-weight: 500;
  101. }
  102. .price {
  103. font-size: 34rpx;
  104. color: #262626;
  105. font-weight: 500;
  106. font-family: "DIN Alternate", -apple-system, BlinkMacSystemFont, "Segoe UI",
  107. Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  108. }
  109. .commission-group {
  110. display: flex;
  111. align-items: center;
  112. background-color: rgba(255, 77, 79, 0.1);
  113. padding: 4rpx 8rpx;
  114. border-radius: 4rpx;
  115. }
  116. .icon-share {
  117. font-size: 22rpx;
  118. color: #ff4d4f;
  119. margin-right: 4rpx;
  120. }
  121. .commission {
  122. font-size: 22rpx;
  123. color: #ff4d4f;
  124. font-family: "DIN Alternate", -apple-system, BlinkMacSystemFont, "Segoe UI",
  125. Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  126. }
  127. /* 加载状态 */
  128. .loading-state,
  129. .no-more,
  130. .empty-state {
  131. text-align: center;
  132. color: #999;
  133. padding: 30rpx;
  134. font-size: 24rpx;
  135. }
  136. .loading-state::before {
  137. content: "";
  138. display: inline-block;
  139. width: 30rpx;
  140. height: 30rpx;
  141. margin-right: 10rpx;
  142. border: 2rpx solid #999;
  143. border-top-color: transparent;
  144. border-radius: 50%;
  145. animation: loading 0.8s linear infinite;
  146. }
  147. @keyframes loading {
  148. from {
  149. transform: rotate(0deg);
  150. }
  151. to {
  152. transform: rotate(360deg);
  153. }
  154. }