yurong/unpackage/dist/dev/mp-weixin/pages/detail/detail.wxss

1037 lines
17 KiB
Plaintext

.detail-container {
width: 100%;
height: 100vh;
background-color: #f8f8f8;
position: relative;
}
/* 渐现动画 */
.animate-fade-in {
-webkit-animation: fadeIn 0.4s ease-out forwards;
animation: fadeIn 0.4s ease-out forwards;
}
@-webkit-keyframes fadeIn {
from { opacity: 0; -webkit-transform: translateY(10rpx); transform: translateY(10rpx);
}
to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0);
}
}
@keyframes fadeIn {
from { opacity: 0; -webkit-transform: translateY(10rpx); transform: translateY(10rpx);
}
to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0);
}
}
/* 骨架屏样式 */
.skeleton-wrap {
padding-bottom: 200rpx;
}
.sk-swiper {
width: 100%;
height: 750rpx;
background-color: #eee;
}
.sk-info {
background-color: #fff;
padding: 30rpx;
}
.sk-price {
width: 260rpx;
height: 60rpx;
border-radius: 8rpx;
margin-bottom: 30rpx;
}
.sk-title {
width: 100%;
height: 40rpx;
border-radius: 6rpx;
margin-bottom: 20rpx;
}
.sk-title.sk-short {
width: 60%;
}
.sk-tags {
display: flex;
margin-top: 30rpx;
}
.sk-tag {
width: 120rpx;
height: 32rpx;
margin-right: 20rpx;
border-radius: 4rpx;
}
.sk-coupon {
margin: 20rpx 30rpx;
height: 180rpx;
border-radius: 20rpx;
}
.sk-shop {
margin: 20rpx 30rpx;
height: 160rpx;
border-radius: 20rpx;
}
.sk-detail {
margin-top: 20rpx;
height: 800rpx;
background-color: #fff;
}
.sk-animate {
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);
background-size: 400% 100%;
-webkit-animation: sk-loading 1.4s ease infinite;
animation: sk-loading 1.4s ease infinite;
}
@-webkit-keyframes sk-loading {
0% { background-position: 100% 50%;
}
100% { background-position: 0 50%;
}
}
@keyframes sk-loading {
0% { background-position: 100% 50%;
}
100% { background-position: 0 50%;
}
}
/* 返回按钮 */
/* 顶部渐变导航栏 */
.fixed-header {
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: #ffffff;
z-index: 150;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
}
.status-bar {
width: 100%;
}
.header-content {
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header-title {
font-size: 32rpx;
color: #333;
font-weight: bold;
}
.back-btn {
position: fixed;
left: 30rpx;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
z-index: 200;
transition: all 0.2s;
}
.back-icon-box {
width: 20rpx;
height: 20rpx;
border-left: 4rpx solid;
border-bottom: 4rpx solid;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
margin-left: 8rpx;
transition: all 0.2s;
}
/* 详情控制条 */
.detail-control-bar {
margin-top: 20rpx;
background-color: #ffffff;
padding: 24rpx 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-radius: 20rpx 20rpx 0 0;
}
.control-left {
display: flex;
align-items: center;
}
.red-line {
width: 6rpx;
height: 28rpx;
background-color: #ff416c;
border-radius: 3rpx;
margin-right: 16rpx;
}
.control-title {
font-size: 30rpx;
color: #333;
font-weight: bold;
margin-right: 20rpx;
}
.profit-tag {
font-size: 24rpx;
color: #ff416c;
background-color: rgba(255, 65, 108, 0.1);
padding: 4rpx 12rpx;
border-radius: 8rpx;
}
.control-right {
display: flex;
align-items: center;
}
.expand-text {
font-size: 26rpx;
color: #999;
margin-right: 8rpx;
}
.expand-arrow {
width: 12rpx;
height: 12rpx;
border-right: 2rpx solid #999;
border-bottom: 2rpx solid #999;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
}
.expand-arrow.up {
-webkit-transform: rotate(-135deg);
transform: rotate(-135deg);
margin-top: 6rpx;
}
/* 图文详情 */
.detail-images {
background-color: #ffffff;
position: relative;
overflow: hidden;
transition: max-height 0.5s ease;
}
.detail-images.collapsed {
max-height: 1200rpx;
}
.detail-title {
display: none; /* 已被控制条取代 */
}
.detail-img {
width: 100%;
display: block;
}
.expand-mask {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 300rpx;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
padding-bottom: 40rpx;
z-index: 10;
}
.mask-text {
font-size: 28rpx;
color: #ff416c;
font-weight: bold;
}
.mask-arrow {
width: 16rpx;
height: 16rpx;
border-right: 4rpx solid #ff416c;
border-bottom: 4rpx solid #ff416c;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
margin-top: 10rpx;
}
/* 同类推荐推荐 (g-shop-list 1:1 风格) */
.more-like {
margin-top: 20rpx;
background-color: #ffffff;
padding-bottom: 40rpx;
}
.top.g-df-c {
display: flex;
justify-content: center;
padding: 30rpx 0;
}
.recommend-title-img {
width: 320rpx;
}
.list-container {
display: flex;
flex-wrap: wrap;
padding: 0 20rpx;
justify-content: space-between;
}
.g-shop-list {
width: 345rpx;
background-color: #fff;
border-radius: 16rpx;
overflow: hidden;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
}
.shop-img image {
width: 345rpx;
height: 345rpx;
}
.shop-box {
padding: 16rpx;
}
.shop-title {
font-size: 26rpx;
color: #333;
line-height: 1.4;
height: 72rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.platform-icon {
width: 28rpx;
height: 28rpx;
vertical-align: middle;
margin-right: 8rpx;
margin-top: -4rpx;
}
.shop-tag {
display: flex;
flex-wrap: wrap;
margin-top: 12rpx;
height: 36rpx;
overflow: hidden;
}
.shop-tag text {
font-size: 20rpx;
color: #ff416c;
background-color: rgba(255, 65, 108, 0.08);
padding: 2rpx 10rpx;
border-radius: 4rpx;
margin-right: 10rpx;
}
.flex-left {
display: flex;
align-items: center;
margin-top: 16rpx;
}
.discount-price {
font-size: 24rpx;
color: #ff416c;
font-weight: bold;
}
.price-num {
font-size: 36rpx;
}
.g-coupon-label {
display: flex;
align-items: center;
margin-left: 12rpx;
border: 1rpx solid #ff416c;
border-radius: 4rpx;
overflow: hidden;
height: 30rpx;
}
.g-coupon-label .g-df-c {
background-color: #ff416c;
color: #fff;
font-size: 20rpx;
padding: 0 6rpx;
height: 100%;
display: flex;
align-items: center;
}
.g-coupon-label text {
color: #ff416c;
font-size: 20rpx;
padding: 0 8rpx;
}
.coupon-row {
align-items: baseline;
margin-top: 4rpx;
}
.coupon-row .coupon-tip {
font-size: 22rpx;
color: #ff8a00;
}
.coupon-row .coupon-val {
font-size: 26rpx;
color: #ff8a00;
font-weight: bold;
}
.sales-volume {
font-size: 22rpx;
color: #999;
}
.end-tips {
text-align: center;
font-size: 24rpx;
color: #999;
padding: 40rpx 0;
}
.custom-copyright {
text-align: center;
font-size: 22rpx;
color: #969799;
padding-bottom: 20rpx;
}
.scroll-content {
height: 100%;
}
/* 轮播图 */
.swiper-box {
width: 100%;
height: 750rpx;
position: relative;
}
.main-swiper {
width: 100%;
height: 100%;
}
.swiper-img {
width: 100%;
height: 100%;
}
.swiper-indicator {
position: absolute;
right: 30rpx;
bottom: 30rpx;
background-color: rgba(0, 0, 0, 0.5);
color: #ffffff;
padding: 4rpx 20rpx;
border-radius: 20rpx;
font-size: 24rpx;
}
/* 活动横幅 (1:1 还原) */
.activity-banner {
position: relative;
width: 100%;
overflow: hidden;
}
.banner-img {
width: 100%;
display: block;
}
.banner-time {
position: absolute;
right: 30rpx;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
font-size: 22rpx;
color: rgba(255, 255, 255, 0.9);
font-weight: bold;
letter-spacing: 1rpx;
}
/* 热销榜 */
.hot-sale-bar {
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(to right, #fff1eb, #fbe9e7);
padding: 20rpx 30rpx;
}
.hot-left {
display: flex;
align-items: center;
}
.hot-text {
font-size: 26rpx;
color: #d84315;
margin-left: 10rpx;
font-weight: bold;
}
.hot-divider {
color: #e0e0e0;
font-size: 20rpx;
margin: 0 10rpx;
}
.hot-right {
font-size: 24rpx;
color: #bf360c;
opacity: 0.8;
}
/* 信息区 (1:1 还原) */
.info-section {
background-color: #ffffff;
padding: 30rpx;
margin-bottom: 20rpx;
}
.price-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
}
.price-left {
display: flex;
align-items: baseline;
}
.price-label {
font-size: 26rpx;
color: #ff416c;
font-weight: bold;
}
.price-val {
font-size: 52rpx;
color: #ff416c;
font-weight: bold;
margin: 0 8rpx;
}
.price-old {
font-size: 24rpx;
color: #bbb;
text-decoration: line-through;
}
.price-right {
font-size: 26rpx;
color: #333;
}
.sales-red {
color: #ff416c;
font-weight: bold;
}
.title-row {
margin-bottom: 24rpx;
}
.title-content {
display: flex;
align-items: flex-start;
}
.title-platform-icon {
width: 32rpx;
height: 32rpx;
margin-right: 12rpx;
margin-top: 6rpx;
flex-shrink: 0;
}
.title-text {
font-size: 30rpx;
color: #333;
font-weight: bold;
line-height: 44rpx;
}
.tags-row {
display: flex;
flex-wrap: wrap;
}
.tag-capsule {
font-size: 22rpx;
color: #ff416c;
background-color: #fff0f3;
padding: 6rpx 20rpx;
border-radius: 30rpx;
margin-right: 16rpx;
margin-bottom: 10rpx;
}
.estimate-tip {
font-size: 22rpx;
color: #ff8a00;
background-color: #fff8f0;
padding: 8rpx 16rpx;
border-radius: 8rpx;
margin-top: 16rpx;
}
/* 优惠券 */
.coupon-section {
padding: 0 30rpx;
margin-bottom: 20rpx;
}
.coupon-card {
height: 160rpx;
background: linear-gradient(to right, #ff715a, #ff416c);
border-radius: 16rpx;
display: flex;
position: relative;
overflow: hidden;
}
.coupon-left {
flex: 1;
padding: 30rpx;
display: flex;
flex-direction: column;
justify-content: center;
color: #ffffff;
}
.coupon-amount {
margin-bottom: 10rpx;
}
.amount-val {
font-size: 40rpx;
font-weight: bold;
}
.amount-unit {
font-size: 24rpx;
margin-left: 10rpx;
}
.coupon-time {
font-size: 20rpx;
opacity: 0.9;
}
.coupon-right {
width: 200rpx;
display: flex;
align-items: center;
justify-content: center;
border-left: 2rpx dashed rgba(255, 255, 255, 0.4);
}
.get-btn {
background-color: #ffffff;
color: #ff416c;
font-size: 26rpx;
padding: 10rpx 24rpx;
border-radius: 30rpx;
font-weight: bold;
}
.coupon-circle {
position: absolute;
width: 24rpx;
height: 24rpx;
background-color: #f8f8f8;
border-radius: 50%;
left: auto;
right: 188rpx;
}
.coupon-circle.top {
top: -12rpx;
}
.coupon-circle.bottom {
bottom: -12rpx;
}
/* 品牌与店铺卡片 (1:1 还原) */
.brand-shop-card {
background-color: #ffffff;
margin: 20rpx;
padding: 30rpx;
border-radius: 16rpx;
}
.brand-row, .shop-row {
display: flex;
align-items: flex-start;
}
.brand-row {
margin-bottom: 30rpx;
}
.row-label {
font-size: 26rpx;
color: #999;
width: 80rpx;
flex-shrink: 0;
margin-top: 4rpx;
}
.brand-content {
display: flex;
align-items: center;
}
.brand-logo-img {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.brand-name-text {
font-size: 28rpx;
color: #333;
font-weight: bold;
}
.shop-main-content {
flex: 1;
}
.shop-name-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12rpx;
}
.shop-title-box {
display: flex;
align-items: center;
}
.tag-tmall-mini {
background-color: #ff0036;
color: #ffffff;
font-size: 18rpx;
width: 28rpx;
height: 28rpx;
line-height: 28rpx;
text-align: center;
border-radius: 4rpx;
margin-right: 12rpx;
}
.tag-taobao-mini {
background-color: #ff5000;
color: #ffffff;
font-size: 18rpx;
width: 28rpx;
height: 28rpx;
line-height: 28rpx;
text-align: center;
border-radius: 4rpx;
margin-right: 12rpx;
}
.shop-name-text {
font-size: 28rpx;
color: #333;
font-weight: bold;
}
.row-arrow {
font-size: 24rpx;
color: #ccc;
}
.score-detail-row {
display: flex;
}
.score-item {
font-size: 24rpx;
color: #999;
margin-right: 30rpx;
}
.val-red {
color: #ff416c;
margin: 0 4rpx;
}
.up-red {
color: #ff416c;
font-size: 20rpx;
}
/* 粉丝福利购 (1:1 还原) */
.benefit-card {
background-color: #ffffff;
margin: 20rpx;
padding: 30rpx;
border-radius: 16rpx;
}
.benefit-header {
margin-bottom: 24rpx;
}
.benefit-title-box {
display: flex;
align-items: center;
}
.benefit-icon {
width: 36rpx;
height: 36rpx;
margin-right: 16rpx;
flex-shrink: 0;
}
.benefit-title {
font-size: 28rpx;
color: #333;
font-weight: bold;
}
.benefit-content {
background-color: #f7f7f7;
padding: 24rpx;
border-radius: 12rpx;
}
.benefit-text {
font-size: 26rpx;
color: #666;
line-height: 40rpx;
display: block;
}
/* 详情控制条 */
.detail-control-bar {
margin-top: 20rpx;
background-color: #ffffff;
padding: 24rpx 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-radius: 20rpx 20rpx 0 0;
}
.control-left {
display: flex;
align-items: center;
}
.red-line {
width: 6rpx;
height: 28rpx;
background-color: #ff416c;
border-radius: 3rpx;
margin-right: 16rpx;
}
.control-title {
font-size: 30rpx;
color: #333;
font-weight: bold;
margin-right: 20rpx;
}
.profit-tag {
font-size: 24rpx;
color: #ff416c;
background-color: rgba(255, 65, 108, 0.1);
padding: 4rpx 12rpx;
border-radius: 8rpx;
}
.control-right {
display: flex;
align-items: center;
}
.expand-text {
font-size: 26rpx;
color: #999;
margin-right: 8rpx;
}
.expand-arrow {
width: 12rpx;
height: 12rpx;
border-right: 2rpx solid #999;
border-bottom: 2rpx solid #999;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
}
.expand-arrow.up {
-webkit-transform: rotate(-135deg);
transform: rotate(-135deg);
margin-top: 6rpx;
}
/* 图文详情 */
.detail-images {
background-color: #ffffff;
position: relative;
overflow: hidden;
transition: max-height 0.5s ease;
}
.detail-images.collapsed {
max-height: 0;
}
.detail-img {
width: 100%;
display: block;
}
.expand-mask {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 300rpx;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
padding-bottom: 40rpx;
z-index: 10;
}
.mask-text {
font-size: 28rpx;
color: #ff416c;
font-weight: bold;
}
.mask-arrow {
width: 16rpx;
height: 16rpx;
border-right: 4rpx solid #ff416c;
border-bottom: 4rpx solid #ff416c;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
margin-top: 10rpx;
}
/* 同类推荐推荐 (g-shop-list 1:1 风格) */
.more-like {
margin-top: 20rpx;
background-color: #f8f8f8;
padding-bottom: 40rpx;
}
.top.g-df-c {
display: flex;
justify-content: center;
padding: 30rpx 0;
}
.recommend-title-img {
width: 320rpx;
}
.list-container {
display: flex;
flex-wrap: wrap;
padding: 0 20rpx;
justify-content: space-between;
}
.g-shop-list {
width: 345rpx;
background-color: #fff;
border-radius: 16rpx;
overflow: hidden;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
}
.shop-img image {
width: 345rpx;
height: 345rpx;
}
.shop-box {
padding: 16rpx;
}
.shop-title {
font-size: 26rpx;
color: #333;
line-height: 1.4;
height: 72rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.platform-icon {
width: 28rpx;
height: 28rpx;
vertical-align: middle;
margin-right: 8rpx;
margin-top: -4rpx;
}
.shop-tag {
display: flex;
flex-wrap: wrap;
margin-top: 12rpx;
height: 36rpx;
overflow: hidden;
}
.shop-tag text {
font-size: 20rpx;
color: #ff416c;
background-color: rgba(255, 65, 108, 0.08);
padding: 2rpx 10rpx;
border-radius: 4rpx;
margin-right: 10rpx;
}
.flex-left {
display: flex;
align-items: center;
margin-top: 16rpx;
}
.discount-price {
font-size: 24rpx;
color: #ff416c;
font-weight: bold;
}
.price-num {
font-size: 36rpx;
}
.g-coupon-label {
display: flex;
align-items: center;
margin-left: 12rpx;
border: 1rpx solid #ff416c;
border-radius: 4rpx;
overflow: hidden;
height: 30rpx;
}
.g-coupon-label .g-df-c {
background-color: #ff416c;
color: #fff;
font-size: 20rpx;
padding: 0 6rpx;
height: 100%;
display: flex;
align-items: center;
}
.g-coupon-label text {
color: #ff416c;
font-size: 20rpx;
padding: 0 8rpx;
}
.sales-volume {
font-size: 22rpx;
color: #999;
}
.end-tips {
text-align: center;
font-size: 24rpx;
color: #999;
padding: 40rpx 0;
}
.custom-copyright {
text-align: center;
font-size: 22rpx;
color: #969799;
padding-bottom: 20rpx;
}
.footer-placeholder {
height: 120rpx;
}
/* 底部栏 */
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 100rpx;
background-color: #ffffff;
display: flex;
padding: 10rpx 30rpx calc(10rpx + env(safe-area-inset-bottom));
align-items: center;
border-top: 1rpx solid #eeeeee;
z-index: 100;
}
.bar-left {
display: flex;
margin-right: 20rpx;
}
.bar-btn {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 40rpx;
}
.bar-icon {
font-size: 36rpx;
margin-bottom: 4rpx;
}
.bar-text {
font-size: 20rpx;
color: #666;
}
.bar-right {
flex: 1;
display: flex;
height: 80rpx;
border-radius: 40rpx;
overflow: hidden;
}
.copy-btn {
flex: 1;
/* background-color: #ffbcba; */
background: linear-gradient(to right, #ff715a, #ff416c);
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
font-weight: bold;
}
.buy-btn {
flex: 1;
background: linear-gradient(to right, #ff715a, #ff416c);
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
font-weight: bold;
}