/* 全局样式 */ page { background-color: #f5f5f5; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; } .container { padding: 20rpx; } /* 搜索栏样式 */ .search-container { display: flex; align-items: center; margin-bottom: 20rpx; } .search-box { flex: 1; height: 80rpx; background-color: #fff; border-radius: 40rpx; display: flex; align-items: center; padding: 0 20rpx; margin-right: 20rpx; } .search-icon { width: 36rpx; height: 36rpx; margin-right: 10rpx; } .search-input { flex: 1; height: 100%; font-size: 28rpx; } .voice-icon { width: 36rpx; height: 36rpx; margin-left: 10rpx; } .search-btn { width: 160rpx; height: 80rpx; background-color: #1677ff; color: #fff; text-align: center; line-height: 80rpx; border-radius: 40rpx; font-size: 30rpx; } /* 热门搜索样式 */ .hot-search { margin-bottom: 30rpx; } .hot-title { font-size: 28rpx; color: #333; margin-bottom: 15rpx; } .hot-tags { display: flex; flex-wrap: wrap; } .tag { padding: 10rpx 20rpx; background-color: #f0f0f0; border-radius: 20rpx; font-size: 26rpx; color: #666; margin-right: 20rpx; margin-bottom: 15rpx; } .tag:hover { background-color: #e6f4ff; color: #1677ff; } /* 药品分类样式 */ .category-container { margin-bottom: 30rpx; } .category-title { font-size: 28rpx; color: #333; margin-bottom: 15rpx; } .category-scroll { white-space: nowrap; padding-bottom: 10rpx; } .category-item { display: inline-block; text-align: center; margin-right: 40rpx; } .category-item.active text { color: #1677ff; } .category-icon { width: 80rpx; height: 15rpx; background-color: #f5f5f5; border-radius: 40rpx; display: flex; align-items: center; justify-content: center; margin-bottom: 10rpx; } .category-icon image { width: 48rpx; height: 48rpx; } .category-item text { font-size: 24rpx; color: #666; } /* 药品列表样式 */ .medicine-list { margin-bottom: 30rpx; } .list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20rpx; } .list-title { font-size: 30rpx; font-weight: bold; color: #333; } .view-all { font-size: 26rpx; color: #1677ff; } .medicine-cards { display: flex; flex-wrap: wrap; justify-content: space-between; } .medicine-card { width: 345rpx; background-color: #fff; border-radius: 16rpx; margin-bottom: 20rpx; overflow: hidden; box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); } .card-image { position: relative; width: 100%; height: 345rpx; overflow: hidden; } .card-image image { width: 100%; height: 100%; object-fit: cover; } .badge { position: absolute; top: 15rpx; left: 15rpx; background-color: #ff4d4f; color: #fff; font-size: 22rpx; padding: 5rpx 10rpx; border-radius: 8rpx; } .card-content { padding: 15rpx; } .card-title { font-size: 28rpx; font-weight: bold; color: #333; margin-bottom: 8rpx; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; } .card-subtitle { font-size: 24rpx; color: #666; margin-bottom: 12rpx; } .card-info { display: flex; justify-content: space-between; align-items: center; } .card-price { font-size: 30rpx; font-weight: bold; color: #ff4d4f; } .card-rating { display: flex; align-items: center; font-size: 24rpx; color: #ff7d00; } .card-rating image { width: 24rpx; height: 24rpx; margin-right: 5rpx; } /* 搜索结果样式 */ .search-results { position: fixed; top: 260rpx; left: 0; right: 0; bottom: 0; background-color: #fff; z-index: 100; padding: 20rpx; overflow-y: auto; } .result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20rpx; padding-bottom: 20rpx; border-bottom: 1rpx solid #eee; } .result-count { font-size: 28rpx; color: #333; } .close-results { font-size: 26rpx; color: #999; } .result-list { padding-bottom: 20rpx; } .result-item { display: flex; align-items: center; padding: 20rpx 0; border-bottom: 1rpx solid #eee; } .result-image { width: 120rpx; height: 120rpx; border-radius: 12rpx; margin-right: 20rpx; } .result-content { flex: 1; } .result-title { font-size: 28rpx; font-weight: bold; color: #333; margin-bottom: 8rpx; } .result-subtitle { font-size: 24rpx; color: #666; margin-bottom: 10rpx; } .result-price { font-size: 30rpx; font-weight: bold; color: #ff4d4f; } /* 语音搜索对话框样式 */ .voice-dialog { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; } .dialog-mask { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); } .dialog-content { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); width: 600rpx; background-color: #fff; border-radius: 24rpx; padding: 40rpx; text-align: center; } .dialog-title { font-size: 32rpx; font-weight: bold; color: #333; margin-bottom: 40rpx; } .voice-icon-container { width: 180rpx; height: 180rpx; background-color: #e6f4ff; border-radius: 90rpx; display: flex; align-items: center; justify-content: center; margin: 0 auto 40rpx; } .voice-mic { width: 80rpx; height: 80rpx; } .dialog-text { font-size: 30rpx; color: #666; margin-bottom: 60rpx; } .dialog-buttons { display: flex; justify-content: space-between; align-items: center; } .cancel-btn { width: 250rpx; height: 80rpx; background-color: #f0f0f0; color: #666; text-align: center; line-height: 80rpx; border-radius: 40rpx; font-size: 30rpx; } .confirm-btn { width: 250rpx; height: 80rpx; background-color: #1677ff; color: #fff; text-align: center; line-height: 80rpx; border-radius: 40rpx; font-size: 30rpx; }