index3.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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: 100%;
  29. height: 100%;
  30. border-radius: 30px;
  31. overflow: hidden;
  32. position: relative;
  33. cursor: pointer;
  34. /* 背景图:本地图片 */
  35. background: url('./bgkt.jpg') center/cover no-repeat;
  36. box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  37. border: 6px solid #fff;
  38. }
  39. /* 遮罩层:大幅减弱白色渐变,让蓝天绿地更明显 */
  40. .card-container::after {
  41. content: '';
  42. position: absolute;
  43. top: 0; left: 0; width: 100%; height: 100%;
  44. /* 顶部完全透明,只在最底部加一点点淡淡的白光 */
  45. background: linear-gradient(to bottom,
  46. rgba(255,255,255,0) 0%,
  47. rgba(255,255,255,0) 50%,
  48. rgba(255,255,255,0.4) 100%);
  49. z-index: 1;
  50. pointer-events: none; /* 让点击穿透 */
  51. }
  52. .card-container:active {
  53. transform: scale(0.96) rotate(-1deg);
  54. transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  55. }
  56. .content-layer {
  57. position: absolute;
  58. top: 0; left: 0; width: 100%; height: 100%;
  59. display: flex;
  60. flex-direction: column;
  61. align-items: center;
  62. z-index: 2;
  63. }
  64. /* 年份标签 */
  65. .year-tag {
  66. margin-top: 15%;
  67. font-size: 6vmin;
  68. font-weight: 800;
  69. color: #fff;
  70. background: #FF9F43;
  71. padding: 1vmin 4vmin;
  72. border-radius: 50px;
  73. box-shadow: 0 4px 0 #F368E0;
  74. text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
  75. transform: rotate(-2deg);
  76. }
  77. /* 月份数字 */
  78. .month-num {
  79. font-size: 35vmin;
  80. font-weight: 900;
  81. line-height: 1;
  82. margin-top: 2%;
  83. /* 字体渐变 */
  84. background: linear-gradient(180deg, #FF6B6B 0%, #FF9F43 100%);
  85. -webkit-background-clip: text;
  86. -webkit-text-fill-color: transparent;
  87. /* 增强投影,确保在背景图上清晰可见 */
  88. filter: drop-shadow(0 4px 0px rgba(255,255,255,1)) drop-shadow(0 5px 15px rgba(0,0,0,0.2));
  89. }
  90. /* 奖杯图标 */
  91. .trophy-icon {
  92. margin-top: 5%;
  93. width: 18vmin;
  94. height: 18vmin;
  95. background: #fff;
  96. border-radius: 50%;
  97. border: 4px solid #FFD93D;
  98. box-shadow: 0 5px 15px rgba(255, 217, 61, 0.5);
  99. display: flex; justify-content: center; align-items: center;
  100. animation: bounce 2s infinite ease-in-out;
  101. }
  102. .trophy-icon i {
  103. font-size: 9vmin;
  104. color: #FFD93D;
  105. -webkit-text-stroke: 2px #F39C12;
  106. filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.1));
  107. }
  108. @keyframes bounce {
  109. 0%, 100% { transform: translateY(0) scale(1); }
  110. 50% { transform: translateY(-10px) scale(1.1); }
  111. }
  112. /* 底部文字按钮 */
  113. .action-text {
  114. margin-top: 20px;
  115. color: #576574;
  116. font-weight: 800;
  117. font-size: 4.5vmin;
  118. letter-spacing: 1px;
  119. /* 加个半透明白色背景,防止背景太花看不清字 */
  120. background: rgba(255, 255, 255, 0.85);
  121. padding: 8px 20px;
  122. border-radius: 30px;
  123. box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  124. backdrop-filter: blur(2px);
  125. }
  126. /* 装饰:漂浮的云朵 */
  127. .cloud {
  128. position: absolute;
  129. background: #fff;
  130. border-radius: 50%;
  131. z-index: 1;
  132. opacity: 0.95; /* 更不透明,像棉花糖 */
  133. box-shadow: 0 8px 5px rgba(0,0,0,0.05);
  134. }
  135. .c1 {
  136. width: 80px; height: 80px; top: 10%; left: 5%;
  137. box-shadow: 30px 10px 0 #fff, -25px 15px 0 #fff;
  138. animation: floatCloudBig 6s infinite ease-in-out alternate;
  139. }
  140. .c2 {
  141. width: 60px; height: 60px; top: 20%; right: 10%;
  142. box-shadow: 20px 8px 0 #fff, -15px 10px 0 #fff;
  143. animation: floatCloudSmall 5s infinite ease-in-out alternate-reverse;
  144. }
  145. @keyframes floatCloudBig {
  146. from { transform: translate(0, 0) scale(1); }
  147. to { transform: translate(50px, 15px) scale(1.1); }
  148. }
  149. @keyframes floatCloudSmall {
  150. from { transform: translate(0, 0); }
  151. to { transform: translate(-40px, 20px); }
  152. }
  153. </style>
  154. </head>
  155. <body>
  156. <div class="card-container" onclick="redirectToDetail()">
  157. <!-- 装饰背景云 -->
  158. <div class="cloud c1"></div>
  159. <div class="cloud c2"></div>
  160. <div class="content-layer">
  161. <div class="year-tag">2025 · 亲子定向赛</div>
  162. <div class="month-num">12</div>
  163. <div class="trophy-icon">
  164. <i class="fa-solid fa-star"></i>
  165. </div>
  166. <div class="action-text">点击开启冒险</div>
  167. </div>
  168. </div>
  169. <script src="./bridge.js"></script>
  170. <script>
  171. const Logger = {
  172. _isDev: false,
  173. init: function(isDev) { this._isDev = isDev; },
  174. log: function() { if (this._isDev) console.log.apply(console, arguments); },
  175. warn: function() { if (this._isDev) console.warn.apply(console, arguments); },
  176. error: function() { console.error.apply(console, arguments); }
  177. };
  178. function getQueryParam(name) {
  179. const params = new URLSearchParams(window.location.search);
  180. return params.get(name);
  181. }
  182. const env = (getQueryParam('env') || '').toLowerCase();
  183. Logger.init(env === 'mock');
  184. function getTargetDetail() {
  185. if (Math.random() < 0.3) return 'detail.html';
  186. const now = new Date();
  187. const month = now.getMonth() + 1;
  188. const date = now.getDate();
  189. if (month === 12 && date >= 18) return 'detail-christmas.html';
  190. if (month === 1 && date <= 7) return 'detail-newyear.html';
  191. if (month >= 3 && month <= 5) return 'detail-windy.html';
  192. if (month >= 6 && month <= 8) return 'detail-rain.html';
  193. if (month >= 9 && month <= 11) return 'detail-cloud.html';
  194. return Math.random() < 0.6 ? 'detail-snow.html' : 'detail-sun.html';
  195. }
  196. function redirectToDetail() {
  197. const token = getQueryParam('token');
  198. const id = getQueryParam('id');
  199. let detailUrl = getTargetDetail();
  200. const queryParams = [];
  201. if (token) queryParams.push(`token=${encodeURIComponent(token)}`);
  202. if (id) queryParams.push(`id=${encodeURIComponent(id)}`);
  203. if (queryParams.length > 0) detailUrl += `?${queryParams.join('&')}`;
  204. detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
  205. Logger.log("Navigating to:", detailUrl);
  206. if (window.Bridge && window.Bridge.appAction) {
  207. Bridge.appAction(detailUrl);
  208. } else {
  209. window.location.href = detailUrl;
  210. }
  211. }
  212. </script>
  213. </body>
  214. </html>