feat: 完成UI全面优化升级
主要改进: - 添加首页背景图片 Figure.jpg - 实现结果页面全屏滑动预览功能 - 统一Loading和Error页面设计风格 - 添加半透明遮罩层提升视觉效果 - 优化按钮样式和交互动画 - 完善错误处理和用户体验 技术细节: - 使用Swiper组件实现左右滑动图片浏览 - 添加毛玻璃效果和渐变色设计 - 实现响应式布局和动画效果 - 统一配色方案和视觉层级
This commit is contained in:
@@ -1,10 +1,135 @@
|
||||
.index {
|
||||
font-size: 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
min-width: 100vw;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-image: url('../../assets/images/Figure.jpg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
position: absolute;
|
||||
bottom: 20vh;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* Loading 遮罩层 */
|
||||
.loading-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40rpx;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
/* Loading 容器样式 */
|
||||
.loading-container {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.loading-title {
|
||||
font-size: 48px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
margin: 30px 0 15px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.loading-desc {
|
||||
font-size: 28px;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
margin: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Error 遮罩层 */
|
||||
.error-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
/* Error 容器样式 */
|
||||
.error-container {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.error-icon {
|
||||
font-size: 80px;
|
||||
margin-bottom: 30px;
|
||||
display: block;
|
||||
animation: pulse 2s infinite;
|
||||
}
|
||||
|
||||
.error-title {
|
||||
font-size: 48px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
margin: 30px 0 15px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.error-desc {
|
||||
font-size: 32px;
|
||||
color: #fff;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
margin: 0 0 30px 0;
|
||||
display: block;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.error-hint {
|
||||
font-size: 24px;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
margin: 0;
|
||||
display: block;
|
||||
animation: blink 2s infinite;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0%, 50% {
|
||||
opacity: 0.6;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% {
|
||||
transform: scale(1);
|
||||
opacity: 0.8;
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 通用步骤容器 */
|
||||
@@ -56,13 +181,15 @@
|
||||
|
||||
/* 加载动画 */
|
||||
.loading-spinner {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border: 6rpx solid #f3f3f3;
|
||||
border-top: 6rpx solid #667eea;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border: 6px solid rgba(255, 255, 255, 0.2);
|
||||
border-top: 6px solid #ff6b9d;
|
||||
border-right: 6px solid #ff9a56;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
margin: 0 auto 40rpx;
|
||||
margin: 0 auto 30px;
|
||||
box-shadow: 0 0 30px rgba(255, 107, 157, 0.3);
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
@@ -70,20 +197,94 @@
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* 结果网格 */
|
||||
.result-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 20rpx;
|
||||
margin-bottom: 60rpx;
|
||||
/* 全屏预览容器 */
|
||||
.fullscreen-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: #000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.result-image {
|
||||
/* 全屏头部 */
|
||||
.fullscreen-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 40rpx;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
position: relative;
|
||||
z-index: 1001;
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
border-radius: 16rpx;
|
||||
object-fit: cover;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.fullscreen-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
color: white;
|
||||
border: none;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
line-height: 1;
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.close-btn:active {
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
/* 全屏滑动器 */
|
||||
.fullscreen-swiper {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.fullscreen-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
/* 全屏底部 */
|
||||
.fullscreen-footer {
|
||||
padding: 40rpx;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
/* 重新生成按钮 */
|
||||
@@ -129,4 +330,78 @@
|
||||
|
||||
.retry-btn:active {
|
||||
transform: translateY(2rpx);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.create-button {
|
||||
background: linear-gradient(135deg, #ff6b9d, #ff9a56, #ffd93d);
|
||||
border: none;
|
||||
border-radius: 72px;
|
||||
padding: 24px 108px;
|
||||
font-size: 36px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4),
|
||||
0 4px 15px rgba(255, 154, 86, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.3);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
cursor: pointer;
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.create-button::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
transparent,
|
||||
rgba(255, 255, 255, 0.4),
|
||||
transparent
|
||||
);
|
||||
transition: left 0.5s;
|
||||
}
|
||||
|
||||
.create-button:hover {
|
||||
transform: scale(1.05) translateY(-2px);
|
||||
box-shadow: 0 12px 35px rgba(255, 107, 157, 0.5),
|
||||
0 6px 20px rgba(255, 154, 86, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.4);
|
||||
filter: brightness(1.1);
|
||||
}
|
||||
|
||||
.create-button:hover::before {
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
.create-button:active {
|
||||
transform: scale(0.98) translateY(1px);
|
||||
box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3),
|
||||
0 2px 8px rgba(255, 154, 86, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.create-button::after {
|
||||
content: "✨";
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
font-size: 16px;
|
||||
animation: sparkle 2s infinite;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* 添加闪烁动画 */
|
||||
@keyframes sparkle {
|
||||
0%,
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user