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.
599 lines
20 KiB
599 lines
20 KiB
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, 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>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
body {
|
|
font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
background: var(--youth-bg-page);
|
|
color: var(--youth-text-primary);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 页面容器 */
|
|
.page-container {
|
|
width: 375px;
|
|
height: 812px;
|
|
margin: 0 auto;
|
|
position: relative;
|
|
overflow: hidden;
|
|
background: var(--youth-bg-page);
|
|
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);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.status-bar .right-icons {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
}
|
|
|
|
/* 顶部导航 */
|
|
.top-nav {
|
|
height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
padding: 0 16px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.nav-back-btn {
|
|
position: absolute;
|
|
left: 16px;
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--youth-bg-card);
|
|
border: 1px solid var(--youth-border-light);
|
|
box-shadow: var(--youth-shadow-card);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
color: var(--youth-text-primary);
|
|
}
|
|
|
|
.nav-back-btn:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.nav-title {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
}
|
|
|
|
/* 内容区 */
|
|
.scroll-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 8px 20px 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.scroll-content::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
/* 页面标题区 */
|
|
.page-title {
|
|
font-size: 22px;
|
|
font-weight: 700;
|
|
color: var(--youth-text-primary);
|
|
line-height: 1.3;
|
|
margin-bottom: 6px;
|
|
letter-spacing: -0.015em;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.page-subtitle {
|
|
font-size: 13px;
|
|
color: var(--youth-text-tertiary);
|
|
line-height: 1.5;
|
|
margin-bottom: 24px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* 表单卡片 */
|
|
.form-card {
|
|
background: var(--youth-bg-card);
|
|
border-radius: 14px;
|
|
padding: 20px 16px;
|
|
border: 1px solid var(--youth-border-lighter);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
|
|
margin-bottom: 16px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.form-group:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.form-label {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--youth-text-secondary);
|
|
margin-bottom: 8px;
|
|
display: block;
|
|
}
|
|
|
|
/* 输入框 */
|
|
.input-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
background: var(--youth-bg-input);
|
|
border: 1px solid var(--youth-border);
|
|
border-radius: 10px;
|
|
height: 48px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.input-wrapper:focus-within {
|
|
border-color: var(--youth-primary);
|
|
box-shadow: 0 0 0 3px rgba(38, 194, 187, 0.1);
|
|
background: var(--youth-bg-card);
|
|
}
|
|
|
|
.input-icon-left {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 44px;
|
|
height: 48px;
|
|
color: var(--youth-gray-400);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.input-wrapper:focus-within .input-icon-left {
|
|
color: var(--youth-primary);
|
|
}
|
|
|
|
.input-field {
|
|
flex: 1;
|
|
height: 48px;
|
|
border: none;
|
|
outline: none;
|
|
background: transparent;
|
|
font-size: 15px;
|
|
color: var(--youth-text-primary);
|
|
padding-right: 12px;
|
|
font-family: inherit;
|
|
letter-spacing: 0.02em;
|
|
}
|
|
|
|
.input-field::placeholder {
|
|
color: var(--youth-text-placeholder);
|
|
font-size: 14px;
|
|
letter-spacing: 0;
|
|
}
|
|
|
|
.input-icon-right {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 44px;
|
|
height: 48px;
|
|
color: var(--youth-gray-400);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.input-icon-right.verified {
|
|
color: var(--youth-primary);
|
|
}
|
|
|
|
/* 性别出生日期自动解析提示 */
|
|
.id-info-hint {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-top: 8px;
|
|
font-size: 11px;
|
|
color: var(--youth-text-tertiary);
|
|
}
|
|
|
|
.id-info-hint svg {
|
|
width: 12px;
|
|
height: 12px;
|
|
flex-shrink: 0;
|
|
color: var(--youth-primary);
|
|
}
|
|
|
|
/* 协议勾选 */
|
|
.agreement-row {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
margin-bottom: 24px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.checkbox-custom {
|
|
width: 18px;
|
|
height: 18px;
|
|
border-radius: 5px;
|
|
border: 1.5px solid var(--youth-border);
|
|
background: var(--youth-bg-card);
|
|
flex-shrink: 0;
|
|
margin-top: 1px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.checkbox-custom.checked {
|
|
background: var(--youth-primary);
|
|
border-color: var(--youth-primary);
|
|
}
|
|
|
|
.checkbox-custom.checked svg {
|
|
width: 12px;
|
|
height: 12px;
|
|
color: #fff;
|
|
}
|
|
|
|
.agreement-text {
|
|
font-size: 12px;
|
|
color: var(--youth-text-tertiary);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.agreement-text a {
|
|
color: var(--youth-primary);
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* 安全提示卡片 */
|
|
.security-card {
|
|
background: var(--youth-primary-50);
|
|
border-radius: 12px;
|
|
padding: 12px 14px;
|
|
display: flex;
|
|
gap: 10px;
|
|
align-items: flex-start;
|
|
margin-bottom: auto;
|
|
flex-shrink: 0;
|
|
border: 1px solid rgba(38, 194, 187, 0.1);
|
|
}
|
|
|
|
.shield-icon {
|
|
width: 20px;
|
|
height: 20px;
|
|
color: var(--youth-primary);
|
|
flex-shrink: 0;
|
|
margin-top: 1px;
|
|
}
|
|
|
|
.security-content {
|
|
flex: 1;
|
|
}
|
|
|
|
.security-title {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: var(--youth-primary-dark);
|
|
margin-bottom: 3px;
|
|
}
|
|
|
|
.security-text {
|
|
font-size: 11px;
|
|
line-height: 1.5;
|
|
color: var(--youth-primary-dark);
|
|
opacity: 0.75;
|
|
}
|
|
|
|
/* 底部操作区 */
|
|
.bottom-actions {
|
|
padding-top: 20px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.btn-submit {
|
|
width: 100%;
|
|
height: 48px;
|
|
border: none;
|
|
border-radius: 12px;
|
|
background: var(--youth-primary);
|
|
color: white;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.btn-submit:active {
|
|
transform: scale(0.98);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.btn-submit:disabled {
|
|
background: var(--youth-gray-200);
|
|
color: var(--youth-gray-400);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn-cancel {
|
|
width: 100%;
|
|
height: 36px;
|
|
border: none;
|
|
background: transparent;
|
|
color: var(--youth-text-tertiary);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
margin-top: 10px;
|
|
font-family: inherit;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.btn-cancel:active {
|
|
color: var(--youth-gray-500);
|
|
}
|
|
|
|
/* 底部安全标识 */
|
|
.bottom-security {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
margin-top: 16px;
|
|
font-size: 11px;
|
|
color: var(--youth-text-tertiary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.bottom-security svg {
|
|
width: 12px;
|
|
height: 12px;
|
|
color: var(--youth-primary);
|
|
}
|
|
|
|
/* 加载中遮罩 */
|
|
.loading-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(255, 255, 255, 0.85);
|
|
backdrop-filter: blur(4px);
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
z-index: 100;
|
|
}
|
|
|
|
.loading-overlay.show {
|
|
display: flex;
|
|
}
|
|
|
|
.loading-spinner {
|
|
width: 36px;
|
|
height: 36px;
|
|
border: 3px solid var(--youth-primary-100);
|
|
border-top-color: var(--youth-primary);
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
.loading-text {
|
|
font-size: 13px;
|
|
color: var(--youth-text-secondary);
|
|
font-weight: 500;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="page-container">
|
|
<!-- 状态栏 -->
|
|
<div class="status-bar">
|
|
<span>9:41</span>
|
|
<div class="right-icons">
|
|
<svg width="17" height="11" viewBox="0 0 17 11" fill="currentColor">
|
|
<rect x="0" y="7" width="3" height="4" rx="0.5"></rect>
|
|
<rect x="4.5" y="5" width="3" height="6" rx="0.5"></rect>
|
|
<rect x="9" y="2.5" width="3" height="8.5" rx="0.5"></rect>
|
|
<rect x="13.5" y="0" width="3" height="11" rx="0.5"></rect>
|
|
</svg>
|
|
<svg width="15" height="11" viewBox="0 0 15 11" fill="currentColor">
|
|
<path d="M7.5 11C6.9 11 6.4 10.8 6 10.4C5.2 9.6 5 8.6 5.4 7.6C5.8 6.6 6.8 6 7.8 6C9 6 10 6.8 10.2 8C10.4 8.8 10 9.6 9.4 10.2C8.9 10.7 8.2 11 7.5 11ZM7.5 4.5C6 4.5 4.5 5 3.4 6.2C2.3 7.4 2 9 2.4 10.4C2.5 10.8 2.8 11 3.2 11C3.5 11 3.8 10.8 3.9 10.5C4.2 9.5 4.8 8.6 5.7 8C6.6 7.4 7.6 7.1 8.6 7.2C9.8 7.3 10.9 7.8 11.6 8.7C12.3 9.6 12.6 10.7 12.4 11.8L12.4 12C12.3 12.4 12.6 12.7 13 12.8C13.4 12.9 13.7 12.6 13.8 12.2C14.1 10.5 13.5 8.8 12.4 7.5C11.3 6.2 9.6 5.3 7.8 4.9L7.5 4.5Z"></path>
|
|
<path d="M7.5 1C5.3 1 3.2 1.7 1.5 3C-0.5 4.7 -0.5 7.5 1.5 9.2C1.9 9.6 2.5 9.6 2.9 9.2C3.3 8.8 3.3 8.2 2.9 7.8C1.6 6.5 1.6 4.4 2.9 3.1C4.2 1.8 6.3 1.4 8 2C10.1 2.7 11.7 4.4 12.2 6.5C12.5 7.3 12.4 8.1 11.8 8.7C11.4 9.1 11.4 9.7 11.8 10.1C12.2 10.5 12.8 10.5 13.2 10.1C14.2 9.1 14.5 7.7 14.2 6.3C13.6 4 12.1 2.3 10.2 1.3C9.3 1 8.4 0.9 7.5 1Z"></path>
|
|
</svg>
|
|
<svg width="25" height="12" viewBox="0 0 25 12" fill="none">
|
|
<rect x="0.5" y="0.5" width="21" height="11" rx="2.5" stroke="currentColor" opacity="0.5"></rect>
|
|
<rect x="2" y="2" width="18" height="8" rx="1.5" fill="currentColor"></rect>
|
|
<rect x="22.5" y="4" width="1.5" height="4" rx="0.5" fill="currentColor" opacity="0.5"></rect>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 顶部导航 -->
|
|
<div class="top-nav">
|
|
<div class="nav-back-btn" data-dom-id="btn-back">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
</svg>
|
|
</div>
|
|
<div class="nav-title">实名认证</div>
|
|
</div>
|
|
|
|
<!-- 内容区 -->
|
|
<div class="scroll-content">
|
|
<!-- 页面标题 -->
|
|
<div class="page-title">填写真实身份信息</div>
|
|
<div class="page-subtitle">请填写与本人一致的姓名和身份证号,我们将通过公安系统核验身份真实性</div>
|
|
|
|
<!-- 表单卡片 -->
|
|
<div class="form-card">
|
|
<div class="form-group">
|
|
<label class="form-label">真实姓名</label>
|
|
<div class="input-wrapper">
|
|
<div class="input-icon-left">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
|
<circle cx="12" cy="7" r="4"></circle>
|
|
</svg>
|
|
</div>
|
|
<input type="text" class="input-field" id="realName" placeholder="请输入身份证上的姓名" maxlength="20">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">身份证号</label>
|
|
<div class="input-wrapper">
|
|
<div class="input-icon-left">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<rect x="3" y="5" width="18" height="14" rx="2"></rect>
|
|
<path d="M7 10h5"></path>
|
|
<path d="M7 14h8"></path>
|
|
</svg>
|
|
</div>
|
|
<input type="text" class="input-field" id="idCard" placeholder="请输入18位身份证号码" maxlength="18">
|
|
</div>
|
|
<div class="id-info-hint">
|
|
<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>
|
|
<path d="M12 16v-4"></path>
|
|
<path d="M12 8h.01"></path>
|
|
</svg>
|
|
<span>系统将自动识别性别与出生日期</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 协议勾选 -->
|
|
<div class="agreement-row">
|
|
<div class="checkbox-custom checked" data-dom-id="agreement-checkbox">
|
|
<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>
|
|
<div class="agreement-text">
|
|
我已阅读并同意<a href="#">《实名认证服务协议》</a>和<a href="#">《个人信息授权书》</a>,同意青核对我的身份信息进行核验
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 安全提示 -->
|
|
|
|
|
|
<!-- 底部操作 -->
|
|
<div class="bottom-actions">
|
|
<button class="btn-submit" id="btnSubmit" data-dom-id="btn-submit">提交认证</button>
|
|
<button class="btn-cancel" data-dom-id="btn-cancel">稍后认证</button>
|
|
<div class="bottom-security">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>
|
|
<path d="M7 11V7a5 5 0 0 1 10 0v4"></path>
|
|
</svg>
|
|
公安系统核验 · 信息加密存储
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 加载遮罩 -->
|
|
<div class="loading-overlay" id="loadingOverlay">
|
|
<div class="loading-spinner"></div>
|
|
<div class="loading-text">正在核验身份信息...</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// 返回按钮
|
|
document.querySelector('[data-dom-id="btn-back"]').addEventListener('click', function() {
|
|
window.history.back();
|
|
});
|
|
|
|
// 稍后认证
|
|
document.querySelector('[data-dom-id="btn-cancel"]').addEventListener('click', function() {
|
|
window.history.back();
|
|
});
|
|
|
|
// 协议勾选切换
|
|
const checkbox = document.querySelector('[data-dom-id="agreement-checkbox"]');
|
|
const btnSubmit = document.getElementById('btnSubmit');
|
|
checkbox.addEventListener('click', function() {
|
|
checkbox.classList.toggle('checked');
|
|
validateForm();
|
|
});
|
|
|
|
// 身份证号格式化(每4位空格 + 仅允许数字和X)
|
|
const idCardInput = document.getElementById('idCard');
|
|
const realNameInput = document.getElementById('realName');
|
|
|
|
idCardInput.addEventListener('input', function(e) {
|
|
let value = e.target.value.toUpperCase().replace(/[^0-9X]/g, '');
|
|
e.target.value = value;
|
|
validateForm();
|
|
});
|
|
|
|
realNameInput.addEventListener('input', function() {
|
|
validateForm();
|
|
});
|
|
|
|
function validateForm() {
|
|
const nameValid = realNameInput.value.trim().length >= 2;
|
|
const idValid = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/.test(idCardInput.value);
|
|
const agreed = checkbox.classList.contains('checked');
|
|
|
|
btnSubmit.disabled = !(nameValid && idValid && agreed);
|
|
}
|
|
|
|
// 提交认证
|
|
btnSubmit.addEventListener('click', function() {
|
|
if (btnSubmit.disabled) return;
|
|
|
|
const loadingOverlay = document.getElementById('loadingOverlay');
|
|
loadingOverlay.classList.add('show');
|
|
|
|
setTimeout(function() {
|
|
loadingOverlay.classList.remove('show');
|
|
alert('认证提交成功,等待审核结果');
|
|
}, 2000);
|
|
});
|
|
|
|
// 初始校验
|
|
validateForm();
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|