feat: 添加广告激励下载功能

- 优化useAd Hook支持奖励和关闭回调
- 在预览页面添加看广告下载按钮
- 实现下载图片到本地相册功能
- 添加完整的中文注释和业务逻辑处理
This commit is contained in:
imeepos
2025-09-01 16:15:56 +08:00
parent 82e01276be
commit e7c1743bd5
3 changed files with 187 additions and 4 deletions

View File

@@ -404,4 +404,74 @@
50% {
opacity: 1;
}
}
/* 下载区域样式 */
.download-section {
position: absolute;
bottom: 60rpx;
left: 50%;
transform: translateX(-50%);
width: 100%;
padding: 0 40rpx;
box-sizing: border-box;
z-index: 1001;
text-align: center;
}
/* 下载按钮样式 */
.download-btn {
background: linear-gradient(135deg, #ff6b9d, #ff9a56);
border: none;
border-radius: 50rpx;
padding: 20rpx 40rpx;
font-size: 28rpx;
font-weight: bold;
color: #fff;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
box-shadow: 0 8rpx 25rpx rgba(255, 107, 157, 0.4);
min-width: 320rpx;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.download-btn::before {
content: "";
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(255, 255, 255, 0.3),
transparent
);
transition: left 0.5s;
}
.download-btn:hover::before {
left: 100%;
}
.download-btn:active {
transform: translateY(2rpx);
box-shadow: 0 4rpx 15rpx rgba(255, 107, 157, 0.3);
}
.download-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
/* 下载提示文字 */
.download-tip {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.8);
margin-top: 20rpx;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
line-height: 1.4;
display: block;
}