feat: 更新首页,添加公告和新闻列表,优化样式和交互效果

This commit is contained in:
2026-01-16 17:32:58 +07:00
parent f045810dd4
commit c0e7102d9b
4 changed files with 418 additions and 199 deletions

View File

@@ -45,10 +45,10 @@ function goToTerms(type: "service" | "privacy") {
</div>
<!-- 主要内容区域 -->
<div class="content-wrapper">
<div class="relative z-2 h-full flex flex-col p-10 px-6 pb-5">
<!-- 顶部Logo和欢迎语 -->
<div class="header-section">
<div class="emblem">
<div class="text-center mb-10">
<div class="flex justify-center mb-5">
<div class="emblem-circle">
<div class="emblem-inner">
<div class="star">
@@ -60,16 +60,16 @@ function goToTerms(type: "service" | "privacy") {
</div>
</div>
</div>
<h1 class="welcome-title">
<h1 class="text-4xl font-bold text-[#2c3e50] mb-2 tracking-wider">
你好
</h1>
<h2 class="welcome-subtitle">
<h2 class="text-2xl font-semibold text-[#2c3e50] tracking-wide">
欢迎登录深化改革
</h2>
</div>
<!-- 登录表单 -->
<div class="form-section">
<div class="flex-1 flex flex-col gap-4 max-w-[400px] w-full mx-auto">
<!-- 手机号输入 -->
<ion-item lines="none" class="input-item">
<ion-input
@@ -98,20 +98,20 @@ function goToTerms(type: "service" | "privacy") {
</ion-item>
<!-- 协议同意 -->
<div class="agreement-section">
<div class="flex items-center gap-2 px-1">
<ion-checkbox v-model="agreed" class="agreement-checkbox" />
<span class="agreement-text">
<span class="text-xs text-[#666] leading-snug">
我已阅读并同意
<a class="link-service" @click="goToTerms('service')">服务条款</a>
<a class="text-[#c41e3a] no-underline cursor-pointer font-medium hover:underline" @click="goToTerms('service')">服务条款</a>
<a class="link-privacy" @click="goToTerms('privacy')">隐私政策</a>
<a class="text-[#c41e3a] no-underline cursor-pointer font-medium hover:underline" @click="goToTerms('privacy')">隐私政策</a>
</span>
</div>
<!-- 登录按钮 -->
<ion-button
expand="block"
class="login-button"
class="login-button mt-2"
@click="handleLogin"
>
登录
@@ -223,28 +223,7 @@ function goToTerms(type: "service" | "privacy") {
}
}
/* 内容包装器 */
.content-wrapper {
position: relative;
z-index: 2;
height: 100%;
display: flex;
flex-direction: column;
padding: 40px 24px 20px;
}
/* 头部区域 */
.header-section {
text-align: center;
margin-bottom: 40px;
}
/* 国徽 */
.emblem {
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.emblem-circle {
width: 70px;
@@ -287,34 +266,6 @@ function goToTerms(type: "service" | "privacy") {
width: 40px;
}
/* 欢迎文字 */
.welcome-title {
font-size: 32px;
font-weight: bold;
color: #2c3e50;
margin: 0 0 8px 0;
letter-spacing: 2px;
}
.welcome-subtitle {
font-size: 24px;
font-weight: 600;
color: #2c3e50;
margin: 0;
letter-spacing: 1px;
}
/* 表单区域 */
.form-section {
flex: 1;
display: flex;
flex-direction: column;
gap: 16px;
max-width: 400px;
width: 100%;
margin: 0 auto;
}
/* 输入框 */
.input-item {
--background: rgba(255, 255, 255, 0.9);
@@ -340,14 +291,6 @@ function goToTerms(type: "service" | "privacy") {
cursor: pointer;
}
/* 协议同意 */
.agreement-section {
display: flex;
align-items: center;
gap: 8px;
padding: 0 4px;
}
.agreement-checkbox {
--size: 20px;
--border-radius: 4px;
@@ -357,25 +300,6 @@ function goToTerms(type: "service" | "privacy") {
flex-shrink: 0;
}
.agreement-text {
font-size: 13px;
color: #666;
line-height: 1.4;
}
.link-service,
.link-privacy {
color: #c41e3a;
text-decoration: none;
cursor: pointer;
font-weight: 500;
}
.link-service:hover,
.link-privacy:hover {
text-decoration: underline;
}
/* 登录按钮 */
.login-button {
--background: linear-gradient(135deg, #c41e3a 0%, #8b1a2e 100%);