779 lines
24 KiB
HTML
779 lines
24 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>互动竞猜开宝箱系统</title>
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
|
||
background: #f5f7fa;
|
||
color: #333;
|
||
}
|
||
|
||
/* 导航栏 */
|
||
.navbar {
|
||
background: #fff;
|
||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||
padding: 0;
|
||
position: sticky;
|
||
top: 0;
|
||
z-index: 100;
|
||
}
|
||
|
||
.nav-container {
|
||
max-width: 1200px;
|
||
margin: 0 auto;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 16px 24px;
|
||
}
|
||
|
||
.logo {
|
||
font-size: 24px;
|
||
font-weight: bold;
|
||
color: #1890ff;
|
||
text-decoration: none;
|
||
}
|
||
|
||
.nav-links {
|
||
display: flex;
|
||
gap: 24px;
|
||
list-style: none;
|
||
}
|
||
|
||
.nav-links a {
|
||
color: #333;
|
||
text-decoration: none;
|
||
padding: 8px 16px;
|
||
border-radius: 4px;
|
||
transition: all 0.3s;
|
||
}
|
||
|
||
.nav-links a:hover,
|
||
.nav-links a.active {
|
||
background: #e6f7ff;
|
||
color: #1890ff;
|
||
}
|
||
|
||
.user-info {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 16px;
|
||
}
|
||
|
||
.balance {
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
color: #fff;
|
||
padding: 8px 16px;
|
||
border-radius: 20px;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.btn {
|
||
padding: 8px 16px;
|
||
border: none;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
font-size: 14px;
|
||
transition: all 0.3s;
|
||
text-decoration: none;
|
||
display: inline-block;
|
||
}
|
||
|
||
.btn-primary {
|
||
background: #1890ff;
|
||
color: #fff;
|
||
}
|
||
|
||
.btn-primary:hover {
|
||
background: #40a9ff;
|
||
}
|
||
|
||
.btn-secondary {
|
||
background: #f0f0f0;
|
||
color: #333;
|
||
}
|
||
|
||
.btn-secondary:hover {
|
||
background: #d9d9d9;
|
||
}
|
||
|
||
/* 主内容区 */
|
||
.container {
|
||
max-width: 1200px;
|
||
margin: 0 auto;
|
||
padding: 24px;
|
||
}
|
||
|
||
/* 公告栏 */
|
||
.announcement-bar {
|
||
background: #fff;
|
||
border-radius: 8px;
|
||
padding: 16px 24px;
|
||
margin-bottom: 24px;
|
||
border-left: 4px solid #1890ff;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 16px;
|
||
}
|
||
|
||
.announcement-icon {
|
||
font-size: 24px;
|
||
}
|
||
|
||
.announcement-content {
|
||
flex: 1;
|
||
}
|
||
|
||
.announcement-content h4 {
|
||
margin-bottom: 4px;
|
||
color: #262626;
|
||
}
|
||
|
||
.announcement-content p {
|
||
color: #8c8c8c;
|
||
font-size: 14px;
|
||
}
|
||
|
||
/* 页面切换 */
|
||
.page {
|
||
display: none;
|
||
}
|
||
|
||
.page.active {
|
||
display: block;
|
||
}
|
||
|
||
/* 首页 - 正在开奖的主播 */
|
||
.streamers-section {
|
||
background: #fff;
|
||
border-radius: 8px;
|
||
padding: 24px;
|
||
margin-bottom: 24px;
|
||
}
|
||
|
||
.section-title {
|
||
font-size: 20px;
|
||
margin-bottom: 16px;
|
||
padding-bottom: 12px;
|
||
border-bottom: 2px solid #f0f0f0;
|
||
}
|
||
|
||
.streamers-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||
gap: 16px;
|
||
}
|
||
|
||
.streamer-card {
|
||
border: 1px solid #e8e8e8;
|
||
border-radius: 8px;
|
||
padding: 16px;
|
||
transition: all 0.3s;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.streamer-card:hover {
|
||
border-color: #1890ff;
|
||
box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
|
||
}
|
||
|
||
.streamer-info {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
.streamer-avatar {
|
||
width: 48px;
|
||
height: 48px;
|
||
border-radius: 50%;
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #fff;
|
||
font-size: 20px;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.streamer-details h4 {
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.streamer-status {
|
||
font-size: 12px;
|
||
color: #52c41a;
|
||
}
|
||
|
||
.streamer-stats {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
font-size: 14px;
|
||
color: #8c8c8c;
|
||
}
|
||
|
||
/* 宝箱网格 */
|
||
.chests-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||
gap: 16px;
|
||
}
|
||
|
||
.chest-card {
|
||
background: #fff;
|
||
border-radius: 8px;
|
||
padding: 16px;
|
||
border: 1px solid #e8e8e8;
|
||
transition: all 0.3s;
|
||
}
|
||
|
||
.chest-card:hover {
|
||
border-color: #1890ff;
|
||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||
}
|
||
|
||
.chest-header {
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
.chest-title {
|
||
font-size: 16px;
|
||
font-weight: bold;
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.chest-streamer {
|
||
font-size: 14px;
|
||
color: #8c8c8c;
|
||
}
|
||
|
||
.chest-options {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 8px;
|
||
margin: 16px 0;
|
||
}
|
||
|
||
.option {
|
||
padding: 12px;
|
||
border: 2px solid #e8e8e8;
|
||
border-radius: 4px;
|
||
text-align: center;
|
||
cursor: pointer;
|
||
transition: all 0.3s;
|
||
}
|
||
|
||
.option:hover {
|
||
border-color: #1890ff;
|
||
background: #e6f7ff;
|
||
}
|
||
|
||
.option-label {
|
||
font-weight: bold;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.option-amount {
|
||
color: #52c41a;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.chest-footer {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
font-size: 14px;
|
||
color: #8c8c8c;
|
||
}
|
||
|
||
.countdown {
|
||
color: #ff4d4f;
|
||
font-weight: bold;
|
||
}
|
||
|
||
/* 我的页面 */
|
||
.profile-container {
|
||
display: grid;
|
||
grid-template-columns: 1fr 2fr;
|
||
gap: 24px;
|
||
}
|
||
|
||
.profile-card {
|
||
background: #fff;
|
||
border-radius: 8px;
|
||
padding: 24px;
|
||
}
|
||
|
||
.user-avatar-large {
|
||
width: 80px;
|
||
height: 80px;
|
||
border-radius: 50%;
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #fff;
|
||
font-size: 32px;
|
||
font-weight: bold;
|
||
margin: 0 auto 16px;
|
||
}
|
||
|
||
.user-name {
|
||
text-align: center;
|
||
font-size: 18px;
|
||
font-weight: bold;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.user-role {
|
||
text-align: center;
|
||
color: #8c8c8c;
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.balance-card {
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
color: #fff;
|
||
padding: 16px;
|
||
border-radius: 8px;
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.balance-label {
|
||
font-size: 14px;
|
||
opacity: 0.9;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.balance-value {
|
||
font-size: 32px;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.quick-actions {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 8px;
|
||
}
|
||
|
||
.action-btn {
|
||
padding: 12px;
|
||
border: 1px solid #e8e8e8;
|
||
background: #fff;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
transition: all 0.3s;
|
||
text-align: center;
|
||
}
|
||
|
||
.action-btn:hover {
|
||
border-color: #1890ff;
|
||
color: #1890ff;
|
||
}
|
||
|
||
/* 交易流水 */
|
||
.transactions-section {
|
||
background: #fff;
|
||
border-radius: 8px;
|
||
padding: 24px;
|
||
margin-bottom: 24px;
|
||
}
|
||
|
||
.transaction-list {
|
||
margin-top: 16px;
|
||
}
|
||
|
||
.transaction-item {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 12px 0;
|
||
border-bottom: 1px solid #f0f0f0;
|
||
}
|
||
|
||
.transaction-item:last-child {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.transaction-info h5 {
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.transaction-info p {
|
||
font-size: 14px;
|
||
color: #8c8c8c;
|
||
}
|
||
|
||
.transaction-amount {
|
||
font-size: 16px;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.amount-positive {
|
||
color: #52c41a;
|
||
}
|
||
|
||
.amount-negative {
|
||
color: #ff4d4f;
|
||
}
|
||
|
||
/* 统计卡片 */
|
||
.stats-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, 1fr);
|
||
gap: 16px;
|
||
margin-bottom: 24px;
|
||
}
|
||
|
||
.stat-card {
|
||
background: #fff;
|
||
padding: 16px;
|
||
border-radius: 8px;
|
||
text-align: center;
|
||
}
|
||
|
||
.stat-label {
|
||
font-size: 14px;
|
||
color: #8c8c8c;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.stat-value {
|
||
font-size: 24px;
|
||
font-weight: bold;
|
||
color: #262626;
|
||
}
|
||
|
||
/* 响应式 */
|
||
@media (max-width: 768px) {
|
||
.nav-container {
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
}
|
||
|
||
.profile-container {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.chests-grid,
|
||
.streamers-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.stats-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<!-- 导航栏 -->
|
||
<nav class="navbar">
|
||
<div class="nav-container">
|
||
<a href="#" class="logo">🎯 开宝箱</a>
|
||
<ul class="nav-links">
|
||
<li><a href="#" class="active" onclick="showPage('home')">首页</a></li>
|
||
<li><a href="#" onclick="showPage('profile')">我的</a></li>
|
||
</ul>
|
||
<div class="user-info">
|
||
<div class="balance">💰 余额: ¥1,000</div>
|
||
<button class="btn btn-secondary">退出</button>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<!-- 主内容区 -->
|
||
<div class="container">
|
||
<!-- 首页 -->
|
||
<div id="home" class="page active">
|
||
<!-- 公告栏 -->
|
||
<div class="announcement-bar">
|
||
<div class="announcement-icon">📢</div>
|
||
<div class="announcement-content">
|
||
<h4>系统维护通知</h4>
|
||
<p>系统将于今晚23:00-01:00进行维护升级,期间可能影响正常使用</p>
|
||
</div>
|
||
<button class="btn btn-secondary">更多公告</button>
|
||
</div>
|
||
|
||
<!-- 正在开奖的主播 -->
|
||
<div class="streamers-section">
|
||
<h2 class="section-title">🌟 正在开奖的主播</h2>
|
||
<div class="streamers-grid">
|
||
<div class="streamer-card">
|
||
<div class="streamer-info">
|
||
<div class="streamer-avatar">A</div>
|
||
<div class="streamer-details">
|
||
<h4>超级主播A</h4>
|
||
<p class="streamer-status">● 正在开奖</p>
|
||
</div>
|
||
</div>
|
||
<div class="streamer-stats">
|
||
<span>活跃宝箱: 5</span>
|
||
<span>总收益: ¥50,000</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="streamer-card">
|
||
<div class="streamer-info">
|
||
<div class="streamer-avatar">B</div>
|
||
<div class="streamer-details">
|
||
<h4>金牌主播B</h4>
|
||
<p class="streamer-status">● 正在开奖</p>
|
||
</div>
|
||
</div>
|
||
<div class="streamer-stats">
|
||
<span>活跃宝箱: 3</span>
|
||
<span>总收益: ¥30,000</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="streamer-card">
|
||
<div class="streamer-info">
|
||
<div class="streamer-avatar">C</div>
|
||
<div class="streamer-details">
|
||
<h4>人气主播C</h4>
|
||
<p class="streamer-status">● 正在开奖</p>
|
||
</div>
|
||
</div>
|
||
<div class="streamer-stats">
|
||
<span>活跃宝箱: 7</span>
|
||
<span>总收益: ¥45,000</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 宝箱列表 -->
|
||
<div class="streamers-section">
|
||
<h2 class="section-title">🎁 活跃宝箱</h2>
|
||
<div class="chests-grid">
|
||
<div class="chest-card">
|
||
<div class="chest-header">
|
||
<div class="chest-title">今晚吃什么?</div>
|
||
<div class="chest-streamer">主播: 超级主播A</div>
|
||
</div>
|
||
<div class="chest-options">
|
||
<div class="option">
|
||
<div class="option-label">A. 火锅</div>
|
||
<div class="option-amount">¥5,000</div>
|
||
</div>
|
||
<div class="option">
|
||
<div class="option-label">B. 烤肉</div>
|
||
<div class="option-amount">¥3,000</div>
|
||
</div>
|
||
</div>
|
||
<div class="chest-footer">
|
||
<span>总奖池: ¥8,000</span>
|
||
<span class="countdown">⏱️ 05:23</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="chest-card">
|
||
<div class="chest-header">
|
||
<div class="chest-title">明天天气如何?</div>
|
||
<div class="chest-streamer">主播: 金牌主播B</div>
|
||
</div>
|
||
<div class="chest-options">
|
||
<div class="option">
|
||
<div class="option-label">A. 晴天</div>
|
||
<div class="option-amount">¥4,500</div>
|
||
</div>
|
||
<div class="option">
|
||
<div class="option-label">B. 雨天</div>
|
||
<div class="option-amount">¥2,500</div>
|
||
</div>
|
||
</div>
|
||
<div class="chest-footer">
|
||
<span>总奖池: ¥7,000</span>
|
||
<span class="countdown">⏱️ 10:45</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="chest-card">
|
||
<div class="chest-header">
|
||
<div class="chest-title">哪个球队会赢?</div>
|
||
<div class="chest-streamer">主播: 人气主播C</div>
|
||
</div>
|
||
<div class="chest-options">
|
||
<div class="option">
|
||
<div class="option-label">A. 皇马</div>
|
||
<div class="option-amount">¥6,000</div>
|
||
</div>
|
||
<div class="option">
|
||
<div class="option-label">B. 巴萨</div>
|
||
<div class="option-amount">¥4,000</div>
|
||
</div>
|
||
</div>
|
||
<div class="chest-footer">
|
||
<span>总奖池: ¥10,000</span>
|
||
<span class="countdown">⏱️ 15:30</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 我的页面 -->
|
||
<div id="profile" class="page">
|
||
<div class="profile-container">
|
||
<!-- 左侧用户信息 -->
|
||
<div class="profile-card">
|
||
<div class="user-avatar-large">U</div>
|
||
<div class="user-name">用户001</div>
|
||
<div class="user-role">普通用户</div>
|
||
|
||
<div class="balance-card">
|
||
<div class="balance-label">当前余额</div>
|
||
<div class="balance-value">¥1,000</div>
|
||
</div>
|
||
|
||
<div class="quick-actions">
|
||
<div class="action-btn">
|
||
<div style="font-size: 24px; margin-bottom: 8px;">💰</div>
|
||
<div>领取低保</div>
|
||
</div>
|
||
<div class="action-btn">
|
||
<div style="font-size: 24px; margin-bottom: 8px;">📝</div>
|
||
<div>交易记录</div>
|
||
</div>
|
||
<div class="action-btn">
|
||
<div style="font-size: 24px; margin-bottom: 8px;">🎤</div>
|
||
<div>成为主播</div>
|
||
</div>
|
||
<div class="action-btn">
|
||
<div style="font-size: 24px; margin-bottom: 8px;">⚙️</div>
|
||
<div>设置</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 右侧统计和流水 -->
|
||
<div>
|
||
<!-- 统计卡片 -->
|
||
<div class="stats-grid">
|
||
<div class="stat-card">
|
||
<div class="stat-label">总下注次数</div>
|
||
<div class="stat-value">50</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<div class="stat-label">总获奖金额</div>
|
||
<div class="stat-value">¥5,000</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<div class="stat-label">胜率</div>
|
||
<div class="stat-value">60%</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 交易流水 -->
|
||
<div class="transactions-section">
|
||
<h3 style="margin-bottom: 16px;">最近交易</h3>
|
||
<div class="transaction-list">
|
||
<div class="transaction-item">
|
||
<div class="transaction-info">
|
||
<h5>下注 - 今晚吃什么?</h5>
|
||
<p>2024-12-12 14:30</p>
|
||
</div>
|
||
<div class="transaction-amount amount-negative">-¥100</div>
|
||
</div>
|
||
|
||
<div class="transaction-item">
|
||
<div class="transaction-info">
|
||
<h5>获胜奖励</h5>
|
||
<p>2024-12-12 13:15</p>
|
||
</div>
|
||
<div class="transaction-amount amount-positive">+¥200</div>
|
||
</div>
|
||
|
||
<div class="transaction-item">
|
||
<div class="transaction-info">
|
||
<h5>新用户注册奖励</h5>
|
||
<p>2024-12-11 10:00</p>
|
||
</div>
|
||
<div class="transaction-amount amount-positive">+¥1,000</div>
|
||
</div>
|
||
|
||
<div class="transaction-item">
|
||
<div class="transaction-info">
|
||
<h5>下注 - 明天天气如何?</h5>
|
||
<p>2024-12-11 16:20</p>
|
||
</div>
|
||
<div class="transaction-amount amount-negative">-¥50</div>
|
||
</div>
|
||
|
||
<div class="transaction-item">
|
||
<div class="transaction-info">
|
||
<h5>低保</h5>
|
||
<p>2024-12-10 12:00</p>
|
||
</div>
|
||
<div class="transaction-amount amount-positive">+¥100</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="text-align: center; margin-top: 16px;">
|
||
<button class="btn btn-primary">查看更多</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
// 页面切换
|
||
function showPage(pageId) {
|
||
// 隐藏所有页面
|
||
document.querySelectorAll('.page').forEach(page => {
|
||
page.classList.remove('active');
|
||
});
|
||
|
||
// 移除所有导航链接的active状态
|
||
document.querySelectorAll('.nav-links a').forEach(link => {
|
||
link.classList.remove('active');
|
||
});
|
||
|
||
// 显示选中页面
|
||
document.getElementById(pageId).classList.add('active');
|
||
|
||
// 添加选中导航链接的active状态
|
||
event.target.classList.add('active');
|
||
}
|
||
|
||
// 模拟倒计时
|
||
function updateCountdowns() {
|
||
const countdowns = document.querySelectorAll('.countdown');
|
||
countdowns.forEach(el => {
|
||
const time = el.textContent.match(/\d+:\d+/);
|
||
if (time) {
|
||
const [minutes, seconds] = time[0].split(':').map(Number);
|
||
let totalSeconds = minutes * 60 + seconds - 1;
|
||
|
||
if (totalSeconds < 0) {
|
||
totalSeconds = 0;
|
||
}
|
||
|
||
const newMinutes = Math.floor(totalSeconds / 60);
|
||
const newSeconds = totalSeconds % 60;
|
||
|
||
el.textContent = `⏱️ ${newMinutes.toString().padStart(2, '0')}:${newSeconds.toString().padStart(2, '0')}`;
|
||
}
|
||
});
|
||
}
|
||
|
||
// 每秒更新倒计时
|
||
setInterval(updateCountdowns, 1000);
|
||
</script>
|
||
</body>
|
||
</html>
|