| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
- <title>亲子月度挑战</title>
- <link href="./css/all.min.css" rel="stylesheet">
- <style>
- * {
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- font-family: 'Varela Round', 'Segoe UI', 'Microsoft YaHei', sans-serif;
- -webkit-tap-highlight-color: transparent;
- user-select: none;
- }
- html, body {
- width: 100%;
- height: 100%;
- overflow: hidden;
- background: transparent;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- /* 容器:卡片主体 */
- .card-container {
- width: 96%;
- height: 96%;
- border-radius: 30px;
- overflow: hidden;
- position: relative;
- cursor: pointer;
- border: none;
- box-shadow: 0 4px 8px rgba(0,0,0,0.25);
- }
- /* 背景图层 (动画加速) */
- .card-container::before {
- content: '';
- position: absolute;
- top: 0; left: 0; width: 100%; height: 100%;
-
- background: url('./bgkt.jpg') center/cover no-repeat;
-
- z-index: 0;
-
- /* 修改:将时间从 25s 改为 12s,速度翻倍 */
- animation: bgPan 6s ease-in-out infinite alternate;
- }
- /* 背景移动动画 */
- @keyframes bgPan {
- 0% {
- /* 向左移动 */
- transform: scale(1.15) translate3d(-3%, 0, 0);
- }
- 100% {
- /* 向右移动 */
- transform: scale(1.15) translate3d(3%, 0, 0);
- }
- }
- /* 遮罩层 */
- .card-container::after {
- content: '';
- position: absolute;
- top: 0; left: 0; width: 100%; height: 100%;
- background: linear-gradient(to bottom,
- rgba(255,255,255,0) 0%,
- rgba(255,255,255,0) 50%,
- rgba(255,255,255,0.4) 100%);
- z-index: 1;
- pointer-events: none;
- }
- .card-container:active {
- transform: scale(0.97);
- transition: transform 0.1s;
- }
- .content-layer {
- position: absolute;
- top: 0; left: 0; width: 100%; height: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- z-index: 3;
- }
- /* 年份标签 */
- .year-tag {
- margin-top: 15%;
- font-size: 6vmin;
- font-weight: 800;
- color: #fff;
- background: #FF9F43;
- padding: 1vmin 4vmin;
- border-radius: 50px;
- box-shadow: 0 4px 0 #F368E0;
- text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
- transform: rotate(-2deg);
- }
- /* 月份数字 */
- .month-num {
- font-size: 35vmin;
- font-weight: 900;
- line-height: 1;
- margin-top: 2%;
- background: linear-gradient(180deg, #FF6B6B 0%, #FF9F43 100%);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- filter: drop-shadow(0 4px 0px rgba(255,255,255,1)) drop-shadow(0 5px 15px rgba(0,0,0,0.2));
- }
- /* 奖杯图标 */
- .trophy-icon {
- margin-top: 5%;
- width: 18vmin;
- height: 18vmin;
- background: #fff;
- border-radius: 50%;
- border: 4px solid #FFD93D;
- box-shadow: 0 5px 15px rgba(255, 217, 61, 0.5);
- display: flex; justify-content: center; align-items: center;
- animation: bounce 2s infinite ease-in-out;
- }
- .trophy-icon i {
- font-size: 9vmin;
- color: #FFD93D;
- -webkit-text-stroke: 2px #F39C12;
- filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.1));
- }
- @keyframes bounce {
- 0%, 100% { transform: translateY(0) scale(1); }
- 50% { transform: translateY(-10px) scale(1.1); }
- }
- /* 底部文字按钮 */
- .action-text {
- margin-top: 20px;
- color: #576574;
- font-weight: 800;
- font-size: 4.5vmin;
- letter-spacing: 1px;
- background: rgba(255, 255, 255, 0.85);
- padding: 8px 20px;
- border-radius: 30px;
- box-shadow: 0 4px 10px rgba(0,0,0,0.1);
- backdrop-filter: blur(2px);
- }
- /* 装饰:漂浮的云朵 */
- .cloud {
- position: absolute;
- background: #fff;
- border-radius: 50%;
- z-index: 2;
- opacity: 0.95;
- box-shadow: 0 8px 5px rgba(0,0,0,0.05);
- }
-
- .c1 {
- width: 80px; height: 80px; top: 10%; left: 5%;
- box-shadow: 30px 10px 0 #fff, -25px 15px 0 #fff;
- animation: floatCloudBig 6s infinite ease-in-out alternate;
- }
-
- .c2 {
- width: 60px; height: 60px; top: 20%; right: 10%;
- box-shadow: 20px 8px 0 #fff, -15px 10px 0 #fff;
- animation: floatCloudSmall 5s infinite ease-in-out alternate-reverse;
- }
- @keyframes floatCloudBig {
- from { transform: translate(0, 0) scale(1); }
- to { transform: translate(50px, 15px) scale(1.1); }
- }
- @keyframes floatCloudSmall {
- from { transform: translate(0, 0); }
- to { transform: translate(-40px, 20px); }
- }
- </style>
- </head>
- <body>
- <div class="card-container" onclick="redirectToDetail()">
- <div class="cloud c1"></div>
- <div class="cloud c2"></div>
- <div class="content-layer">
- <div class="year-tag">2025 · 定向亲子月</div>
- <div class="month-num">12</div>
- <div class="trophy-icon">
- <i class="fa-solid fa-star"></i>
- </div>
- <div class="action-text">点击开启冒险</div>
- </div>
- </div>
- <script src="./bridge.js"></script>
- <script src="./js/target_logic.js"></script>
- <script>
- const Logger = {
- _isDev: false,
- init: function(isDev) { this._isDev = isDev; },
- log: function() { if (this._isDev) console.log.apply(console, arguments); },
- warn: function() { if (this._isDev) console.warn.apply(console, arguments); },
- error: function() { console.error.apply(console, arguments); }
- };
- function getQueryParam(name) {
- const params = new URLSearchParams(window.location.search);
- return params.get(name);
- }
- const env = (getQueryParam('env') || '').toLowerCase();
- Logger.init(env === 'mock');
- function redirectToDetail() {
- const token = getQueryParam('token');
- const id = getQueryParam('id');
- let detailUrl = getTargetDetail();
- const queryParams = [];
- if (token) queryParams.push(`token=${encodeURIComponent(token)}`);
- if (id) queryParams.push(`id=${encodeURIComponent(id)}`);
- if (queryParams.length > 0) detailUrl += `?${queryParams.join('&')}`;
- detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
- Logger.log("Navigating to:", detailUrl);
- if (window.Bridge && window.Bridge.appAction) {
- Bridge.appAction(detailUrl);
- } else {
- window.location.href = detailUrl;
- }
- }
- </script>
- </body>
- </html>
|