feat: improve the gamepasspurchasePopup page style

This commit is contained in:
tsui110 2026-01-03 22:21:24 +08:00
parent 676035c5d0
commit 2c77f124c1

View File

@ -211,76 +211,150 @@ function handleClose() {
.popup-mask { .popup-mask {
position: fixed; position: fixed;
top: 0; left: 0; right: 0; bottom: 0; top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.65);
backdrop-filter: blur(10rpx);
z-index: 999; z-index: 999;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
} }
.popup-content { .popup-content {
width: 100%; width: 100%;
background: #FFFFFF; background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFF 100%);
border-radius: 32rpx 32rpx 0 0; border-radius: 40rpx 40rpx 0 0;
box-shadow: 0 -8rpx 40rpx rgba(0, 0, 0, 0.12);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
max-height: 80vh; max-height: 82vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
from {
transform: translateY(100%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
} }
.popup-header { .popup-header {
padding: 32rpx; padding: 40rpx 32rpx 24rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: flex-start;
border-bottom: 1rpx solid #F3F4F6; border-bottom: 2rpx solid #F0F2F5;
background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFF 100%);
position: relative;
&::after {
content: '';
position: absolute;
bottom: -8rpx;
left: 50%;
transform: translateX(-50%);
width: 80rpx;
height: 6rpx;
background: #E5E7EB;
border-radius: 3rpx;
}
.title { .title {
font-size: 36rpx; font-size: 38rpx;
font-weight: bold; font-weight: 800;
color: #1F2937; background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
letter-spacing: 0.5rpx;
} }
.title-sub { .title-sub {
font-size: 34rpx; font-size: 22rpx;
font-weight: normal; font-weight: 400;
color: #9CA3AF;
margin-left: 8rpx;
-webkit-text-fill-color: #9CA3AF;
} }
.close-btn { .close-btn {
font-size: 48rpx; font-size: 52rpx;
color: #9CA3AF; color: #CBD5E1;
line-height: 0.8; line-height: 0.8;
padding: 10rpx; padding: 8rpx;
font-weight: 200;
transition: all 0.2s ease;
&:active {
color: #667EEA;
transform: rotate(90deg);
}
} }
} }
.packages-list { .packages-list {
padding: 32rpx; padding: 32rpx 24rpx;
max-height: 60vh; max-height: 62vh;
} }
.loading-state, .empty-state { .loading-state, .empty-state {
text-align: center; text-align: center;
padding: 60rpx 0; padding: 80rpx 0;
color: #9CA3AF; color: #9CA3AF;
font-size: 28rpx; font-size: 28rpx;
font-weight: 500;
&::before {
content: '📦';
display: block;
font-size: 88rpx;
margin-bottom: 16rpx;
opacity: 0.4;
}
} }
.package-item { .package-item {
position: relative; position: relative;
background: linear-gradient(135deg, #FFFFFF, #F9FAFB); background: linear-gradient(145deg, #FFFFFF 0%, #F8F9FF 100%);
border: 2rpx solid #E5E7EB; border: 2rpx solid #E8EEFF;
border-radius: 24rpx; border-radius: 28rpx;
padding: 24rpx 32rpx; padding: 28rpx 24rpx;
margin-bottom: 24rpx; margin-bottom: 20rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
transition: all 0.2s; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
overflow: hidden; overflow: hidden;
box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.08);
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 6rpx;
background: linear-gradient(90deg, #667EEA 0%, #764BA2 100%);
opacity: 0;
transition: opacity 0.3s;
}
&:active { &:active {
transform: scale(0.98); transform: scale(0.97);
background: #F3F4F6; box-shadow: 0 2rpx 12rpx rgba(102, 126, 234, 0.12);
}
&:active::before {
opacity: 1;
} }
} }
@ -288,75 +362,119 @@ function handleClose() {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
background: #FF6B00; background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
color: #FFF; color: #FFF;
font-size: 20rpx; font-size: 20rpx;
padding: 4rpx 12rpx; padding: 6rpx 16rpx;
border-bottom-right-radius: 12rpx; border-bottom-right-radius: 16rpx;
font-weight: bold; font-weight: 700;
letter-spacing: 0.5rpx;
box-shadow: 0 4rpx 12rpx rgba(255, 107, 107, 0.3);
z-index: 1;
} }
.pkg-left { .pkg-left {
flex: 1; flex: 1;
padding-right: 16rpx;
} }
.pkg-name { .pkg-name {
font-size: 32rpx; font-size: 34rpx;
font-weight: bold; font-weight: 700;
color: #1F2937; color: #1F2937;
margin-bottom: 8rpx; margin-bottom: 10rpx;
letter-spacing: 0.3rpx;
} }
.pkg-count { .pkg-count {
font-size: 26rpx; font-size: 26rpx;
color: #4B5563; color: #6B7280;
margin-bottom: 4rpx; margin-bottom: 6rpx;
font-weight: 500;
display: flex;
align-items: center;
&::before {
content: '🎮';
font-size: 22rpx;
margin-right: 6rpx;
}
} }
.pkg-validity { .pkg-validity {
font-size: 22rpx; font-size: 22rpx;
color: #9CA3AF; color: #9CA3AF;
font-weight: 400;
display: flex;
align-items: center;
&::before {
content: '⏰';
font-size: 18rpx;
margin-right: 4rpx;
}
} }
.pkg-right { .pkg-right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-end; align-items: flex-end;
min-width: 200rpx;
} }
.pkg-price-row { .pkg-price-row {
color: #FF6B00; color: #FF6B6B;
font-weight: bold; font-weight: 800;
margin-bottom: 4rpx; margin-bottom: 6rpx;
display: flex;
align-items: baseline;
letter-spacing: -0.5rpx;
.currency { .currency {
font-size: 24rpx; font-size: 26rpx;
font-weight: 700;
margin-right: 2rpx;
} }
.price { .price {
font-size: 40rpx; font-size: 44rpx;
text-shadow: 0 2rpx 8rpx rgba(255, 107, 107, 0.15);
} }
} }
.pkg-original-price { .pkg-original-price {
font-size: 22rpx; font-size: 22rpx;
color: #9CA3AF; color: #CBD5E1;
text-decoration: line-through; text-decoration: line-through;
margin-bottom: 12rpx; margin-bottom: 10rpx;
font-weight: 500;
} }
.btn-buy { .btn-buy {
background: linear-gradient(90deg, #FF6B00, #FF9F43); background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
color: #FFF; color: #FFF;
font-size: 24rpx; font-size: 26rpx;
padding: 0 20rpx; padding: 0 28rpx;
height: 52rpx; height: 60rpx;
line-height: 52rpx; line-height: 60rpx;
border-radius: 26rpx; border-radius: 30rpx;
border: none; border: none;
font-weight: 600; font-weight: 700;
box-shadow: 0 6rpx 20rpx rgba(102, 126, 234, 0.35);
transition: all 0.3s ease;
letter-spacing: 0.5rpx;
&[loading] { &[loading] {
opacity: 0.8; opacity: 0.8;
transform: scale(0.95);
}
&:active {
transform: scale(0.92);
box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.4);
}
&::after {
border: none;
} }
} }
@ -370,32 +488,46 @@ function handleClose() {
.stepper { .stepper {
display: flex; display: flex;
align-items: center; align-items: center;
background: #F3F4F6; background: linear-gradient(145deg, #F1F3F9 0%, #E8EEFF 100%);
border-radius: 12rpx; border: 2rpx solid #E0E7FF;
padding: 2rpx; border-radius: 16rpx;
padding: 4rpx;
box-shadow: inset 0 2rpx 6rpx rgba(102, 126, 234, 0.06);
.step-btn { .step-btn {
width: 44rpx; width: 48rpx;
height: 44rpx; height: 48rpx;
line-height: 40rpx; line-height: 44rpx;
text-align: center; text-align: center;
font-size: 32rpx; font-size: 32rpx;
color: #4B5563; color: #667EEA;
font-weight: 300; font-weight: 600;
flex-shrink: 0; flex-shrink: 0;
transition: all 0.2s ease;
border-radius: 12rpx;
&:active {
background: rgba(102, 126, 234, 0.1);
transform: scale(0.9);
}
} }
.minus { .minus {
color: #9CA3AF; color: #9CA3AF;
&:active {
color: #667EEA;
background: rgba(102, 126, 234, 0.1);
}
} }
.step-input { .step-input {
width: 60rpx; width: 64rpx;
height: 44rpx; height: 48rpx;
line-height: 44rpx; line-height: 48rpx;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 28rpx;
font-weight: bold; font-weight: 700;
color: #1F2937; color: #1F2937;
background: transparent; background: transparent;
border: none; border: none;
@ -403,7 +535,7 @@ function handleClose() {
margin: 0; margin: 0;
&::placeholder { &::placeholder {
color: #9CA3AF; color: #CBD5E1;
} }
} }
} }