基本成型

This commit is contained in:
JACKYMYPERSON
2025-09-27 17:24:52 +08:00
parent 578d49826b
commit eae49c76bd
502 changed files with 15238 additions and 708 deletions

View File

@@ -1,32 +1,31 @@
/* 引入通用样式 */
.container {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f5f7fa;
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
/* 滚动容器样式 */
.scroll-container {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding: 20rpx;
padding-bottom: 13vh;
}
/* 卡片容器使用纵向布局 */
/* 卡片容器样式 */
.cards-container {
display: flex;
margin-bottom: 150rpx;
flex-direction: column; /* 纵向排列卡片 */
gap: 15px; /* 卡片之间的间距 */
padding: 15px;
box-sizing: border-box;
flex-direction: column;
gap: 20rpx;
}
/* 投票卡片样式 */
/* 投票卡片基础样式 */
.voting-card {
width: 100%;
min-height: 400px; /* 卡片最小高度,可根据内容调整 */
background: #fff;
border-radius: 10px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding: 15px;
box-sizing: border-box;
background-color: #fff;
border-radius: 24rpx;
padding: 24rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
}
/* 卡片头部样式 */
@@ -34,169 +33,213 @@
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
margin-bottom: 20rpx;
}
.user-info {
display: flex;
align-items: center;
gap: 16rpx;
}
.avatar {
width: 80rpx;
height: 80rpx;
width: 56rpx;
height: 56rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.user-details {
display: flex;
flex-direction: column;
gap: 4rpx;
}
.username {
display: block;
font-size: 32rpx;
font-weight: 600;
color: #333333;
margin-bottom: 4rpx;
font-size: 24rpx;
font-weight: 500;
color: #333;
}
.user-status {
display: block;
font-size: 24rpx;
color: #888888;
font-size: 20rpx;
color: #666;
}
.vote-status {
background-color: rgba(79, 70, 229, 0.1);
color: #4F46E5;
font-size: 24rpx;
padding: 8rpx 16rpx;
font-size: 22rpx;
padding: 6rpx 16rpx;
border-radius: 20rpx;
background-color: #f5f5f5;
color: #666;
}
.vote-status:empty {
display: none;
}
/* 分割线样式 */
.divider {
width: 100%;
height: 2rpx;
background-color: #f5f5f5;
margin-bottom: 24rpx;
}
/* 投票标题区域 */
/* 标题区域样式 */
.vote-title-section {
padding: 0 30rpx 30rpx;
margin-bottom: 24rpx;
}
.vote-title {
display: block;
font-size: 36rpx;
font-weight: 700;
color: #333333;
margin-bottom: 16rpx;
font-size: 28rpx;
font-weight: 600;
color: #333;
line-height: 40rpx;
}
.voted-tip {
color: #51bdb6;
font-size: 24rpx;
margin-left: 10rpx;
font-weight: 500;
}
.vote-desc {
font-size: 26rpx;
color: #888888;
font-size: 22rpx;
color: #666;
margin-top: 8rpx;
line-height: 32rpx;
}
/* 选项区域样式 */
/* 选项容器样式 */
.options-container {
padding: 0 30rpx 20rpx;
display: flex;
flex-direction: column;
gap: 16rpx;
margin-bottom: 28rpx;
}
/* 选项项样式 */
.option-item {
position: relative;
padding: 24rpx;
border: 2rpx solid #f0f0f0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx;
border: 2rpx solid #eee;
border-radius: 16rpx;
margin-bottom: 20rpx;
transition: all 0.3s;
position: relative;
transition: all 0.2s;
}
/* 移除 :hover 样式,以避免颜色冲突 */
/*
.option-item:hover {
border-color: rgba(79, 70, 229, 0.3);
background-color: rgba(79, 70, 229, 0.03);
}
*/
.option-item.selected {
border-color: #4F46E5;
background-color: rgba(79, 70, 229, 0.05);
border-color: #409EFF;
background-color: rgba(64, 158, 255, 0.05);
}
.option-item.voted-option {
border-color: #51bdb6;
background-color: rgba(46, 125, 50, 0.05);
}
.option-item.disabled-option {
opacity: 0.8;
pointer-events: none;
}
/* 选项信息样式 */
.option-info {
display: flex;
align-items: center;
margin-bottom: 16rpx;
}
.option-icon {
width: 64rpx;
height: 64rpx;
border-radius: 12rpx;
display: flex;
justify-content: center;
align-items: center;
margin-right: 20rpx;
}
.bg-red {
background-color: rgba(248, 113, 113, 0.1);
color: #ef4444;
}
.bg-yellow {
background-color: rgba(251, 191, 36, 0.1);
color: #f59e0b;
}
.bg-green {
background-color: rgba(34, 197, 94, 0.1);
color: #10b981;
}
.option-details {
gap: 16rpx;
flex: 1;
}
.option-icon {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background-color: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #666;
}
.option-item.voted-option .option-icon {
background-color: rgba(46, 125, 50, 0.1);
color: #51bdb6;
}
.option-details {
display: flex;
flex-direction: column;
gap: 4rpx;
}
.option-name {
display: block;
font-size: 30rpx;
font-weight: 600;
color: #333333;
margin-bottom: 4rpx;
font-size: 24rpx;
color: #333;
font-weight: 500;
}
.your-selection {
color: #51bdb6;
font-size: 22rpx;
margin-left: 10rpx;
}
.option-desc {
font-size: 24rpx;
color: #888888;
font-size: 20rpx;
color: #999;
}
/* 选项操作按钮样式 */
.option-action-btn {
font-size: 20rpx;
color: #666;
padding: 4rpx 12rpx;
border: 2rpx solid #eee;
border-radius: 8rpx;
margin-right: 16rpx;
}
/* 选项百分比样式 */
.option-percent {
font-size: 28rpx;
font-weight: 600;
color: #333333;
font-size: 22rpx;
color: #666;
margin-right: 16rpx;
min-width: 60rpx;
text-align: right;
}
/* 进度条样式 */
.progress-bar {
height: 12rpx;
background-color: #f0f0f0;
border-radius: 6rpx;
width: 160rpx;
height: 8rpx;
background-color: #f5f5f5;
border-radius: 4rpx;
overflow: hidden;
}
.progress-value {
height: 100%;
background-color: #4F46E5;
border-radius: 6rpx;
transition: width 0.5s ease-out;
background-color: #409EFF;
transition: width 0.3s;
}
/* 选中指示器 */
.option-item.voted-option .progress-value {
background-color: #51bdb6;
}
/* 选中指示器样式 */
.vote-indicator {
position: absolute;
top: 24rpx;
right: 24rpx;
color: #4F46E5;
font-size: 36rpx;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
font-size: 32rpx;
color: #409EFF;
display: none;
}
@@ -204,116 +247,61 @@
display: block;
}
/* 投票统计信息 */
.option-item.voted-option .vote-indicator {
color: #51bdb6;
}
/* 统计信息样式 */
.vote-stats {
display: flex;
justify-content: space-between;
padding: 0 30rpx 20rpx;
font-size: 20rpx;
color: #999;
margin-bottom: 28rpx;
}
.stats-text {
font-size: 24rpx;
color: #888888;
}
/* 投票按钮 */
/* 投票按钮样式 */
.vote-btn {
width: calc(100% - 60rpx);
margin: 0 30rpx 30rpx;
padding: 24rpx 0;
background-color: #4F46E5;
color: #ffffff;
border-radius: 16rpx;
font-size: 30rpx;
font-weight: 600;
width: 100%;
height: 80rpx;
background-color: #51bdb6;
color: #fff;
border-radius: 40rpx;
font-size: 24rpx;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
transition: all 0.3s;
}
.vote-btn .iconfont {
margin-right: 12rpx;
font-size: 32rpx;
justify-content: center;
gap: 12rpx;
}
.vote-btn::after {
border: none;
}
.vote-btn:hover {
background-color: rgba(79, 70, 229, 0.9);
.vote-btn.vote-btn-disabled {
background-color: #E0E0E0 !important;
color: #9E9E9E !important;
border-color: #E0E0E0 !important;
}
.vote-btn:active {
transform: scale(0.98);
.btn-text {
font-size: 24rpx;
}
/* 成功提示 */
.success-toast {
position: fixed;
top: 50rpx;
left: 50%;
transform: translateX(-50%);
background-color: #10b981;
color: #ffffff;
padding: 16rpx 32rpx;
border-radius: 8rpx;
display: flex;
align-items: center;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
z-index: 999;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s;
/* 图标字体基础样式需确保项目已引入iconfont */
.iconfont {
font-family: "iconfont" !important;
font-size: inherit;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.success-toast.show {
opacity: 1;
pointer-events: auto;
.icon-thumbs-up:before {
content: "\e60a";
}
.success-toast .iconfont {
margin-right: 12rpx;
font-size: 32rpx;
.icon-check-circle:before {
content: "\e610";
}
.toast-text {
font-size: 28rpx;
}
/* AI 操作按钮 */
.option-action-btn {
position: absolute;
top: 8px; /* 调整距离顶部 */
right: 8px; /* 调整距离右侧 */
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background-color: #e0e0e0;
border-radius: 8px;
color: #333;
font-weight: bold;
font-size: 14px;
z-index: 10;
}
.option-action-btn .iconfont {
font-size: 18px;
}
/* 投票按钮 - 已结束状态 */
.vote-btn-ended {
background-color: #ccc; /* 灰色背景 */
color: #888; /* 灰色文字 */
cursor: not-allowed; /* 禁用光标样式 */
}
/* 禁用选项状态 */
.disabled-option {
opacity: 0.6; /* 降低透明度表示禁用 */
pointer-events: none; /* 禁止鼠标事件 */
cursor: not-allowed; /* 禁用光标样式 */
}