194 lines
3.4 KiB
Plaintext
194 lines
3.4 KiB
Plaintext
.home-page {
|
|
min-height: 100vh;
|
|
background: #f7f8fa;
|
|
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
|
|
box-sizing: border-box;
|
|
|
|
// ===== 顶部搜索 =====
|
|
.home-search {
|
|
background: linear-gradient(135deg, #ee0a24, #ff4d4f);
|
|
padding: 16rpx 24rpx;
|
|
}
|
|
|
|
// ===== 轮播图 =====
|
|
.home-banner {
|
|
margin: 20rpx 24rpx 0;
|
|
border-radius: 20rpx;
|
|
overflow: hidden;
|
|
|
|
&__swiper {
|
|
border-radius: 20rpx;
|
|
}
|
|
|
|
&__image {
|
|
width: 100%;
|
|
height: 320rpx;
|
|
}
|
|
|
|
&__placeholder {
|
|
width: 100%;
|
|
height: 320rpx;
|
|
background: linear-gradient(135deg, #ff9a9e, #ff4d4f);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
&__placeholder-text {
|
|
color: #fff;
|
|
font-size: 40rpx;
|
|
font-weight: 600;
|
|
letter-spacing: 8rpx;
|
|
}
|
|
}
|
|
|
|
// ===== 导航菜单 =====
|
|
.home-menu {
|
|
margin: 20rpx 24rpx 0;
|
|
background: #fff;
|
|
border-radius: 20rpx;
|
|
padding: 20rpx 0 8rpx;
|
|
}
|
|
|
|
.menu-icon {
|
|
width: 84rpx;
|
|
height: 84rpx;
|
|
border-radius: 24rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
&__text {
|
|
color: #fff;
|
|
font-size: 36rpx;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
|
|
// ===== 推荐商品 =====
|
|
.home-recommend {
|
|
margin: 20rpx 24rpx 0;
|
|
|
|
&__header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8rpx 8rpx 20rpx;
|
|
}
|
|
|
|
&__title {
|
|
font-size: 32rpx;
|
|
font-weight: 600;
|
|
}
|
|
|
|
&__more {
|
|
font-size: 24rpx;
|
|
color: #969799;
|
|
}
|
|
|
|
&__empty {
|
|
background: #fff;
|
|
border-radius: 20rpx;
|
|
padding: 80rpx 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
&__empty-text {
|
|
font-size: 26rpx;
|
|
color: #969799;
|
|
}
|
|
|
|
&__login-btn {
|
|
margin-top: 24rpx;
|
|
padding: 14rpx 60rpx;
|
|
background: #ee0a24;
|
|
color: #fff;
|
|
font-size: 28rpx;
|
|
border-radius: 999rpx;
|
|
}
|
|
}
|
|
|
|
// ===== 商品卡片(两列网格) =====
|
|
.product-grid {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.product-card {
|
|
width: 342rpx;
|
|
background: #fff;
|
|
border-radius: 20rpx;
|
|
overflow: hidden;
|
|
margin-bottom: 16rpx;
|
|
|
|
&__image {
|
|
width: 100%;
|
|
height: 300rpx;
|
|
background: #f2f3f5;
|
|
display: block;
|
|
}
|
|
|
|
&__info {
|
|
padding: 16rpx 20rpx 20rpx;
|
|
}
|
|
|
|
&__name {
|
|
font-size: 28rpx;
|
|
color: #323233;
|
|
font-weight: 500;
|
|
display: block;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
&__spec {
|
|
margin-top: 8rpx;
|
|
font-size: 22rpx;
|
|
color: #969799;
|
|
display: block;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
&__bottom {
|
|
margin-top: 16rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
&__price {
|
|
font-size: 30rpx;
|
|
color: #ee0a24;
|
|
font-weight: 600;
|
|
|
|
&--none {
|
|
color: #c8c9cc;
|
|
font-weight: 400;
|
|
font-size: 24rpx;
|
|
}
|
|
}
|
|
|
|
&__add {
|
|
width: 52rpx;
|
|
height: 52rpx;
|
|
border-radius: 50%;
|
|
background: #ee0a24;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
&__add-icon {
|
|
color: #fff;
|
|
font-size: 30rpx;
|
|
line-height: 1;
|
|
}
|
|
}
|
|
}
|