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.
 
 

1163 lines
34 KiB

<!DOCTYPE html>
<html lang="zh-CN" style="height: 1005px;">
<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>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="../colors_and_type.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
:root {
/* 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: 64px;
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--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.03);
--glass-bg: rgba(255, 255, 255, 0.72);
--glass-blur: blur(20px);
--glass-border: rgba(255, 255, 255, 0.3);
}
html, body {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro Display', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
background: var(--youth-bg-page);
color: var(--youth-text-primary);
min-height: 100vh;
overflow-x: hidden;
}
.app-container {
width: 375px;
height: 812px;
margin: 0 auto;
background: var(--youth-bg-page);
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
}
/* ===== 状态栏 ===== */
.status-bar {
height: 36px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
font-size: 14px;
font-weight: 600;
color: var(--youth-text-primary);
position: relative;
z-index: 10;
flex-shrink: 0;
}
.status-bar .right-icons {
display: flex;
align-items: center;
gap: 5px;
}
.status-bar svg {
width: 16px;
height: 16px;
}
/* ===== 导航栏 ===== */
.nav-bar {
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
position: relative;
z-index: 10;
flex-shrink: 0;
}
.nav-btn {
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.2s ease;
}
.nav-btn:active {
background: var(--youth-bg-hover);
}
.nav-title {
font-size: 17px;
font-weight: 600;
color: var(--youth-text-primary);
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.nav-rules {
font-size: 14px;
color: var(--youth-primary);
font-weight: 500;
padding: 6px 12px;
border-radius: 16px;
transition: background-color 0.2s ease;
}
.nav-rules:active {
background: var(--youth-primary-bg);
}
/* ===== 滚动内容区 ===== */
.scroll-content {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding-bottom: 20px;
-webkit-overflow-scrolling: touch;
}
.scroll-content::-webkit-scrollbar {
display: none;
}
/* ===== 积分大卡片 ===== */
.points-card {
margin: 8px 16px 20px;
border-radius: 20px;
background: linear-gradient(135deg, #3FCFCA 0%, #26C2BB 50%, #1FA39E 100%);
padding: 20px 20px 16px;
position: relative;
overflow: hidden;
box-shadow: 0 8px 24px rgba(38, 194, 187, 0.25);
}
.points-card::before {
content: '';
position: absolute;
top: -40px;
right: -40px;
width: 160px;
height: 160px;
background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
border-radius: 50%;
}
.points-card::after {
content: '';
position: absolute;
bottom: -60px;
left: -30px;
width: 140px;
height: 140px;
background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
border-radius: 50%;
}
.points-card-header {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
z-index: 1;
}
.points-card-label {
font-size: 13px;
color: rgba(255, 255, 255, 0.85);
font-weight: 500;
}
.points-detail-btn {
display: flex;
align-items: center;
gap: 2px;
font-size: 12px;
color: rgba(255, 255, 255, 0.85);
font-weight: 500;
padding: 4px 8px;
border-radius: 12px;
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(10px);
}
.points-balance {
font-size: 48px;
font-weight: 700;
color: #fff;
line-height: 1.1;
margin-top: 8px;
letter-spacing: -1px;
position: relative;
z-index: 1;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.points-today {
font-size: 13px;
color: rgba(255, 255, 255, 0.8);
margin-top: 4px;
position: relative;
z-index: 1;
display: flex;
align-items: center;
text-align: left;
}
.points-today .plus {
color: #B8F5F2;
font-weight: 600;
}
/* 快捷入口 */
.quick-entries {
display: flex;
justify-content: space-around;
margin-top: 16px;
padding-top: 14px;
border-top: 1px solid rgba(255, 255, 255, 0.2);
position: relative;
z-index: 1;
}
.quick-entry {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
flex: 1;
cursor: pointer;
transition: transform 0.2s ease;
}
.quick-entry:active {
transform: scale(0.95);
}
.quick-entry-icon {
width: 40px;
height: 40px;
border-radius: 14px;
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
display: flex;
align-items: center;
justify-content: center;
border: 1px solid rgba(255, 255, 255, 0.3);
}
.quick-entry-icon svg {
width: 20px;
height: 20px;
color: #fff;
}
.quick-entry-text {
font-size: 12px;
color: rgba(255, 255, 255, 0.95);
font-weight: 500;
}
/* ===== 功能入口区 ===== */
.feature-entries {
display: flex;
justify-content: space-between;
padding: 0 20px;
margin-bottom: 20px;
}
.feature-entry {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
cursor: pointer;
transition: transform 0.2s ease;
}
.feature-entry:active {
transform: scale(0.95);
}
.feature-icon {
width: 52px;
height: 52px;
border-radius: 18px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.6);
position: relative;
}
.feature-icon::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 18px;
box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.06);
}
.feature-icon svg {
width: 24px;
height: 24px;
color: #fff;
position: relative;
z-index: 1;
}
.feature-icon.mall {
background: linear-gradient(135deg, #FFB96B 0%, #FF9F45 100%);
}
.feature-icon.gifts {
background: linear-gradient(135deg, #FF8AAE 0%, #FF6B9D 100%);
}
.feature-icon.vip {
background: linear-gradient(135deg, #FFD76B 0%, #FFB800 100%);
}
.feature-icon.lottery {
background: linear-gradient(135deg, #9B8DFF 0%, #7B61FF 100%);
}
.feature-label {
font-size: 12px;
color: var(--youth-text-secondary);
font-weight: 500;
}
/* ===== 任务列表卡片 ===== */
.section-card {
margin: 0 16px 16px;
background: var(--youth-bg-card);
border-radius: 12px;
padding: 16px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
transition: background-color 0.3s ease;
}
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 14px;
}
.section-title {
font-size: 16px;
font-weight: 600;
color: var(--youth-text-primary);
display: flex;
align-items: center;
gap: 6px;
}
.section-title::before {
content: '';
width: 3px;
height: 16px;
background: var(--youth-gradient-primary);
border-radius: 2px;
}
.section-more {
font-size: 13px;
color: var(--youth-text-tertiary);
display: flex;
align-items: center;
gap: 2px;
cursor: pointer;
}
.section-more:active {
opacity: 0.7;
}
/* 任务项 */
.task-item {
display: flex;
align-items: center;
padding: 12px 0;
border-bottom: 1px solid var(--youth-border-light);
cursor: pointer;
transition: background-color 0.2s ease;
}
.task-item:last-child {
border-bottom: none;
padding-bottom: 0;
}
.task-item:first-child {
padding-top: 0;
}
.task-item:active {
background: var(--youth-bg-hover);
margin: 0 -8px;
padding-left: 8px;
padding-right: 8px;
border-radius: 8px;
}
.task-icon {
width: 40px;
height: 40px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-right: 12px;
}
.task-icon svg {
width: 20px;
height: 20px;
}
.task-icon.checkin {
background: linear-gradient(135deg, #E8FBED 0%, #C9F5D3 100%);
color: #34C759;
}
.task-icon.post {
background: linear-gradient(135deg, #E6FAF9 0%, #C8F3F1 100%);
color: #26C2BB;
}
.task-icon.activity {
background: linear-gradient(135deg, #FFF4E8 0%, #FFE4C8 100%);
color: #FF9F45;
}
.task-icon.invite {
background: linear-gradient(135deg, #F0EEFF 0%, #DED9FF 100%);
color: #7B61FF;
}
.task-info {
flex: 1;
min-width: 0;
}
.task-title {
font-size: 14px;
font-weight: 500;
color: var(--youth-text-primary);
margin-bottom: 2px;
}
.task-desc {
font-size: 12px;
color: var(--youth-text-tertiary);
}
.task-right {
flex-shrink: 0;
margin-left: 8px;
}
.task-reward {
font-size: 13px;
color: var(--youth-orange-500);
font-weight: 600;
margin-bottom: 4px;
text-align: right;
}
.task-btn {
height: 28px;
padding: 0 14px;
border-radius: 14px;
font-size: 12px;
font-weight: 500;
background: var(--youth-gradient-primary);
color: #fff;
border: none;
cursor: pointer;
box-shadow: 0 2px 6px rgba(38, 194, 187, 0.25);
transition: all 0.2s ease;
}
.task-btn:active {
transform: scale(0.96);
box-shadow: 0 1px 3px rgba(38, 194, 187, 0.2);
}
.task-completed-tag {
display: inline-flex;
align-items: center;
gap: 3px;
padding: 4px 10px;
border-radius: 12px;
background: rgba(52, 199, 89, 0.12);
color: #34C759;
font-size: 12px;
font-weight: 500;
}
/* ===== 积分记录 ===== */
.record-item {
display: flex;
align-items: center;
padding: 12px 0;
border-bottom: 1px solid var(--youth-border-light);
cursor: pointer;
}
.record-item:last-child {
border-bottom: none;
padding-bottom: 0;
}
.record-item:first-child {
padding-top: 0;
}
.record-item:active {
opacity: 0.7;
}
.record-icon {
width: 36px;
height: 36px;
border-radius: 10px;
background: var(--youth-primary-bg);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-right: 12px;
color: var(--youth-primary);
}
.record-icon svg {
width: 18px;
height: 18px;
}
.record-info {
flex: 1;
min-width: 0;
}
.record-title {
font-size: 14px;
font-weight: 500;
color: var(--youth-text-primary);
margin-bottom: 2px;
}
.record-time {
font-size: 12px;
color: var(--youth-text-tertiary);
}
.record-points {
font-size: 15px;
font-weight: 600;
color: var(--youth-success-500);
flex-shrink: 0;
}
/* ===== 底部安全区域 ===== */
.safe-bottom {
height: 34px;
flex-shrink: 0;
background: var(--youth-bg-page);
transition: background-color 0.3s ease;
}
/* ===== 规则弹窗 ===== */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.45);
display: none;
align-items: center;
justify-content: center;
z-index: 998;
backdrop-filter: blur(4px);
}
.modal-overlay.show {
display: flex;
animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.rules-modal {
width: 300px;
background: var(--youth-bg-card);
border-radius: 20px;
padding: 24px 20px 20px;
position: relative;
animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
z-index: 999;
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}
@keyframes modalIn {
from { transform: scale(0.9); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}
.rules-modal h3 {
font-size: 18px;
font-weight: 600;
text-align: center;
margin-bottom: 16px;
color: var(--youth-text-primary);
}
.rules-list {
max-height: 320px;
overflow-y: auto;
padding-right: 4px;
}
.rule-item {
display: flex;
gap: 10px;
margin-bottom: 14px;
font-size: 13px;
color: var(--youth-text-secondary);
line-height: 1.6;
}
.rule-item:last-child {
margin-bottom: 0;
}
.rule-num {
flex-shrink: 0;
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--youth-primary-bg);
color: var(--youth-primary);
font-size: 11px;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
}
.rules-close {
width: 100%;
height: 44px;
border-radius: 22px;
background: var(--youth-gradient-primary);
color: #fff;
font-size: 15px;
font-weight: 500;
border: none;
cursor: pointer;
margin-top: 20px;
box-shadow: 0 4px 12px rgba(38, 194, 187, 0.25);
transition: all 0.2s ease;
}
.rules-close:active {
transform: scale(0.98);
}
/* ===== Toast 提示 ===== */
.toast {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 12px 24px;
background: rgba(0, 0, 0, 0.75);
color: #fff;
font-size: 14px;
border-radius: 12px;
z-index: 999;
opacity: 0;
pointer-events: none;
transition: opacity 0.25s ease;
backdrop-filter: blur(10px);
}
.toast.show {
opacity: 1;
}
/* 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="app-container" style="height: 1054px;">
<!-- 状态栏 -->
<div class="status-bar">
<span>9:41</span>
<div class="right-icons">
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"></path>
</svg>
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"></path>
</svg>
</div>
</div>
<!-- 顶部导航 -->
<div class="nav-bar">
<button class="nav-btn" data-dom-id="btn-back" id="btn-back">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" style="color: var(--youth-text-primary);">
<path d="M15 18l-6-6 6-6"></path>
</svg>
</button>
<div class="nav-title">青核积分</div>
<button class="nav-rules" data-dom-id="btn-rules" id="btn-rules">积分规则</button>
</div>
<!-- 滚动内容区 -->
<div class="scroll-content">
<!-- 积分大卡片 -->
<div class="points-card">
<div class="points-card-header">
<span class="points-card-label">我的积分</span>
<div class="points-detail-btn" id="btn-points-detail">
积分明细
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 18l6-6-6-6"></path>
</svg>
</div>
</div>
<div class="points-balance" data-dom-id="points-balance" id="points-balance">1,280</div>
<div class="quick-entries">
<div class="quick-entry" data-dom-id="btn-checkin" id="btn-checkin">
<div class="quick-entry-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
<path d="M9 16l2 2 4-4"></path>
</svg>
</div>
<span class="quick-entry-text">已签到</span>
</div>
<div class="quick-entry" data-dom-id="btn-tasks" id="btn-tasks">
<div class="quick-entry-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 11l3 3L22 4"></path>
<path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path>
</svg>
</div>
<span class="quick-entry-text">赚积分</span>
</div>
<div class="quick-entry" data-dom-id="btn-exchange" id="btn-exchange">
<div class="quick-entry-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 12 20 22 4 22 4 12"></polyline>
<rect x="2" y="7" width="20" height="5"></rect>
<line x1="12" y1="22" x2="12" y2="7"></line>
<path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path>
<path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path>
</svg>
</div>
<span class="quick-entry-text">去兑换</span>
</div>
</div>
</div>
<!-- 功能入口区 -->
<div class="feature-entries">
<div class="feature-entry" data-dom-id="entry-mall" id="entry-mall">
<div class="feature-icon mall">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path>
<line x1="3" y1="6" x2="21" y2="6"></line>
<path d="M16 10a4 4 0 0 1-8 0"></path>
</svg>
</div>
<span class="feature-label">积分商城</span>
</div>
<div class="feature-entry" data-dom-id="entry-gifts" id="entry-gifts">
<div class="feature-icon gifts">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 12 20 22 4 22 4 12"></polyline>
<rect x="2" y="7" width="20" height="5"></rect>
<line x1="12" y1="22" x2="12" y2="7"></line>
<path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path>
<path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path>
</svg>
</div>
<span class="feature-label">礼物中心</span>
</div>
<div class="feature-entry" data-dom-id="entry-vip" id="entry-vip">
<div class="feature-icon vip">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"></path>
</svg>
</div>
<span class="feature-label">会员中心</span>
</div>
<div class="feature-entry" data-dom-id="entry-lottery" id="entry-lottery">
<div class="feature-icon lottery">
<svg 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>
<polygon points="12 2 14.39 8.5 21.5 9.09 16 13.97 17.77 20.91 12 17.77 6.23 20.91 8 13.97 2.5 9.09 9.61 8.5 12 2"></polygon>
</svg>
</div>
<span class="feature-label">积分抽奖</span>
</div>
</div>
<!-- 每日任务 -->
<div class="section-card">
<div class="section-header">
<div class="section-title">每日任务</div>
<div class="section-more" id="btn-all-tasks">
全部
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 18l6-6-6-6"></path>
</svg>
</div>
</div>
<div class="task-item" data-dom-id="task-checkin" id="task-checkin">
<div class="task-info">
<div class="task-title">每日签到</div>
<div class="task-desc">连续签到奖励翻倍</div>
</div>
<div class="task-right">
<span class="task-completed-tag">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 6 9 17 4 12"></polyline>
</svg>
已完成
</span>
</div>
</div>
<div class="task-item" data-dom-id="task-post" id="task-post">
<div class="task-info">
<div class="task-title">发布1条动态</div>
<div class="task-desc">分享你的校园生活</div>
</div>
<div class="task-right">
<div class="task-reward">+10积分</div>
<button class="task-btn" data-dom-id="btn-do-task-post" id="btn-do-task-post">去完成</button>
</div>
</div>
<div class="task-item" data-dom-id="task-activity" id="task-activity">
<div class="task-info">
<div class="task-title">参与1场组局</div>
<div class="task-desc">结识同校新朋友</div>
</div>
<div class="task-right">
<div class="task-reward">+20积分</div>
<button class="task-btn" data-dom-id="btn-do-task-activity" id="btn-do-task-activity">去完成</button>
</div>
</div>
<div class="task-item" data-dom-id="task-invite" id="task-invite">
<div class="task-info">
<div class="task-title">邀请1位好友</div>
<div class="task-desc">邀请同学加入青核</div>
</div>
<div class="task-right">
<div class="task-reward">+50积分</div>
<button class="task-btn" data-dom-id="btn-do-task-invite" id="btn-do-task-invite">去完成</button>
</div>
</div>
</div>
<!-- 积分记录 -->
<div class="section-card">
<div class="section-header">
<div class="section-title">积分记录</div>
<div class="section-more" id="btn-all-records">
查看全部
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 18l6-6-6-6"></path>
</svg>
</div>
</div>
<div class="record-item" data-dom-id="record-1" id="record-1">
<div class="record-info">
<div class="record-title">签到奖励</div>
<div class="record-time">今天 08:30</div>
</div>
<div class="record-points">+10</div>
</div>
<div class="record-item" data-dom-id="record-2" id="record-2">
<div class="record-info">
<div class="record-title">发布动态</div>
<div class="record-time">昨天 15:20</div>
</div>
<div class="record-points">+20</div>
</div>
</div>
</div>
<!-- 底部安全区域 -->
<div class="safe-bottom"></div>
<!-- 积分规则弹窗 -->
<div class="modal-overlay" id="rules-modal">
<div class="rules-modal">
<h3>积分规则</h3>
<div class="rules-list">
<div class="rule-item">
<span class="rule-num">1</span>
<span>每日签到可获得10积分,连续签到7天额外奖励30积分。</span>
</div>
<div class="rule-item">
<span class="rule-num">2</span>
<span>发布1条优质动态可获得10积分,每日上限3条。</span>
</div>
<div class="rule-item">
<span class="rule-num">3</span>
<span>参与1场组局活动可获得20积分,每日上限2场。</span>
</div>
<div class="rule-item">
<span class="rule-num">4</span>
<span>成功邀请1位好友注册可获得50积分,无上限。</span>
</div>
<div class="rule-item">
<span class="rule-num">5</span>
<span>积分可在积分商城兑换周边好礼,也可参与抽奖。</span>
</div>
<div class="rule-item">
<span class="rule-num">6</span>
<span>积分永久有效,最终解释权归青核Youthome所有。</span>
</div>
</div>
<button class="rules-close" id="btn-close-rules">我知道了</button>
</div>
</div>
<!-- Toast 提示 -->
<div class="toast" id="toast"></div>
</div>
<script>// ===== 主题切换 =====
sunIcon.style.display = 'block';
moonIcon.style.display = 'none';
}
}
sunIcon.style.display = 'none';
moonIcon.style.display = 'block';
}
});
// ===== 返回按钮 =====
document.getElementById('btn-back').addEventListener('click', () => {
window.location.href = 'profile-home.html';
});
// ===== Toast 提示 =====
function showToast(message, duration = 2000) {
const toast = document.getElementById('toast');
toast.textContent = message;
toast.classList.add('show');
setTimeout(() => {
toast.classList.remove('show');
}, duration);
}
// ===== 签到按钮 =====
let isCheckedIn = true;
document.getElementById('btn-checkin').addEventListener('click', () => {
if (isCheckedIn) {
showToast('今日已签到,明天继续哦~');
} else {
isCheckedIn = true;
const balanceEl = document.getElementById('points-balance');
const current = parseInt(balanceEl.textContent.replace(/,/g, ''));
balanceEl.textContent = (current + 10).toLocaleString();
showToast('签到成功 +10积分');
}
});
// ===== 做任务按钮 =====
document.getElementById('btn-tasks').addEventListener('click', () => {
const taskSection = document.querySelector('.section-card');
taskSection.scrollIntoView({ behavior: 'smooth', block: 'start' });
});
// ===== 兑好礼按钮 =====
document.getElementById('btn-exchange').addEventListener('click', () => {
showToast('正在前往积分商城...');
});
// ===== 功能入口跳转 =====
document.getElementById('entry-mall').addEventListener('click', () => {
showToast('正在前往积分商城...');
});
document.getElementById('entry-gifts').addEventListener('click', () => {
showToast('正在前往礼物中心...');
});
document.getElementById('entry-vip').addEventListener('click', () => {
showToast('正在前往会员中心...');
});
document.getElementById('entry-lottery').addEventListener('click', () => {
showToast('正在前往积分抽奖...');
});
// ===== 去完成任务按钮 =====
document.getElementById('btn-do-task-post').addEventListener('click', (e) => {
e.stopPropagation();
showToast('正在前往发布动态...');
});
document.getElementById('btn-do-task-activity').addEventListener('click', (e) => {
e.stopPropagation();
showToast('正在前往组局广场...');
});
document.getElementById('btn-do-task-invite').addEventListener('click', (e) => {
e.stopPropagation();
showToast('正在生成邀请链接...');
});
// ===== 任务点击查看详情 =====
document.getElementById('task-checkin').addEventListener('click', () => {
showToast('每日签到任务已完成');
});
document.getElementById('task-post').addEventListener('click', () => {
showToast('发布1条动态 +10积分');
});
document.getElementById('task-activity').addEventListener('click', () => {
showToast('参与1场组局 +20积分');
});
document.getElementById('task-invite').addEventListener('click', () => {
showToast('邀请1位好友 +50积分');
});
// ===== 积分记录 =====
document.getElementById('record-1').addEventListener('click', () => {
showToast('签到奖励 +10积分');
});
document.getElementById('record-2').addEventListener('click', () => {
showToast('发布动态 +20积分');
});
document.getElementById('btn-all-records').addEventListener('click', () => {
showToast('查看全部积分记录');
});
document.getElementById('btn-all-tasks').addEventListener('click', () => {
showToast('查看全部任务');
});
// ===== 积分规则弹窗 =====
const rulesModal = document.getElementById('rules-modal');
document.getElementById('btn-rules').addEventListener('click', () => {
rulesModal.classList.add('show');
});
document.getElementById('btn-close-rules').addEventListener('click', () => {
rulesModal.classList.remove('show');
});
rulesModal.addEventListener('click', (e) => {
if (e.target === rulesModal) {
rulesModal.classList.remove('show');
}
});
// ===== 积分明细按钮 =====
document.getElementById('btn-points-detail').addEventListener('click', () => {
showToast('查看积分明细');
});</script>
</body>
</html>