Files
server/miniprogram/pages/index/index.wxss
2025-11-02 19:34:16 +08:00

428 lines
6.1 KiB
Plaintext

/* pages/index/index.wxss */
.container {
padding: 20rpx;
background: #F8F9FA;
min-height: 100vh;
}
/* 用户信息卡片 */
.user-card {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #FFFFFF;
margin-bottom: 30rpx;
}
.user-info {
padding: 40rpx 30rpx;
}
.avatar {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
border: 4rpx solid rgba(255, 255, 255, 0.3);
}
.user-details {
margin-left: 30rpx;
}
.username {
color: #FFFFFF;
margin-bottom: 10rpx;
}
.member-status {
align-items: center;
}
.member-badge {
padding: 8rpx 16rpx;
border-radius: 20rpx;
font-size: 20rpx;
font-weight: bold;
text-transform: uppercase;
}
.member-badge.free {
background: rgba(255, 255, 255, 0.2);
color: #FFFFFF;
}
.member-badge.vip {
background: linear-gradient(135deg, #FFD700, #FFA500);
color: #FFFFFF;
}
.member-badge.svip {
background: linear-gradient(135deg, #FF6B35, #F7931E);
color: #FFFFFF;
}
.expire-info {
color: rgba(255, 255, 255, 0.8);
}
.login-btn {
margin-left: 20rpx;
}
/* 会员权益卡片 */
.benefits-card {
margin-bottom: 30rpx;
}
.benefits-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 30rpx;
}
.benefit-item {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 20rpx 10rpx;
border-radius: 12rpx;
background: #F8F9FA;
transition: all 0.3s ease;
}
.benefit-item:active {
background: #E9ECEF;
transform: scale(0.95);
}
.benefit-icon {
width: 60rpx;
height: 60rpx;
margin-bottom: 12rpx;
}
.benefit-icon image {
width: 100%;
height: 100%;
}
.benefit-name {
margin-bottom: 8rpx;
color: #333333;
}
.benefit-status {
margin-top: 4rpx;
}
/* 功能菜单卡片 */
.menu-card {
margin-bottom: 30rpx;
}
.menu-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 30rpx;
}
.menu-item {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 30rpx 20rpx;
border-radius: 12rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
position: relative;
}
.menu-item:active {
background: #F8F9FA;
transform: scale(0.95);
}
.menu-icon {
width: 80rpx;
height: 80rpx;
margin-bottom: 16rpx;
}
.menu-icon image {
width: 100%;
height: 100%;
}
.menu-name {
color: #333333;
}
.menu-badge {
position: absolute;
top: 20rpx;
right: 20rpx;
background: #FF4757;
color: #FFFFFF;
padding: 4rpx 8rpx;
border-radius: 10rpx;
min-width: 32rpx;
text-align: center;
}
/* 升级提示卡片 */
.upgrade-card {
margin-bottom: 30rpx;
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
color: #FFFFFF;
}
.upgrade-content {
display: flex;
align-items: center;
padding: 30rpx;
}
.upgrade-icon {
width: 80rpx;
height: 80rpx;
margin-right: 20rpx;
}
.upgrade-icon image {
width: 100%;
height: 100%;
}
.upgrade-text {
flex: 1;
}
.upgrade-title {
color: #FFFFFF;
margin-bottom: 8rpx;
}
.upgrade-desc {
color: rgba(255, 255, 255, 0.8);
}
.upgrade-action {
margin-left: 20rpx;
}
/* 最近活动卡片 */
.activity-card {
margin-bottom: 30rpx;
}
.activity-list {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.activity-item {
display: flex;
align-items: center;
padding: 20rpx;
background: #F8F9FA;
border-radius: 12rpx;
}
.activity-icon {
width: 60rpx;
height: 60rpx;
margin-right: 20rpx;
}
.activity-icon image {
width: 100%;
height: 100%;
}
.activity-content {
flex: 1;
}
.activity-title {
color: #333333;
margin-bottom: 8rpx;
}
.activity-time {
color: #6C757D;
}
.activity-status {
margin-left: 20rpx;
}
/* 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 40rpx;
text-align: center;
}
.empty-icon {
width: 200rpx;
height: 200rpx;
margin-bottom: 30rpx;
opacity: 0.5;
}
.empty-text {
font-size: 32rpx;
color: #333333;
margin-bottom: 16rpx;
}
.empty-desc {
font-size: 28rpx;
color: #6C757D;
margin-bottom: 40rpx;
}
/* 权益详情弹窗 */
.benefit-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
background: #FFFFFF;
border-radius: 20rpx;
margin: 40rpx;
max-width: 600rpx;
width: 100%;
max-height: 80vh;
overflow: hidden;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1rpx solid #E9ECEF;
}
.modal-title {
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.modal-close {
width: 40rpx;
height: 40rpx;
padding: 8rpx;
}
.modal-close image {
width: 100%;
height: 100%;
}
.modal-body {
padding: 30rpx;
max-height: 400rpx;
overflow-y: auto;
}
.benefit-detail {
text-align: center;
}
.benefit-large-icon {
width: 120rpx;
height: 120rpx;
margin-bottom: 20rpx;
}
.benefit-description {
font-size: 28rpx;
color: #333333;
line-height: 1.6;
margin-bottom: 20rpx;
}
.benefit-usage {
padding: 16rpx 20rpx;
background: #F8F9FA;
border-radius: 8rpx;
}
.modal-footer {
display: flex;
justify-content: flex-end;
padding: 20rpx 30rpx;
border-top: 1rpx solid #E9ECEF;
}
/* 加载状态 */
.loading {
display: flex;
align-items: center;
justify-content: center;
padding: 80rpx 40rpx;
color: #6C757D;
}
.loading-spinner {
width: 40rpx;
height: 40rpx;
border: 4rpx solid #F3F3F3;
border-top: 4rpx solid #667eea;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-right: 20rpx;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 响应式适配 */
@media (max-width: 400px) {
.benefits-grid,
.menu-grid {
grid-template-columns: repeat(3, 1fr);
}
}
@media (max-width: 320px) {
.benefits-grid,
.menu-grid {
grid-template-columns: repeat(2, 1fr);
}
.user-info {
flex-direction: column;
text-align: center;
}
.user-details {
margin-left: 0;
margin-top: 20rpx;
}
.login-btn {
margin-left: 0;
margin-top: 20rpx;
}
}