You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

428 lines
12 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=375, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>青核 Youthome - 正在打开</title>
<link rel="stylesheet" href="../colors_and_type.css">
<script src="https://cdn.tailwindcss.com"></script>
<style>
:root {
--youth-primary: #26C2BB;
--youth-primary-light: #54CAC5;
--primary-bg: #E6F7F6;
--bg-page: #F7F8FA;
--text-title: #1F1F1F;
--text-muted: #8C8C8C;
--spinner-track: rgba(38, 194, 187, 0.15);
/* =====================================================
* Traework 设计系统 - 组件规范
* 圆角 / 间距 / 阴影 / 高度
* ===================================================== */
--radius-xs: 4px;
--radius-sm: 8px; /* 按钮、输入框 */
--radius-md: 12px; /* 卡片 */
--radius-lg: 16px; /* 标签、弹窗 */
--radius-xl: 20px;
--radius-full: 9999px;
/* 组件高度 */
--height-btn: 44px;
--height-input: 44px;
--height-nav-bottom: 64px;
/* 间距(4px 基础栅格) */
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--space-page-x: 16px;
--space-card: 16px;
/* 柔和弥散阴影 */
--shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
--shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.06);
--shadow-btn: 0 2px 8px rgba(38, 194, 187, 0.25);
--shadow-btn-hover: 0 4px 16px rgba(38, 194, 187, 0.35);
--shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.12);
--shadow-float: 0 4px 24px rgba(0, 0, 0, 0.08);
/* 内阴影浮雕(输入框) */
--shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.04);
--shadow-inset-focus: inset 0 1px 3px rgba(38, 194, 187, 0.08);
/* 毛玻璃 */
--glass-bg: rgba(255, 255, 255, 0.72);
--glass-blur: blur(20px);
--glass-border: rgba(255, 255, 255, 0.3);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro Display', 'Helvetica Neue', sans-serif;
background: var(--youth-bg-page);
color: var(--youth-text-primary);
min-height: 100vh;
overflow: hidden;
overflow-x: hidden;}
.loading-container {
width: 375px;
height: 812px;
margin: 0 auto;
background: var(--youth-bg-page);
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: background-color 0.3s ease;
}
/* 加载动画圆环 */
.spinner-wrap {
position: relative;
width: 72px;
height: 72px;
margin-bottom: 24px;
}
.spinner-ring {
position: absolute;
inset: 0;
border-radius: 50%;
border: 3px solid var(--spinner-track);
}
.spinner-progress {
position: absolute;
inset: 0;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: var(--youth-primary);
border-right-color: var(--youth-primary);
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* 中心Logo */
.spinner-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 44px;
height: 44px;
border-radius: 12px;
background: linear-gradient(135deg, var(--youth-primary-light) 0%, var(--youth-primary) 100%);
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
font-size: 18px;
font-weight: 700;
box-shadow: 0 4px 12px rgba(38, 194, 187, 0.25);
}
.spinner-center::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
border-radius: 12px 12px 0 0;
pointer-events: none;
}
/* 文案 */
.loading-text {
font-size: 16px;
font-weight: 600;
color: var(--youth-text-primary);
margin-bottom: 6px;
letter-spacing: 0.3px;
}
.loading-sub {
font-size: 13px;
color: var(--youth-text-tertiary);
font-weight: 400;
}
/* 底部波纹装饰 */
.ripple-bg {
position: absolute;
bottom: -120px;
left: 50%;
transform: translateX(-50%);
width: 500px;
height: 500px;
border-radius: 50%;
background: radial-gradient(circle, var(--youth-primary-bg) 0%, transparent 60%);
opacity: 0.6;
pointer-events: none;
}
/* 状态切换 */
.state-loading { display: flex; }
.state-success { display: none; }
.state-error { display: none; }
.loading-container.success .state-loading { display: none; }
.loading-container.success .state-success { display: flex; }
.loading-container.error .state-loading { display: none; }
.loading-container.error .state-error { display: flex; }
/* 成功状态 */
.success-icon {
width: 72px;
height: 72px;
border-radius: 50%;
background: var(--youth-primary-bg);
display: flex;
align-items: center;
justify-content: center;
color: var(--youth-primary);
margin-bottom: 20px;
animation: scaleIn 0.4s ease;
}
@keyframes scaleIn {
from {
transform: scale(0.5);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}
}
.success-icon svg {
animation: checkmark 0.4s ease 0.2s both;
}
@keyframes checkmark {
from {
stroke-dashoffset: 100;
}
to {
stroke-dashoffset: 0;
}
}
/* 错误状态 */
.error-icon {
width: 72px;
height: 72px;
border-radius: 50%;
background: #FFE8E8;
display: flex;
align-items: center;
justify-content: center;
color: var(--youth-danger-500);
margin-bottom: 20px;
}
.error-text {
font-size: 16px;
font-weight: 600;
color: var(--youth-text-primary);
margin-bottom: 6px;
}
.error-sub {
font-size: 13px;
color: var(--youth-text-tertiary);
margin-bottom: 20px;
text-align: center;
line-height: 1.5;
}
.retry-btn {
height: 40px;
padding: 0 24px;
border: none;
border-radius: 8px;
background: linear-gradient(135deg, var(--youth-primary-light) 0%, var(--youth-primary) 100%);
color: #FFFFFF;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 2px 8px rgba(38, 194, 187, 0.2);
position: relative;
overflow: hidden;
}
.retry-btn::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
pointer-events: none;
}
.retry-btn:active {
transform: scale(0.96);
}
/* 状态控制条(演示用) */
.state-control {
position: absolute;
top: 56px;
right: 16px;
display: flex;
align-items: center;
gap: 6px;
z-index: 10;
}
.state-btn {
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--youth-bg-page);
border: 1px solid var(--youth-primary-bg);
display: flex;
align-items: center;
justify-content: center;
color: var(--youth-primary);
cursor: pointer;
transition: all 0.2s ease;
}
.state-btn:active {
transform: scale(0.92);
}
/* SVG 图标统一尺寸 */
.icon-svg {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1em;
height: 1em;
vertical-align: middle;
line-height: 1;
}
.icon-svg svg {
width: 100%;
height: 100%;
stroke: currentColor;
}
/* 侧栏图标 */
.sidebar-icon .icon-svg { width: 22px; height: 22px; font-size: 22px; }
/* 社团logo图标 */
.club-logo .icon-svg { width: 28px; height: 28px; font-size: 28px; color: #fff; }
/* 头图大图标 */
.hero-icon .icon-svg { width: 56px; height: 56px; font-size: 56px; opacity: 0.3; }
/* meta 小图标 */
.club-meta .icon-svg { width: 12px; height: 12px; font-size: 12px; }
/* 分类选择网格图标 */
.cat-option .icon-svg { width: 26px; height: 26px; font-size: 26px; }
/* logo预览图标 */
.logo-preview .icon-svg { width: 40px; height: 40px; font-size: 40px; color: #fff; }
/* 提示图标 */
.notice-icon .icon-svg { width: 18px; height: 18px; font-size: 18px; }
</style>
</head>
<body>
<div class="loading-container" data-dom-id="loading-container" id="loading-container">
<!-- 背景装饰 -->
<div class="ripple-bg"></div>
<!-- 控制按钮(演示用) -->
<!-- 加载中状态 -->
<div class="state-loading" style="flex-direction: column; align-items: center;">
<div class="spinner-wrap" data-dom-id="spinner">
<div class="spinner-ring"></div>
<div class="spinner-progress"></div>
<div class="spinner-center">青</div>
</div>
<div class="loading-text">正在打开内容…</div>
<div class="loading-sub">请稍候,即将为您呈现</div>
</div>
<!-- 成功状态 -->
<div class="state-success" style="flex-direction: column; align-items: center;">
<div class="success-icon" data-dom-id="success-icon">
<svg width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 6 9 17 4 12"></polyline>
</svg>
</div>
<div class="loading-text">打开成功</div>
<div class="loading-sub">正在跳转…</div>
</div>
<!-- 错误状态 -->
<div class="state-error" style="flex-direction: column; align-items: center;">
<div class="error-icon" data-dom-id="error-icon">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<line x1="15" y1="9" x2="9" y2="15"></line>
<line x1="9" y1="9" x2="15" y2="15"></line>
</svg>
</div>
<div class="error-text">打开失败</div>
<div class="error-sub">网络连接异常或链接已失效<br>请检查网络后重试</div>
<button class="retry-btn" data-dom-id="btn-retry" onclick="retry()">重新加载</button>
</div>
</div>
<script>// 主题切换
icon.innerHTML = '<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>';
}
}
// 状态切换(演示用)
function setState(state) {
const container = document.getElementById('loading-container');
container.classList.remove('success', 'error');
if (state === 'success') {
container.classList.add('success');
} else if (state === 'error') {
container.classList.add('error');
}
}
// 重试
function retry() {
setState('loading');
// 模拟加载
setTimeout(function() {
setState('success');
// 成功后跳转
setTimeout(function() {
// window.location.href = 'target-page.html';
}, 1000);
}, 1500);
}</script>
</body>
</html>