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.
 
 

955 lines
29 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>
<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: 6px;
}
.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;
flex-shrink: 0;
}
.nav-btn {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--youth-radius-lg);
background: var(--youth-bg-card);
border: 1px solid var(--youth-border-light);
box-shadow: var(--shadow-card), var(--youth-inset-soft);
cursor: pointer;
transition: all 0.2s ease;
color: var(--youth-text-primary);
}
.nav-btn:active {
transform: scale(0.95);
box-shadow: var(--youth-inset-soft);
}
.nav-btn-skip {
width: auto;
padding: 0 12px;
font-size: 13px;
font-weight: 500;
color: var(--youth-muted-foreground);
}
.nav-title {
font-size: 16px;
font-weight: 600;
color: var(--youth-text-primary);
position: absolute;
left: 50%;
transform: translateX(-50%);
}
/* ===== 分步进度条 ===== */
.stepper-section {
padding: 4px 20px 8px;
flex-shrink: 0;
}
.stepper {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
}
.stepper-line {
position: absolute;
top: 50%;
left: 28px;
right: 28px;
height: 2px;
background: var(--youth-gray-200);
transform: translateY(-50%);
z-index: 0;
box-shadow: var(--youth-inset-soft);
}
.stepper-line-fill {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 33%;
background: var(--youth-gradient-progress);
border-radius: 1px;
box-shadow: 0 1px 2px rgba(38, 194, 187, 0.3);
}
.stepper-step {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
position: relative;
z-index: 1;
}
.stepper-dot {
width: 24px;
height: 24px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background: var(--youth-gray-200);
border: 2px solid var(--youth-gray-200);
box-shadow: var(--youth-inset-soft);
transition: all 0.3s ease;
}
.stepper-dot.completed {
background: var(--youth-gradient-primary);
border-color: transparent;
box-shadow: 0 2px 6px rgba(38, 194, 187, 0.35), var(--youth-inset-soft);
}
.stepper-dot.completed svg {
width: 12px;
height: 12px;
color: white;
}
.stepper-dot.active {
background: var(--youth-gradient-primary);
border-color: transparent;
box-shadow: 0 0 0 3px rgba(38, 194, 187, 0.15), 0 2px 8px rgba(38, 194, 187, 0.4);
animation: pulse-glow 2s ease-in-out infinite;
}
.stepper-dot.active .dot-inner {
width: 8px;
height: 8px;
border-radius: 50%;
background: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
@keyframes pulse-glow {
0%, 100% {
box-shadow: 0 0 0 3px rgba(38, 194, 187, 0.15), 0 2px 8px rgba(38, 194, 187, 0.4);
}
50% {
box-shadow: 0 0 0 6px rgba(38, 194, 187, 0.08), 0 2px 12px rgba(38, 194, 187, 0.5);
}
}
.stepper-label {
font-size: 10px;
color: var(--youth-muted-foreground);
font-weight: 500;
}
.stepper-label.active {
color: var(--youth-primary);
font-weight: 600;
}
.stepper-label.completed {
color: var(--youth-primary);
font-weight: 600;
}
.stepper-progress-text {
text-align: center;
margin-top: 4px;
font-size: 12px;
color: var(--youth-primary);
font-weight: 600;
}
/* ===== 标题区 ===== */
.hero-section {
padding: 8px 20px 10px;
}
.hero-title {
font-size: 22px;
line-height: 1.2;
font-weight: 700;
letter-spacing: -0.02em;
color: var(--youth-text-primary);
margin-bottom: 4px;
}
.hero-title .brand {
background: var(--youth-gradient-primary);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.hero-subtitle {
font-size: 15px;
color: var(--youth-muted-foreground);
line-height: 1.5;
}
/* ===== 表单卡片 ===== */
.form-card {
margin: 0 16px;
background: var(--youth-gradient-card);
border-radius: 12px;
padding: 14px 16px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
border: 1px solid var(--youth-border-light);
position: relative;
}
.form-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
border-radius: 24px 24px 0 0;
pointer-events: none;
}
.form-group {
margin-bottom: 12px;
}
.form-group:last-child {
margin-bottom: 0;
}
.form-label {
font-size: 13px;
font-weight: 500;
color: var(--youth-muted-foreground);
margin-bottom: 8px;
display: block;
}
.input-wrapper {
position: relative;
}
.input-icon {
position: absolute;
left: 14px;
top: 50%;
transform: translateY(-50%);
color: var(--youth-gray-400);
display: flex;
align-items: center;
justify-content: center;
}
.input-icon svg {
width: 18px;
height: 44px;
}
.youth-input {
background: var(--youth-input);
border: 1px solid var(--youth-border-light);
border-radius: var(--youth-radius-lg);
padding: 10px 14px 10px 40px;
font-size: 14px;
color: var(--youth-text-primary);
box-shadow: var(--youth-inset-input);
transition: all 0.2s ease;
width: 100%;
box-sizing: border-box;
font-family: inherit;
appearance: none;
-webkit-appearance: none;
}
.youth-input:focus {
outline: none;
border-color: var(--youth-primary);
box-shadow: var(--youth-inset-input), 0 0 0 3px rgba(38, 194, 187, 0.15);
}
.youth-input::placeholder {
color: var(--youth-gray-400);
}
/* 下拉选择器样式 */
.select-wrapper {
position: relative;
}
.select-wrapper select {
background: var(--youth-input);
border: 1px solid var(--youth-border-light);
border-radius: var(--youth-radius-lg);
padding: 10px 38px 10px 40px;
font-size: 14px;
color: var(--youth-text-primary);
box-shadow: var(--youth-inset-input);
transition: all 0.2s ease;
width: 100%;
box-sizing: border-box;
font-family: inherit;
appearance: none;
-webkit-appearance: none;
cursor: pointer;
}
.select-wrapper select:focus {
outline: none;
border-color: var(--youth-primary);
box-shadow: var(--youth-inset-input), 0 0 0 3px rgba(38, 194, 187, 0.15);
}
.select-wrapper select:invalid {
color: var(--youth-gray-400);
}
.select-wrapper select option {
color: var(--youth-text-primary);
background: var(--youth-bg-card);
}
.select-arrow {
position: absolute;
right: 14px;
top: 50%;
transform: translateY(-50%);
color: var(--youth-gray-400);
pointer-events: none;
display: flex;
align-items: center;
justify-content: center;
}
.select-arrow svg {
width: 18px;
height: 18px;
}
.input-with-icon-right .youth-input {
padding-right: 42px;
}
/* ===== 分段控件 Segmented Control ===== */
.segmented-control {
background: var(--youth-input);
border-radius: var(--youth-radius-lg);
padding: 3px;
display: flex;
position: relative;
box-shadow: var(--youth-inset-input);
border: 1px solid var(--youth-border-light);
margin-bottom: 12px;
}
.segmented-tab {
flex: 1;
padding: 7px 12px;
text-align: center;
font-size: 13px;
font-weight: 500;
color: var(--youth-muted-foreground);
border-radius: var(--youth-radius-md);
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
z-index: 1;
user-select: none;
}
.segmented-tab.active {
color: white;
font-weight: 600;
background: var(--youth-gradient-primary);
box-shadow: 0 2px 8px rgba(38, 194, 187, 0.3);
}
.segmented-tab.active::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
border-radius: var(--youth-radius-md) var(--youth-radius-md) 0 0;
pointer-events: none;
}
/* ===== 表单分支区域 ===== */
.form-branch {
display: none;
}
.form-branch.active {
display: block;
animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ===== 底部操作区 ===== */
.bottom-actions {
padding: 14px 20px 18px;
}
.btn-next {
width: 100%;
height: 46px;
background: var(--youth-gradient-primary);
color: var(--youth-primary-foreground);
border: none;
border-radius: var(--youth-radius-xl);
font-size: 15px;
font-weight: 600;
box-shadow: var(--youth-shadow-soft), 0 4px 12px rgba(38, 194, 187, 0.25);
cursor: pointer;
transition: all 0.2s ease;
position: relative;
overflow: hidden;
font-family: inherit;
}
.btn-next::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: var(--youth-radius-xl) var(--youth-radius-xl) 0 0;
pointer-events: none;
}
.btn-next::after {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
transition: left 0.6s ease;
pointer-events: none;
}
.btn-next:active {
transform: scale(0.98);
box-shadow: 0 2px 8px rgba(38, 194, 187, 0.2);
}
.btn-next:active::after {
left: 100%;
}
.btn-skip-bottom {
display: block;
width: 100%;
text-align: center;
margin-top: 8px;
font-size: 13px;
color: var(--youth-muted-foreground);
background: transparent;
border: none;
cursor: pointer;
font-family: inherit;
transition: color 0.2s ease;
}
.btn-skip-bottom:active {
color: var(--youth-primary);
}
.bg-decoration-2 {
position: absolute;
bottom: 100px;
left: -100px;
width: 240px;
height: 240px;
background: radial-gradient(circle, rgba(84, 202, 197, 0.08) 0%, transparent 70%);
border-radius: 50%;
pointer-events: none;
z-index: 0;
}
.content-wrap {
position: relative;
z-index: 1;
}
/* ===== 响应式 ===== */
@media (max-width: 375px) {
.app-container {
width: 100%;
}
}
/* 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" id="page-profile-2">
<!-- 背景装饰 -->
<div class="bg-decoration"></div>
<div class="bg-decoration-2"></div>
<div class="content-wrap">
<!-- 状态栏 -->
<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" onclick="goBack()">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<polyline points="15 18 9 12 15 6"></polyline>
</svg>
</button>
<span class="nav-title">完善资料</span>
<button class="nav-btn nav-btn-skip" data-dom-id="btn-skip-top" onclick="handleSkip()">
跳过
</button>
</div>
<!-- 分步进度条 -->
<div class="stepper-section">
<div class="stepper">
<div class="stepper-line">
<div class="stepper-line-fill"></div>
</div>
<!-- 第1步 已完成 -->
<div class="stepper-step">
<div class="stepper-dot completed">
<svg 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>
</div>
<span class="stepper-label completed">基本信息</span>
</div>
<!-- 第2步 进行中 -->
<div class="stepper-step">
<div class="stepper-dot active">
<div class="dot-inner"></div>
</div>
<span class="stepper-label active">院校学历</span>
</div>
<!-- 第3步 未完成 -->
<div class="stepper-step">
<div class="stepper-dot">
<span style="font-size: 11px; font-weight: 600; color: var(--youth-gray-400);">3</span>
</div>
<span class="stepper-label">兴趣标签</span>
</div>
</div>
</div>
<!-- 标题区 -->
<div class="hero-section">
<h1 class="hero-title">
你在哪所<span class="brand">学校</span>?
</h1>
<p class="hero-subtitle">实名认证让社交更真实</p>
</div>
<!-- 表单卡片 -->
<div class="form-card">
<!-- 所在院校 -->
<div class="form-group">
<label class="form-label" for="select-school">所在院校</label>
<div class="select-wrapper">
<span class="input-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 10v6M2 10l10-5 10 5-10 5z"></path>
<path d="M6 12v5c3 3 9 3 12 0v-5"></path>
</svg>
</span>
<select id="select-school"
data-dom-id="select-school"
required
>
<option value="" disabled selected>请选择学校</option>
<option value="pku">北京大学</option>
<option value="tsinghua">清华大学</option>
<option value="fudan">复旦大学</option>
<option value="sjtu">上海交通大学</option>
<option value="zju">浙江大学</option>
<option value="nju">南京大学</option>
<option value="whu">武汉大学</option>
<option value="hust">华中科技大学</option>
<option value="xjtu">西安交通大学</option>
<option value="hqu">华侨大学</option>
</select>
<span class="select-arrow">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</span>
</div>
</div>
<!-- 学历类型切换 -->
<div class="segmented-control">
<div class="segmented-tab active" data-dom-id="tab-fulltime" onclick="switchTab('fulltime')">
全日制
</div>
<div class="segmented-tab" data-dom-id="tab-parttime" onclick="switchTab('parttime')">
非全日制
</div>
</div>
<!-- 全日制分支 -->
<div class="form-branch active" id="branch-fulltime">
<!-- 入学年份 -->
<div class="form-group">
<label class="form-label" for="select-year">入学年份</label>
<div class="select-wrapper">
<span class="input-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>
</svg>
</span>
<select id="select-year"
data-dom-id="select-year"
required
>
<option value="" disabled selected>请选择入学年份</option>
<option value="2024">2024级</option>
<option value="2023">2023级</option>
<option value="2022">2022级</option>
<option value="2021">2021级</option>
<option value="2020">2020级</option>
<option value="2019">2019级</option>
<option value="2018">2018级</option>
<option value="2017">2017级</option>
</select>
<span class="select-arrow">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</span>
</div>
</div>
<!-- 学历层次 -->
<div class="form-group">
<label class="form-label" for="select-degree">学历层次</label>
<div class="select-wrapper">
<span class="input-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 10v6M2 10l10-5 10 5-10 5z"></path>
<path d="M6 12v5c3 3 9 3 12 0v-5"></path>
</svg>
</span>
<select id="select-degree"
data-dom-id="select-degree"
required
>
<option value="" disabled selected>请选择学历层次</option>
<option value="bachelor">本科</option>
<option value="master">硕士</option>
<option value="doctor">博士</option>
<option value="college">专科</option>
</select>
<span class="select-arrow">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</span>
</div>
</div>
<!-- 专业 -->
<div class="form-group">
<label class="form-label" for="input-major">所学专业</label>
<div class="input-wrapper input-with-icon-right">
<span class="input-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path>
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>
</svg>
</span>
<input type="text"
id="input-major"
class="youth-input"
data-dom-id="input-major"
placeholder="请输入你的专业"
maxlength="30"
>
</div>
</div>
</div>
<!-- 非全日制分支 -->
<div class="form-branch" id="branch-parttime">
<div class="form-group">
<label class="form-label">工作信息</label>
<div style="padding: 20px; text-align: center; background: var(--youth-accent); border-radius: var(--youth-radius-lg); border: 1px dashed var(--youth-primary-300);">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="var(--youth-primary)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin: 0 auto 8px;">
<rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect>
<path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path>
</svg>
<p style="font-size: 14px; color: var(--youth-accent-foreground); font-weight: 500; margin-bottom: 4px;">
非全日制同学
</p>
<p style="font-size: 12px; color: var(--youth-muted-foreground);">
请填写你的工作信息
</p>
<button style="margin-top: 12px; padding: 8px 20px; background: var(--youth-gradient-primary); color: white; border: none; border-radius: var(--youth-radius-md); font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--youth-shadow-soft);" onclick="goToWorkInfo()">
去填写工作信息
</button>
</div>
</div>
</div>
</div>
<!-- 底部操作区 -->
<div class="bottom-actions">
<button class="btn-next" data-dom-id="btn-next" onclick="handleNext()">
下一步
</button>
<button class="btn-skip-bottom" data-dom-id="btn-skip-bottom" onclick="handleSkip()">
跳过此步
</button>
</div>
</div>
</div>
<script>// ===== 主题切换 =====
// 初始化主题
})();
// ===== 全日制/非全日制切换 =====
function switchTab(tab) {
const tabFulltime = document.querySelector('[data-dom-id="tab-fulltime"]');
const tabParttime = document.querySelector('[data-dom-id="tab-parttime"]');
const branchFulltime = document.getElementById('branch-fulltime');
const branchParttime = document.getElementById('branch-parttime');
if (tab === 'fulltime') {
tabFulltime.classList.add('active');
tabParttime.classList.remove('active');
branchFulltime.classList.add('active');
branchParttime.classList.remove('active');
} else {
tabFulltime.classList.remove('active');
tabParttime.classList.add('active');
branchFulltime.classList.remove('active');
branchParttime.classList.add('active');
}
}
// ===== 返回按钮 =====
function goBack() {
window.location.href = 'profile-1.html';
}
// ===== 下一步按钮 =====
function handleNext() {
const school = document.getElementById('select-school').value;
const tabParttime = document.querySelector('[data-dom-id="tab-parttime"]');
const isParttime = tabParttime.classList.contains('active');
if (isParttime) {
// 非全日制分支提示
alert('非全日制同学请填写工作信息后继续');
return;
}
const year = document.getElementById('select-year').value;
const degree = document.getElementById('select-degree').value;
const major = document.getElementById('input-major').value.trim();
if (!school) {
alert('请选择所在院校');
return;
}
if (!year) {
alert('请选择入学年份');
return;
}
if (!degree) {
alert('请选择学历层次');
return;
}
if (!major) {
alert('请输入你的专业');
return;
}
// 保存到 localStorage
const profileData = JSON.parse(localStorage.getItem('youth-profile') || '{}');
profileData.school = school;
profileData.educationType = 'fulltime';
profileData.enrollmentYear = year;
profileData.degree = degree;
profileData.major = major;
localStorage.setItem('youth-profile', JSON.stringify(profileData));
// 跳转到第3步
window.location.href = 'profile-3.html';
}
// ===== 跳过 =====
function handleSkip() {
if (confirm('确定要跳过此步吗?完善资料可以获得更精准的匹配哦~')) {
window.location.href = 'profile-3.html';
}
}
// ===== 跳转到工作信息页 =====
function goToWorkInfo() {
// 非全日制跳转到工作信息页面(此处模拟提示)
alert('即将跳转到工作信息填写页');
// window.location.href = 'profile-work.html';
}</script>
</body>
</html>