|
@@ -2,257 +2,306 @@
|
|
|
<html lang="zh-CN">
|
|
<html lang="zh-CN">
|
|
|
<head>
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
<meta charset="UTF-8">
|
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
|
|
|
|
- <title>11月挑战赛 - 智能缩放版</title>
|
|
|
|
|
- <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
|
|
|
|
|
|
+ <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>
|
|
<style>
|
|
|
:root {
|
|
:root {
|
|
|
- --primary-purple: #593259;
|
|
|
|
|
- --primary-orange: #ffeaa7;
|
|
|
|
|
|
|
+ --ice-blue: #A5F2F3;
|
|
|
|
|
+ --ice-deep: #006FBB;
|
|
|
|
|
+ --ice-white: #FFFFFF;
|
|
|
|
|
+ --glass-border: 1px solid rgba(255, 255, 255, 0.4);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
* {
|
|
* {
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
margin: 0;
|
|
margin: 0;
|
|
|
padding: 0;
|
|
padding: 0;
|
|
|
- font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
|
|
|
|
|
|
|
+ font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
user-select: none;
|
|
user-select: none;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
html, body {
|
|
html, body {
|
|
|
- margin: 0;
|
|
|
|
|
- padding: 0;
|
|
|
|
|
- width: 100vw;
|
|
|
|
|
- height: 100vh;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
- background-color: transparent !important;
|
|
|
|
|
- background: rgba(0, 0, 0, 0) !important;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- body {
|
|
|
|
|
|
|
+ background: transparent;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /* 2. 外层容器 */
|
|
|
|
|
.card-container {
|
|
.card-container {
|
|
|
- width: 96%;
|
|
|
|
|
- height: 96%;
|
|
|
|
|
- /* 圆角也需要自适应:最大24px,或者视口最小边的6% */
|
|
|
|
|
- border-radius: min(24px, 6vmin);
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
|
|
+ /* 简化背景渐变,减少计算 */
|
|
|
|
|
+ background: linear-gradient(180deg, #2980b9 0%, #2c3e50 100%);
|
|
|
|
|
+ border-radius: 20px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
-
|
|
|
|
|
- background: linear-gradient(to bottom,
|
|
|
|
|
- rgba(162, 155, 254, 0.2) 0%,
|
|
|
|
|
- rgba(45, 52, 54, 0.95) 100%),
|
|
|
|
|
- url('./bg.jpg?w=800') center/cover no-repeat;
|
|
|
|
|
-
|
|
|
|
|
- box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ border: 2px solid rgba(165, 242, 243, 0.3);
|
|
|
|
|
+ /* 移除昂贵的 box-shadow */
|
|
|
|
|
+ /* box-shadow: 0 0 30px rgba(20, 136, 204, 0.5); */
|
|
|
transform: translateZ(0);
|
|
transform: translateZ(0);
|
|
|
-webkit-mask-image: -webkit-radial-gradient(white, black);
|
|
-webkit-mask-image: -webkit-radial-gradient(white, black);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /* 3. 内层毛玻璃 */
|
|
|
|
|
- .glass-layer {
|
|
|
|
|
|
|
+ /* 替代 SVG 滤镜的简单冰霜层 */
|
|
|
|
|
+ .frost-overlay {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
- top: 4%; left: 4%; right: 4%; bottom: 4%;
|
|
|
|
|
-
|
|
|
|
|
- /* 圆角自适应 */
|
|
|
|
|
- border-radius: min(20px, 5vmin);
|
|
|
|
|
-
|
|
|
|
|
- border: 1.5px solid rgba(255, 255, 255, 0.3);
|
|
|
|
|
- border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
|
|
|
|
|
-
|
|
|
|
|
- background: linear-gradient(to bottom,
|
|
|
|
|
- rgba(255, 255, 255, 0.15) 0%,
|
|
|
|
|
- rgba(255, 255, 255, 0.02) 50%,
|
|
|
|
|
- rgba(0, 0, 0, 0.1) 100%
|
|
|
|
|
- );
|
|
|
|
|
- /* backdrop-filter: blur(6px);
|
|
|
|
|
- -webkit-backdrop-filter: blur(6px);
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ top: 0; left: 0; width: 100%; height: 100%;
|
|
|
|
|
+ /* 使用简单的径向渐变模拟光照 */
|
|
|
|
|
+ background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.1) 0%, transparent 60%);
|
|
|
|
|
+ pointer-events: none;
|
|
|
|
|
+ z-index: 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* 优化后的雪花:减少阴影,开启硬件加速 */
|
|
|
|
|
+ .snowflakes {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ width: 100%; height: 100%;
|
|
|
|
|
+ z-index: 0;
|
|
|
|
|
+ pointer-events: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ .snowflake {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ opacity: 0.6;
|
|
|
|
|
+ font-size: 20px;
|
|
|
|
|
+ will-change: transform; /* 关键优化 */
|
|
|
|
|
+ animation: fall linear infinite;
|
|
|
|
|
+ /* 移除 text-shadow 以提升性能 */
|
|
|
|
|
+ }
|
|
|
|
|
+ .s1 { top: -10%; left: 10%; font-size: 15px; animation-duration: 5s; }
|
|
|
|
|
+ .s2 { top: -20%; left: 50%; font-size: 25px; animation-duration: 8s; animation-delay: 2s; }
|
|
|
|
|
+ .s3 { top: -30%; left: 80%; font-size: 18px; animation-duration: 6s; animation-delay: 1s; }
|
|
|
|
|
+
|
|
|
|
|
+ /* 皇冠图标 */
|
|
|
|
|
+ .crown-icon {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: -35px;
|
|
|
|
|
+ left: 50%;
|
|
|
|
|
+ transform: translateX(-50%);
|
|
|
|
|
+ font-size: 30px;
|
|
|
|
|
+ color: #ffd700;
|
|
|
|
|
+ /* 使用简单的 text-shadow 替代 filter: drop-shadow */
|
|
|
|
|
+ text-shadow: 0 0 5px rgba(255,255,255,0.5);
|
|
|
|
|
+ animation: floatCrown 3s infinite ease-in-out;
|
|
|
|
|
+ will-change: transform;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* 顶部年份 */
|
|
|
|
|
+ .year-crystal {
|
|
|
|
|
+ margin-top: 15%;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ z-index: 2;
|
|
|
|
|
+ padding: 1.5vmin 6vmin;
|
|
|
|
|
+ /* 移除 backdrop-filter,使用纯半透明背景 */
|
|
|
|
|
+ background: rgba(255, 255, 255, 0.2);
|
|
|
|
|
+ border: var(--glass-border);
|
|
|
|
|
+ border-radius: 30px;
|
|
|
|
|
+ font-size: 5vmin;
|
|
|
|
|
+ color: var(--ice-white);
|
|
|
|
|
+ letter-spacing: 3px;
|
|
|
|
|
+ /* 简化 text-shadow */
|
|
|
|
|
+ text-shadow: 0 2px 4px rgba(0,0,0,0.3);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* 核心视觉 */
|
|
|
|
|
+ .magic-core {
|
|
|
|
|
+ flex: 1;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
|
|
+ justify-content: center;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- justify-content: flex-start;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
-
|
|
|
|
|
- box-shadow: inset 0 0 15px rgba(255,255,255,0.05);
|
|
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ z-index: 2;
|
|
|
|
|
+ width: 100%;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .card-container:active {
|
|
|
|
|
- transform: scale(0.98);
|
|
|
|
|
- transition: transform 0.1s;
|
|
|
|
|
|
|
+ /* 优化后的魔法圆环:使用 border 代替 box-shadow */
|
|
|
|
|
+ .ice-fractal {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ width: 60vmin; height: 60vmin;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: center;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- /* 顶部年份 */
|
|
|
|
|
- .tag-year {
|
|
|
|
|
- /* 字体大小:最大20px,缩小时占视口最小边的5.5% */
|
|
|
|
|
- font-size: min(30px, 7.5vmin);
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- letter-spacing: 1px;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- background: rgba(0, 0, 0, 0.2);
|
|
|
|
|
-
|
|
|
|
|
- /* Padding 使用 em 单位,随字体大小缩放 */
|
|
|
|
|
- padding: 0.2em 0.8em;
|
|
|
|
|
-
|
|
|
|
|
- border-radius: 16px;
|
|
|
|
|
- border: 1px solid rgba(255,255,255,0.2);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .fractal-ring {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
-
|
|
|
|
|
- /* 距离顶部的距离也自适应 */
|
|
|
|
|
- top: min(10px, 2vh);
|
|
|
|
|
- z-index: 10;
|
|
|
|
|
|
|
+ border: 1px solid rgba(165, 242, 243, 0.4);
|
|
|
|
|
+ width: 100%; height: 100%;
|
|
|
|
|
+ transform: rotate(45deg);
|
|
|
|
|
+ /* 移除 box-shadow 动画 */
|
|
|
|
|
+ animation: spinMagic 20s infinite linear;
|
|
|
|
|
+ will-change: transform;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /* 核心数字:11 */
|
|
|
|
|
- .title-month {
|
|
|
|
|
- /* 字体大小:最大80px,缩小时占视口最小边的22% */
|
|
|
|
|
- font-size: min(140px, 32vmin);
|
|
|
|
|
- font-weight: 900;
|
|
|
|
|
- line-height: 1;
|
|
|
|
|
-
|
|
|
|
|
- background: linear-gradient(to bottom, #ffffff 10%, #ffd700 50%, #ff9f43 100%);
|
|
|
|
|
- -webkit-background-clip: text;
|
|
|
|
|
- -webkit-text-fill-color: transparent;
|
|
|
|
|
-
|
|
|
|
|
- filter: drop-shadow(0 4px 0px rgba(0, 0, 0, 0.2));
|
|
|
|
|
-
|
|
|
|
|
- /* 顶部间距:最大55px,缩小时占视口高度的12% */
|
|
|
|
|
- margin-top: min(75px, 16vh);
|
|
|
|
|
- z-index: 2;
|
|
|
|
|
|
|
+ .month-num {
|
|
|
|
|
+ font-size: 40vmin;
|
|
|
|
|
+ font-weight: 100;
|
|
|
|
|
+ color: #fff; /* 纯色文字性能最好,通过透明度模拟质感 */
|
|
|
|
|
+ /* 简化渐变文字为简单的透明度渐变 */
|
|
|
|
|
+ mask-image: linear-gradient(to bottom, black 30%, rgba(0,0,0,0.5) 100%);
|
|
|
|
|
+ -webkit-mask-image: linear-gradient(to bottom, black 30%, rgba(0,0,0,0.5) 100%);
|
|
|
|
|
+ /* 移除 filter: drop-shadow */
|
|
|
|
|
+ text-shadow: 0 0 20px rgba(165, 242, 243, 0.4);
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ z-index: 3;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /* 月度挑战赛 */
|
|
|
|
|
- .title-sub {
|
|
|
|
|
- /* 字体大小:最大16px,缩小时占视口最小边的4.5% */
|
|
|
|
|
- font-size: min(20px, 6.5vmin);
|
|
|
|
|
- font-weight: 800;
|
|
|
|
|
- color: rgba(255, 255, 255, 0.95);
|
|
|
|
|
|
|
+ .month-title {
|
|
|
|
|
+ font-size: 6vmin;
|
|
|
|
|
+ color: var(--ice-blue);
|
|
|
letter-spacing: 2px;
|
|
letter-spacing: 2px;
|
|
|
text-transform: uppercase;
|
|
text-transform: uppercase;
|
|
|
- text-shadow: 0 1px 2px rgba(0,0,0,0.5);
|
|
|
|
|
-
|
|
|
|
|
- margin-top: min(5px, 1vh);
|
|
|
|
|
- margin-bottom: auto;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /* 奖杯图标 */
|
|
|
|
|
- .deco-icon {
|
|
|
|
|
- /* 底部间距:最大22px,缩小时占视口高度的4% */
|
|
|
|
|
- margin-bottom: min(22px, 8vh);
|
|
|
|
|
-
|
|
|
|
|
- /* 宽高:最大40px,缩小时占视口最小边的11% */
|
|
|
|
|
- width: min(40px, 11vmin);
|
|
|
|
|
- height: min(40px, 11vmin);
|
|
|
|
|
-
|
|
|
|
|
- border-radius: 50%;
|
|
|
|
|
- display: flex; justify-content: center; align-items: center;
|
|
|
|
|
- background: rgba(255,255,255,0.1);
|
|
|
|
|
- border: 1px solid rgba(255,255,255,0.2);
|
|
|
|
|
- box-shadow: 0 5px 15px rgba(0,0,0,0.3);
|
|
|
|
|
-
|
|
|
|
|
- animation: trophy-pulse 2s infinite ease-in-out;
|
|
|
|
|
|
|
+ margin-top: -2vmin;
|
|
|
|
|
+ text-shadow: 0 2px 4px rgba(0,0,0,0.5);
|
|
|
|
|
+ z-index: 3;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .deco-icon i {
|
|
|
|
|
- /* 图标大小:最大20px,随容器缩小 */
|
|
|
|
|
- font-size: min(20px, 5.5vmin);
|
|
|
|
|
- color: #ffd700;
|
|
|
|
|
- filter: drop-shadow(0 0 5px rgba(253, 203, 110, 0.8));
|
|
|
|
|
|
|
+ /* 水晶按钮 */
|
|
|
|
|
+ .crystal-btn-area {
|
|
|
|
|
+ margin-bottom: 15%;
|
|
|
|
|
+ z-index: 2;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /* 查看排行按钮 */
|
|
|
|
|
- .action-btn {
|
|
|
|
|
- /* 底部间距:最大20px,缩小时自适应 */
|
|
|
|
|
- margin-bottom: min(30px, 6vh);
|
|
|
|
|
-
|
|
|
|
|
- /* 宽度:最大110px,缩小时占视口宽度的30% */
|
|
|
|
|
- width: min(180px, 50vmin);
|
|
|
|
|
-
|
|
|
|
|
- padding: min(8px, 2vh) 0;
|
|
|
|
|
- border-radius: 25px;
|
|
|
|
|
- border: none;
|
|
|
|
|
-
|
|
|
|
|
- background: linear-gradient(90deg, #ffeaa7 0%, #fab1a0 100%);
|
|
|
|
|
- color: #593259;
|
|
|
|
|
-
|
|
|
|
|
- /* 字体:最大12px */
|
|
|
|
|
- font-size: min(18px, 5.5vmin);
|
|
|
|
|
- font-weight: 900;
|
|
|
|
|
-
|
|
|
|
|
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ .crystal-btn {
|
|
|
|
|
+ /* 移除 backdrop-filter */
|
|
|
|
|
+ background: rgba(255, 255, 255, 0.15);
|
|
|
|
|
+ border: 1px solid rgba(255,255,255,0.5);
|
|
|
|
|
+ border-radius: 50px;
|
|
|
|
|
+ padding: 2.5vmin 8vmin;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ font-size: 4.5vmin;
|
|
|
|
|
+ letter-spacing: 1px;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
|
|
- gap: 4px;
|
|
|
|
|
- z-index: 10;
|
|
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+ /* 简化 box-shadow */
|
|
|
|
|
+ box-shadow: 0 4px 10px rgba(0,0,0,0.2);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- .action-btn i { font-size: 0.8em; }
|
|
|
|
|
|
|
|
|
|
- @keyframes trophy-pulse {
|
|
|
|
|
- 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(253, 203, 110, 0.2); }
|
|
|
|
|
- 50% { transform: scale(1.15); box-shadow: 0 0 15px 5px rgba(253, 203, 110, 0.4); }
|
|
|
|
|
- 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(253, 203, 110, 0); }
|
|
|
|
|
|
|
+ /* 动画 */
|
|
|
|
|
+ @keyframes fall {
|
|
|
|
|
+ 0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
|
|
|
|
|
+ 20% { opacity: 0.8; }
|
|
|
|
|
+ 100% { transform: translateY(120vh) rotate(360deg); opacity: 0; }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /* 顶部反光
|
|
|
|
|
- .shine {
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- top: -20px; left: -20px;
|
|
|
|
|
- width: 150px; height: 100px;
|
|
|
|
|
- background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
|
|
|
|
|
- z-index: 3;
|
|
|
|
|
- pointer-events: none;
|
|
|
|
|
- filter: blur(20px);
|
|
|
|
|
|
|
+ @keyframes spinMagic {
|
|
|
|
|
+ 0% { transform: rotate(0deg); }
|
|
|
|
|
+ 100% { transform: rotate(360deg); }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @keyframes floatCrown {
|
|
|
|
|
+ 0%, 100% { transform: translateX(-50%) translateY(0); }
|
|
|
|
|
+ 50% { transform: translateX(-50%) translateY(-5px); }
|
|
|
}
|
|
}
|
|
|
-*/
|
|
|
|
|
|
|
+
|
|
|
</style>
|
|
</style>
|
|
|
</head>
|
|
</head>
|
|
|
<body>
|
|
<body>
|
|
|
|
|
|
|
|
- <!-- 外层容器 -->
|
|
|
|
|
<div class="card-container" onclick="redirectToDetail()">
|
|
<div class="card-container" onclick="redirectToDetail()">
|
|
|
|
|
+ <div class="frost-overlay"></div>
|
|
|
|
|
|
|
|
- <!-- 内层容器 -->
|
|
|
|
|
- <div class="glass-layer">
|
|
|
|
|
- <div class="shine"></div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="tag-year">2025 年</div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="title-month">11</div>
|
|
|
|
|
- <div class="title-sub">月度挑战赛</div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="deco-icon">
|
|
|
|
|
- <i class="fa-solid fa-trophy"></i>
|
|
|
|
|
|
|
+ <!-- 减少雪花数量 -->
|
|
|
|
|
+ <div class="snowflakes">
|
|
|
|
|
+ <div class="snowflake s1">❄</div>
|
|
|
|
|
+ <div class="snowflake s2">❅</div>
|
|
|
|
|
+ <div class="snowflake s3">❆</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 冰晶年份 + 皇冠 -->
|
|
|
|
|
+ <div class="year-crystal">
|
|
|
|
|
+ <i class="fa-solid fa-crown crown-icon"></i>
|
|
|
|
|
+ <span class="year-text">2025年</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 核心冰魔法 -->
|
|
|
|
|
+ <div class="magic-core">
|
|
|
|
|
+ <div class="ice-fractal">
|
|
|
|
|
+ <div class="fractal-ring"></div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="month-num">12</div>
|
|
|
|
|
+ <div class="month-title">月挑战赛</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <button class="action-btn" onclick="redirectToDetail()">
|
|
|
|
|
- 查看排行 <i class="fa-solid fa-arrow-right"></i>
|
|
|
|
|
- </button>
|
|
|
|
|
|
|
+ <!-- 水晶按钮 -->
|
|
|
|
|
+ <div class="crystal-btn-area">
|
|
|
|
|
+ <div class="crystal-btn">
|
|
|
|
|
+ <i class="fa-regular fa-gem"></i>
|
|
|
|
|
+ <span>查看排行榜</span>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script src="./bridge.js"></script>
|
|
<script src="./bridge.js"></script>
|
|
|
|
|
+ <script src="./js/target_logic.js"></script>
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ // Auto-Update Date
|
|
|
|
|
+ (function() {
|
|
|
|
|
+ const now = new Date();
|
|
|
|
|
+ const year = now.getFullYear();
|
|
|
|
|
+ const month = now.getMonth() + 1;
|
|
|
|
|
+
|
|
|
|
|
+ const yearEl = document.querySelector('.year-text');
|
|
|
|
|
+ const monthEl = document.querySelector('.month-num');
|
|
|
|
|
+
|
|
|
|
|
+ if (yearEl) yearEl.innerText = year + '年';
|
|
|
|
|
+ if (monthEl) monthEl.innerText = month;
|
|
|
|
|
+ })();
|
|
|
|
|
+
|
|
|
|
|
+ // Logger Utility
|
|
|
|
|
+ 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) {
|
|
function getQueryParam(name) {
|
|
|
const params = new URLSearchParams(window.location.search);
|
|
const params = new URLSearchParams(window.location.search);
|
|
|
return params.get(name);
|
|
return params.get(name);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // Initialize Logger
|
|
|
|
|
+ const env = (getQueryParam('env') || '').toLowerCase();
|
|
|
|
|
+ Logger.init(env === 'mock'); // Only log if env=mock
|
|
|
|
|
+
|
|
|
function redirectToDetail() {
|
|
function redirectToDetail() {
|
|
|
const token = getQueryParam('token');
|
|
const token = getQueryParam('token');
|
|
|
const id = getQueryParam('id');
|
|
const id = getQueryParam('id');
|
|
|
- let detailUrl = 'detail.html';
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // Use centralized logic
|
|
|
|
|
+ let detailUrl = getTargetDetail();
|
|
|
|
|
|
|
|
const queryParams = [];
|
|
const queryParams = [];
|
|
|
if (token) {
|
|
if (token) {
|
|
@@ -268,7 +317,7 @@
|
|
|
|
|
|
|
|
detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
|
|
detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
|
|
|
|
|
|
|
|
- console.log("Navigating to:", detailUrl);
|
|
|
|
|
|
|
+ Logger.log("Navigating to:", detailUrl);
|
|
|
|
|
|
|
|
if (window.Bridge && window.Bridge.appAction) {
|
|
if (window.Bridge && window.Bridge.appAction) {
|
|
|
Bridge.appAction(detailUrl);
|
|
Bridge.appAction(detailUrl);
|