index3.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  6. <title>亲子月度挑战</title>
  7. <link href="./css/all.min.css" rel="stylesheet">
  8. <style>
  9. * {
  10. box-sizing: border-box;
  11. margin: 0;
  12. padding: 0;
  13. font-family: 'Varela Round', 'Segoe UI', 'Microsoft YaHei', sans-serif;
  14. -webkit-tap-highlight-color: transparent;
  15. user-select: none;
  16. }
  17. html, body {
  18. width: 100%;
  19. height: 100%;
  20. overflow: hidden;
  21. background: transparent;
  22. display: flex;
  23. justify-content: center;
  24. align-items: center;
  25. }
  26. /* 容器:卡片主体 */
  27. .card-container {
  28. width: 96%;
  29. height: 96%;
  30. border-radius: 30px;
  31. overflow: hidden;
  32. position: relative;
  33. cursor: pointer;
  34. border: none;
  35. box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  36. }
  37. /* 背景图层 (动画加速) */
  38. .card-container::before {
  39. content: '';
  40. position: absolute;
  41. top: 0; left: 0; width: 100%; height: 100%;
  42. background: url('./bgkt.jpg') center/cover no-repeat;
  43. z-index: 0;
  44. /* 修改:将时间从 25s 改为 12s,速度翻倍 */
  45. animation: bgPan 6s ease-in-out infinite alternate;
  46. }
  47. /* 背景移动动画 */
  48. @keyframes bgPan {
  49. 0% {
  50. /* 向左移动 */
  51. transform: scale(1.15) translate3d(-3%, 0, 0);
  52. }
  53. 100% {
  54. /* 向右移动 */
  55. transform: scale(1.15) translate3d(3%, 0, 0);
  56. }
  57. }
  58. /* 遮罩层 */
  59. .card-container::after {
  60. content: '';
  61. position: absolute;
  62. top: 0; left: 0; width: 100%; height: 100%;
  63. background: linear-gradient(to bottom,
  64. rgba(255,255,255,0) 0%,
  65. rgba(255,255,255,0) 50%,
  66. rgba(255,255,255,0.4) 100%);
  67. z-index: 1;
  68. pointer-events: none;
  69. }
  70. .card-container:active {
  71. transform: scale(0.97);
  72. transition: transform 0.1s;
  73. }
  74. .content-layer {
  75. position: absolute;
  76. top: 0; left: 0; width: 100%; height: 100%;
  77. display: flex;
  78. flex-direction: column;
  79. align-items: center;
  80. z-index: 3;
  81. }
  82. /* 年份标签 */
  83. .year-tag {
  84. margin-top: 15%;
  85. font-size: 6vmin;
  86. font-weight: 800;
  87. color: #fff;
  88. background: #FF9F43;
  89. padding: 1vmin 4vmin;
  90. border-radius: 50px;
  91. box-shadow: 0 4px 0 #F368E0;
  92. text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
  93. transform: rotate(-2deg);
  94. }
  95. /* 月份数字 */
  96. .month-num {
  97. font-size: 35vmin;
  98. font-weight: 900;
  99. line-height: 1;
  100. margin-top: 2%;
  101. background: linear-gradient(180deg, #FF6B6B 0%, #FF9F43 100%);
  102. -webkit-background-clip: text;
  103. -webkit-text-fill-color: transparent;
  104. filter: drop-shadow(0 4px 0px rgba(255,255,255,1)) drop-shadow(0 5px 15px rgba(0,0,0,0.2));
  105. }
  106. /* 奖杯图标 */
  107. .trophy-icon {
  108. margin-top: 5%;
  109. width: 18vmin;
  110. height: 18vmin;
  111. background: #fff;
  112. border-radius: 50%;
  113. border: 4px solid #FFD93D;
  114. box-shadow: 0 5px 15px rgba(255, 217, 61, 0.5);
  115. display: flex; justify-content: center; align-items: center;
  116. animation: bounce 2s infinite ease-in-out;
  117. }
  118. .trophy-icon i {
  119. font-size: 9vmin;
  120. color: #FFD93D;
  121. -webkit-text-stroke: 2px #F39C12;
  122. filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.1));
  123. }
  124. @keyframes bounce {
  125. 0%, 100% { transform: translateY(0) scale(1); }
  126. 50% { transform: translateY(-10px) scale(1.1); }
  127. }
  128. /* 底部文字按钮 */
  129. .action-text {
  130. margin-top: 20px;
  131. color: #576574;
  132. font-weight: 800;
  133. font-size: 4.5vmin;
  134. letter-spacing: 1px;
  135. background: rgba(255, 255, 255, 0.85);
  136. padding: 8px 20px;
  137. border-radius: 30px;
  138. box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  139. backdrop-filter: blur(2px);
  140. }
  141. /* 装饰:漂浮的云朵 */
  142. .cloud {
  143. position: absolute;
  144. background: #fff;
  145. border-radius: 50%;
  146. z-index: 2;
  147. opacity: 0.95;
  148. box-shadow: 0 8px 5px rgba(0,0,0,0.05);
  149. }
  150. .c1 {
  151. width: 80px; height: 80px; top: 10%; left: 5%;
  152. box-shadow: 30px 10px 0 #fff, -25px 15px 0 #fff;
  153. animation: floatCloudBig 6s infinite ease-in-out alternate;
  154. }
  155. .c2 {
  156. width: 60px; height: 60px; top: 20%; right: 10%;
  157. box-shadow: 20px 8px 0 #fff, -15px 10px 0 #fff;
  158. animation: floatCloudSmall 5s infinite ease-in-out alternate-reverse;
  159. }
  160. @keyframes floatCloudBig {
  161. from { transform: translate(0, 0) scale(1); }
  162. to { transform: translate(50px, 15px) scale(1.1); }
  163. }
  164. @keyframes floatCloudSmall {
  165. from { transform: translate(0, 0); }
  166. to { transform: translate(-40px, 20px); }
  167. }
  168. </style>
  169. </head>
  170. <body>
  171. <div class="card-container" onclick="redirectToDetail()">
  172. <div class="cloud c1"></div>
  173. <div class="cloud c2"></div>
  174. <div class="content-layer">
  175. <div class="year-tag">2025 · 定向亲子月</div>
  176. <div class="month-num">12</div>
  177. <div class="trophy-icon">
  178. <i class="fa-solid fa-star"></i>
  179. </div>
  180. <div class="action-text">点击开启冒险</div>
  181. </div>
  182. </div>
  183. <script src="./bridge.js"></script>
  184. <script src="./js/target_logic.js"></script>
  185. <script>
  186. const Logger = {
  187. _isDev: false,
  188. init: function(isDev) { this._isDev = isDev; },
  189. log: function() { if (this._isDev) console.log.apply(console, arguments); },
  190. warn: function() { if (this._isDev) console.warn.apply(console, arguments); },
  191. error: function() { console.error.apply(console, arguments); }
  192. };
  193. function getQueryParam(name) {
  194. const params = new URLSearchParams(window.location.search);
  195. return params.get(name);
  196. }
  197. const env = (getQueryParam('env') || '').toLowerCase();
  198. Logger.init(env === 'mock');
  199. function redirectToDetail() {
  200. const token = getQueryParam('token');
  201. const id = getQueryParam('id');
  202. let detailUrl = getTargetDetail();
  203. const queryParams = [];
  204. if (token) queryParams.push(`token=${encodeURIComponent(token)}`);
  205. if (id) queryParams.push(`id=${encodeURIComponent(id)}`);
  206. if (queryParams.length > 0) detailUrl += `?${queryParams.join('&')}`;
  207. detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
  208. Logger.log("Navigating to:", detailUrl);
  209. if (window.Bridge && window.Bridge.appAction) {
  210. Bridge.appAction(detailUrl);
  211. } else {
  212. window.location.href = detailUrl;
  213. }
  214. }
  215. </script>
  216. </body>
  217. </html>