/**index.wxss**/ page { overflow-x: hidden; overflow-y: scroll; display: flex; flex-direction: column; } .header { height: 330rpx; position: relative; } .header .header-bg { z-index: 1; position: absolute; top: 0; left: 0; width: 100vw; height: 295rpx; background: #dfefec; } .header .logo { width: 150rpx; height: 150rpx; z-index: 99; } .header .logo.logo-at-left { position: absolute; top: 96rpx; left: 36rpx; } .header .logo-image { width: 100%; height: 100%; } .header .search-icon { position: absolute; z-index: 99; top: 260rpx; left: 30rpx; height: 65rpx; width: 530rpx; } .header .cart-icon { position: absolute; z-index: 99; top: 260rpx; right: 30rpx; height: 65rpx; width: 146rpx; } .banner { display: flex; justify-content: center; align-items: center; padding: 24rpx 0 10rpx; } .banner .banner-item { border: 1px solid #dfefec; width: 690rpx; height: 310rpx; display: block; border-radius: 25rpx; } .hot-bar { padding: 14rpx 30rpx 10rpx; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center; } .hot-bar .hot-image { width: 220rpx; height: 300rpx; } .brand-bar { padding: 14rpx 30rpx 10rpx; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; } .brand-bar .brand-item { width: 120rpx; height: 120rpx; margin-bottom: 20rpx; } .brand-bar .brand-item .brand-image { width: 100%; height: 100%; } .slider { display: flex; justify-content: center; align-items: center; padding: 24rpx 0 10rpx; } .slider .slider-item { border: 1px solid #dfefec; width: 690rpx; height: 220rpx; display: block; border-radius: 25rpx; } .category { height: 300rpx; margin: 14rpx 30rpx 10rpx 30rpx; border: 1px solid #dfefec; border-radius: 25rpx; padding: 20rpx; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; } .category .category-item { width: 144rpx; height: 144rpx; margin-bottom: 20rpx; } .category .category-item .category-image { width: 100%; height: 100%; } .goods { display: flex; flex-direction: column; padding: 21rpx 21rpx 0 21rpx; } .goods-row { display: flex; flex-direction: row; justify-content: space-evenly; margin-bottom: 21rpx; } .goods-item { width: 326rpx; /* 313*1.0417 */ background: #fff; border-radius: 21rpx; /* 20*1.0417 */ box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.05); overflow: hidden; display: flex; flex-direction: column; } .goods-image { width: 326rpx; height: 326rpx; margin: 0; border-top-left-radius: 21rpx; border-top-right-radius: 21rpx; border-bottom-left-radius: 0; border-bottom-right-radius: 0; overflow: hidden; background: #f7f7f7; } .goods-image-inner { width: 100%; height: 100%; object-fit: cover; } .goods-info { padding: 16rpx 21rpx 0 21rpx; } .goods-name { font-size: 18rpx; color: #333; display: block; margin-bottom: 8rpx; font-weight: bold; } .goods-price { font-size: 20rpx; color: #e4393c; font-weight: bold; } .goods-action { display: flex; align-items: center; justify-content: flex-end; padding: 16rpx 21rpx 21rpx 21rpx; } .favorite { width: 32rpx; height: 32rpx; } .favorite-icon { width: 100%; height: 100%; } .add-to-cart, .buy-now { width: 105rpx; height: 36rpx; line-height: 36rpx; font-size: 16rpx; border-radius: 6rpx; margin-left: 8rpx; padding: 0; border: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box; } .add-to-cart { background: #fff; color: #7AC7B5; border: 2rpx solid #7AC7B5; } .buy-now { background: #7AC7B5; color: #fff; border: none; }