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

369 lines
6.2 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. /* 页面容器 */
  2. .page-container {
  3. background-color: #f8f9fa;
  4. min-height: 100vh;
  5. padding-bottom: 40rpx;
  6. }
  7. /* 顶部栏 */
  8. .top-bar {
  9. background-color: white;
  10. position: sticky;
  11. top: 0;
  12. z-index: 100;
  13. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  14. }
  15. /* 搜索容器 */
  16. .search-container {
  17. padding: 20rpx 30rpx;
  18. }
  19. .search-box {
  20. display: flex;
  21. align-items: center;
  22. background-color: #f8f9fa;
  23. border-radius: 50rpx;
  24. padding: 18rpx 30rpx;
  25. }
  26. .search-icon {
  27. font-size: 32rpx;
  28. color: #999;
  29. margin-right: 20rpx;
  30. }
  31. .search-icon image{
  32. width: 45rpx;
  33. height: 45rpx;
  34. }
  35. .search-input {
  36. flex: 1;
  37. font-size: 28rpx;
  38. color: #333;
  39. height: 40rpx;
  40. }
  41. .search-clear {
  42. width: 40rpx;
  43. height: 40rpx;
  44. border-radius: 50%;
  45. background-color: #e0e0e0;
  46. color: #666;
  47. font-size: 24rpx;
  48. display: flex;
  49. align-items: center;
  50. justify-content: center;
  51. }
  52. /* 分类筛选 */
  53. .category-filters {
  54. padding: 0 20rpx 20rpx;
  55. }
  56. .filters-scroll {
  57. white-space: nowrap;
  58. height: 70rpx;
  59. }
  60. .filter-tag {
  61. display: inline-flex;
  62. align-items: center;
  63. padding: 0 30rpx;
  64. height: 60rpx;
  65. line-height: 60rpx;
  66. border-radius: 30rpx;
  67. background-color: #f8f9fa;
  68. color: #666;
  69. font-size: 26rpx;
  70. margin-right: 20rpx;
  71. }
  72. .filter-tag.active {
  73. background-color: #3a7ff3;
  74. color: white;
  75. font-weight: 500;
  76. }
  77. .filter-icon {
  78. margin-right: 8rpx;
  79. }
  80. /* 药品网格布局 */
  81. .medicine-grid {
  82. display: grid;
  83. grid-template-columns: repeat(2, 1fr);
  84. gap: 20rpx;
  85. padding: 30rpx;
  86. }
  87. /* 药品卡片 */
  88. .medicine-card {
  89. background-color: white;
  90. border-radius: 20rpx;
  91. overflow: hidden;
  92. box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.05);
  93. transition: transform 0.3s ease, box-shadow 0.3s ease;
  94. }
  95. .medicine-card:active {
  96. transform: translateY(-4rpx);
  97. box-shadow: 0 8rpx 25rpx rgba(0, 0, 0, 0.1);
  98. }
  99. /* 卡片图片区域 */
  100. .card-image {
  101. position: relative;
  102. width: 100%;
  103. height: 320rpx;
  104. overflow: hidden;
  105. }
  106. .medicine-img {
  107. width: 100%;
  108. height: 100%;
  109. }
  110. .card-tag {
  111. position: absolute;
  112. top: 20rpx;
  113. left: 20rpx;
  114. padding: 6rpx 16rpx;
  115. border-radius: 20rpx;
  116. font-size: 22rpx;
  117. color: white;
  118. background-color: #3a7ff3;
  119. }
  120. .card-tag.other {
  121. background-color: #607D8B;
  122. }
  123. .hot-tag {
  124. position: absolute;
  125. top: 20rpx;
  126. right: 20rpx;
  127. padding: 6rpx 16rpx;
  128. border-radius: 20rpx;
  129. font-size: 22rpx;
  130. color: white;
  131. background-color: #ff4444;
  132. }
  133. /* 卡片内容区域 */
  134. .card-content {
  135. padding: 25rpx;
  136. }
  137. .medicine-name {
  138. font-size: 30rpx;
  139. font-weight: bold;
  140. color: #333;
  141. margin-bottom: 10rpx;
  142. line-height: 1.4;
  143. display: -webkit-box;
  144. -webkit-line-clamp: 2;
  145. -webkit-box-orient: vertical;
  146. overflow: hidden;
  147. min-height: 84rpx;
  148. }
  149. /* 卡片底部 */
  150. .card-footer {
  151. display: flex;
  152. justify-content: space-between;
  153. align-items: center;
  154. margin-bottom: 15rpx;
  155. }
  156. .price-section {
  157. display: flex;
  158. align-items: center;
  159. }
  160. .current-price {
  161. color: #ff4444;
  162. font-weight: bold;
  163. display: flex;
  164. align-items: baseline;
  165. }
  166. .price-symbol {
  167. font-size: 24rpx;
  168. margin-right: 2rpx;
  169. }
  170. .price-value {
  171. font-size: 36rpx;
  172. }
  173. .original-price {
  174. font-size: 24rpx;
  175. color: #999;
  176. text-decoration: line-through;
  177. margin-left: 10rpx;
  178. }
  179. .expert-brief {
  180. display: flex;
  181. align-items: center;
  182. }
  183. .expert-avatar {
  184. width: 40rpx;
  185. height: 40rpx;
  186. border-radius: 50%;
  187. margin-right: 8rpx;
  188. }
  189. .expert-name {
  190. font-size: 24rpx;
  191. color: #666;
  192. }
  193. /* 店铺信息 */
  194. .store-brief {
  195. display: flex;
  196. align-items: center;
  197. font-size: 24rpx;
  198. color: #666;
  199. padding-top: 15rpx;
  200. border-top: 1rpx solid #f0f0f0;
  201. }
  202. .store-icon {
  203. margin-right: 8rpx;
  204. }
  205. .store-name {
  206. flex: 1;
  207. overflow: hidden;
  208. text-overflow: ellipsis;
  209. white-space: nowrap;
  210. }
  211. /* 空状态 */
  212. .empty-state {
  213. grid-column: 1 / -1;
  214. display: flex;
  215. flex-direction: column;
  216. align-items: center;
  217. justify-content: center;
  218. padding: 100rpx 0;
  219. }
  220. .empty-text {
  221. font-size: 32rpx;
  222. color: #999;
  223. margin-bottom: 15rpx;
  224. text-align: center;
  225. }
  226. .empty-subtext {
  227. font-size: 28rpx;
  228. color: #ccc;
  229. margin-bottom: 40rpx;
  230. }
  231. /* 加载更多 */
  232. .load-more,
  233. .no-more {
  234. grid-column: 1 / -1;
  235. text-align: center;
  236. padding: 40rpx 0;
  237. color: #999;
  238. font-size: 26rpx;
  239. }
  240. .load-text {
  241. position: relative;
  242. display: inline-block;
  243. padding: 0 40rpx;
  244. }
  245. .load-text::before,
  246. .load-text::after {
  247. content: '';
  248. position: absolute;
  249. top: 50%;
  250. width: 30rpx;
  251. height: 1rpx;
  252. background-color: #ddd;
  253. }
  254. .load-text::before {
  255. left: 0;
  256. }
  257. .load-text::after {
  258. right: 0;
  259. }
  260. /* 加载中 */
  261. .loading-container {
  262. grid-column: 1 / -1;
  263. display: flex;
  264. flex-direction: column;
  265. align-items: center;
  266. justify-content: center;
  267. padding: 40rpx 0;
  268. }
  269. .loading-spinner {
  270. width: 60rpx;
  271. height: 60rpx;
  272. border: 6rpx solid #f3f3f3;
  273. border-top: 6rpx solid #3a7ff3;
  274. border-radius: 50%;
  275. animation: spin 1s linear infinite;
  276. margin-bottom: 20rpx;
  277. }
  278. @keyframes spin {
  279. 0% { transform: rotate(0deg); }
  280. 100% { transform: rotate(360deg); }
  281. }
  282. /* 返回顶部按钮 */
  283. .back-to-top {
  284. position: fixed;
  285. bottom: 120rpx;
  286. right: 30rpx;
  287. width: 80rpx;
  288. height: 80rpx;
  289. border-radius: 50%;
  290. background-color: #3a7ff3;
  291. color: white;
  292. font-size: 36rpx;
  293. display: flex;
  294. align-items: center;
  295. justify-content: center;
  296. box-shadow: 0 4rpx 15rpx rgba(58, 127, 243, 0.3);
  297. opacity: 0;
  298. transform: translateY(20rpx);
  299. transition: all 0.3s ease;
  300. z-index: 99;
  301. }
  302. .back-to-top.show {
  303. opacity: 1;
  304. transform: translateY(0);
  305. }
  306. /* 响应式调整 */
  307. @media (max-width: 700rpx) {
  308. .medicine-grid {
  309. grid-template-columns: 1fr;
  310. padding: 20rpx;
  311. }
  312. .card-image {
  313. height: 400rpx;
  314. }
  315. }