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.
|
|
/* 页面容器 */.page-container { background-color: #f8f9fa; min-height: 100vh; padding-bottom: 40rpx; } /* 顶部栏 */ .top-bar { background-color: white; position: sticky; top: 0; z-index: 100; box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); } /* 搜索容器 */ .search-container { padding: 20rpx 30rpx; } .search-box { display: flex; align-items: center; background-color: #f8f9fa; border-radius: 50rpx; padding: 18rpx 30rpx; } .search-icon { font-size: 32rpx; color: #999; margin-right: 20rpx; }
.search-icon image{ width: 45rpx; height: 45rpx; } .search-input { flex: 1; font-size: 28rpx; color: #333; height: 40rpx; } .search-clear { width: 40rpx; height: 40rpx; border-radius: 50%; background-color: #e0e0e0; color: #666; font-size: 24rpx; display: flex; align-items: center; justify-content: center; } /* 分类筛选 */ .category-filters { padding: 0 20rpx 20rpx; } .filters-scroll { white-space: nowrap; height: 70rpx; } .filter-tag { display: inline-flex; align-items: center; padding: 0 30rpx; height: 60rpx; line-height: 60rpx; border-radius: 30rpx; background-color: #f8f9fa; color: #666; font-size: 26rpx; margin-right: 20rpx; } .filter-tag.active { background-color: #3a7ff3; color: white; font-weight: 500; } .filter-icon { margin-right: 8rpx; } /* 药品网格布局 */ .medicine-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20rpx; padding: 30rpx; } /* 药品卡片 */ .medicine-card { background-color: white; border-radius: 20rpx; overflow: hidden; box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; } .medicine-card:active { transform: translateY(-4rpx); box-shadow: 0 8rpx 25rpx rgba(0, 0, 0, 0.1); } /* 卡片图片区域 */ .card-image { position: relative; width: 100%; height: 320rpx; overflow: hidden; } .medicine-img { width: 100%; height: 100%; } .card-tag { position: absolute; top: 20rpx; left: 20rpx; padding: 6rpx 16rpx; border-radius: 20rpx; font-size: 22rpx; color: white; background-color: #3a7ff3; }
.card-tag.other { background-color: #607D8B; } .hot-tag { position: absolute; top: 20rpx; right: 20rpx; padding: 6rpx 16rpx; border-radius: 20rpx; font-size: 22rpx; color: white; background-color: #ff4444; } /* 卡片内容区域 */ .card-content { padding: 25rpx; } .medicine-name { font-size: 30rpx; font-weight: bold; color: #333; margin-bottom: 10rpx; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 84rpx; }
/* 卡片底部 */ .card-footer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15rpx; } .price-section { display: flex; align-items: center; } .current-price { color: #ff4444; font-weight: bold; display: flex; align-items: baseline; } .price-symbol { font-size: 24rpx; margin-right: 2rpx; } .price-value { font-size: 36rpx; } .original-price { font-size: 24rpx; color: #999; text-decoration: line-through; margin-left: 10rpx; } .expert-brief { display: flex; align-items: center; } .expert-avatar { width: 40rpx; height: 40rpx; border-radius: 50%; margin-right: 8rpx; } .expert-name { font-size: 24rpx; color: #666; } /* 店铺信息 */ .store-brief { display: flex; align-items: center; font-size: 24rpx; color: #666; padding-top: 15rpx; border-top: 1rpx solid #f0f0f0; } .store-icon { margin-right: 8rpx; } .store-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 空状态 */ .empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 100rpx 0; }
.empty-text { font-size: 32rpx; color: #999; margin-bottom: 15rpx; text-align: center; } .empty-subtext { font-size: 28rpx; color: #ccc; margin-bottom: 40rpx; }
/* 加载更多 */ .load-more, .no-more { grid-column: 1 / -1; text-align: center; padding: 40rpx 0; color: #999; font-size: 26rpx; } .load-text { position: relative; display: inline-block; padding: 0 40rpx; } .load-text::before, .load-text::after { content: ''; position: absolute; top: 50%; width: 30rpx; height: 1rpx; background-color: #ddd; } .load-text::before { left: 0; } .load-text::after { right: 0; } /* 加载中 */ .loading-container { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40rpx 0; } .loading-spinner { width: 60rpx; height: 60rpx; border: 6rpx solid #f3f3f3; border-top: 6rpx solid #3a7ff3; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20rpx; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* 返回顶部按钮 */ .back-to-top { position: fixed; bottom: 120rpx; right: 30rpx; width: 80rpx; height: 80rpx; border-radius: 50%; background-color: #3a7ff3; color: white; font-size: 36rpx; display: flex; align-items: center; justify-content: center; box-shadow: 0 4rpx 15rpx rgba(58, 127, 243, 0.3); opacity: 0; transform: translateY(20rpx); transition: all 0.3s ease; z-index: 99; } .back-to-top.show { opacity: 1; transform: translateY(0); } /* 响应式调整 */ @media (max-width: 700rpx) { .medicine-grid { grid-template-columns: 1fr; padding: 20rpx; } .card-image { height: 400rpx; } }
|