Files
MrleeAdmin/frontend/web/app/pages/index.vue
T

399 lines
11 KiB
Vue
Raw Normal View History

2026-01-16 22:04:12 +08:00
<template>
<div class="page-container">
2026-04-07 11:01:11 +08:00
<div class="page-header">
</div>
2026-01-16 22:04:12 +08:00
<!-- 轮播图区域 -->
<section class="hero-section">
<el-carousel height="500px" arrow="never" indicator-position="none">
<el-carousel-item>
<div class="hero-background"></div>
</el-carousel-item>
</el-carousel>
</section>
<!-- 主要内容区域 -->
<section class="content-section">
<div class="content-container">
<!-- 标题区域 -->
<div class="section-header">
<h1 class="section-title">文档管理</h1>
<p class="section-subtitle">无论是快速上手,还是深入了解框架,这里都是最好的地点</p>
</div>
<!-- 功能卡片区域 -->
<div class="features-grid">
<div class="feature-card">
<div class="feature-header">
<div class="feature-icon">
<img src="@/assets/images/index/course.jpg" alt="官方教程" />
</div>
<h3 class="feature-title">官方教程</h3>
</div>
<p class="feature-description">详尽细致的逐步官方教程,帮助您系统全面地接触Madong,建议在使用前阅读。</p>
2026-04-07 11:01:11 +08:00
<NuxtLink to="https://madong.tech/docs" target="_blank" class="feature-link">
2026-01-16 22:04:12 +08:00
<el-button type="primary" class="w-full">
<span>前往教程</span>
<el-icon class="ml-2"><ArrowRight /></el-icon>
</el-button>
</NuxtLink>
</div>
<div class="feature-card">
<div class="feature-header">
<div class="feature-icon">
<img src="@/assets/images/index/api.jpg" alt="API文档" />
</div>
<h3 class="feature-title">API文档</h3>
</div>
2026-01-19 17:32:23 +08:00
<p class="feature-description">通过API文档了解Madong的正确使用方法,深入理解其运行逻辑和接口规范。</p>
<NuxtLink to="https://demo.madong.tech/adminapi/openapi" target="_blank" class="feature-link">
<el-button type="primary" class="w-full">
2026-01-16 22:04:12 +08:00
<span>前往API文档</span>
<el-icon class="ml-2"><ArrowRight /></el-icon>
</el-button>
2026-01-19 17:32:23 +08:00
</NuxtLink>
<!-- <div class="feature-link">
<el-button type="primary" class="w-full">
<span>前往API文档</span>
<el-icon class="ml-2"><ArrowRight /></el-icon>
</el-button>
</div> -->
2026-01-16 22:04:12 +08:00
</div>
<div class="feature-card">
<div class="feature-header">
<div class="feature-icon">
<img src="@/assets/images/index/community.jpg" alt="问答社区" />
</div>
<h3 class="feature-title">问答社区</h3>
</div>
<p class="feature-description">浏览其他用户的问题和解答,获取使用技巧,遇到问题也可以随时提问交流。</p>
2026-04-07 11:01:11 +08:00
<NuxtLink to="https://madong.tech/ask" target="_blank" class="feature-link">
2026-01-16 22:04:12 +08:00
<el-button type="primary" class="w-full">
<span>前往问答社区</span>
<el-icon class="ml-2"><ArrowRight /></el-icon>
</el-button>
</NuxtLink>
</div>
<div class="feature-card">
<div class="feature-header">
<div class="feature-icon">
<img src="@/assets/images/index/wx.jpg" alt="关注公众号" />
</div>
<h3 class="feature-title">关注公众号</h3>
</div>
<p class="feature-description">您可以扫描页面底部的二维码来关注我们的官方公众号,获得一手咨询及使用技巧。</p>
<div class="feature-link">
<el-button type="info" class="w-full" plain>
<span>查看二维码</span>
<el-icon class="ml-2"><ChatDotRound /></el-icon>
</el-button>
</div>
</div>
</div>
</div>
</section>
2026-04-07 11:01:11 +08:00
<!-- 右侧悬浮广告 -->
<Advertisement
type="simple"
:offset="0"
:limit="5"
/>
2026-01-16 22:04:12 +08:00
</div>
</template>
<script lang="ts" setup>
import { ArrowRight, ChatDotRound } from '@element-plus/icons-vue'
2026-04-07 11:01:11 +08:00
import Advertisement from '~/components/advertisement'
2026-01-16 22:04:12 +08:00
</script>
<style lang="scss" scoped>
.page-container {
min-height: 100vh;
background: #ffffff;
}
.hero-section {
width: 100%;
.el-carousel {
border-radius: 0;
}
.hero-background {
height: 500px;
background-image: url('@/assets/images/index/index_carousel.jpeg');
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
}
}
.content-section {
background-image: url('@/assets/images/index/section.png');
background-size: 100%;
background-repeat: no-repeat;
padding: 60px 0 200px;
}
2026-04-07 11:01:11 +08:00
.ad-section {
width: 100%;
background: linear-gradient(135deg, #f8f9ff 0%, #fff5f7 100%);
position: relative;
overflow: hidden;
// 装饰性背景
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image:
radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
radial-gradient(circle at 80% 50%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
pointer-events: none;
}
.ad-container {
max-width: 1400px;
margin: 0 auto;
padding: 40px 40px;
position: relative;
z-index: 1;
}
&.ad-section-top {
padding: 32px 0;
}
&.ad-section-middle {
padding: 48px 0;
margin: 60px 0;
}
&.ad-section-bottom {
padding: 48px 0;
}
}
2026-01-16 22:04:12 +08:00
.content-container {
max-width: 1400px; // 增加整体宽度以容纳4个容器
margin: 0 auto;
padding: 0 40px; // 增加边距以适应更宽的内容
}
.section-header {
text-align: center;
margin-bottom: 100px;
.section-title {
font-size: 40px;
font-weight: bold;
color: #666666;
margin-bottom: 20px;
line-height: 1.2;
}
.section-subtitle {
font-size: 16px;
color: #666666;
line-height: 1.5;
}
}
.features-grid {
display: grid;
grid-template-columns: repeat(4, 1fr); // PC端固定4列
gap: 30px; // 调整间距以适应4列布局
justify-content: center;
}
.feature-card {
background: #ffffff;
border-radius: 12px;
padding: 25px; // 调整内边距以适应更小的容器
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
transition: all 0.3s ease;
border: 1px solid #f0f0f0;
&:hover {
transform: translateY(-4px);
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
}
.feature-header {
display: flex;
align-items: center;
margin-bottom: 20px; // 调整间距
.feature-icon {
width: 28px; // 稍微缩小图标
height: 28px;
margin-right: 10px;
img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 4px;
}
}
.feature-title {
font-size: 18px; // 稍微缩小标题字体
font-weight: bold;
color: #666666;
margin: 0;
}
}
.feature-description {
font-size: 13px; // 稍微缩小描述字体
color: #666666;
line-height: 20px;
margin-bottom: 25px;
min-height: 80px; // 调整最小高度
}
.feature-link {
display: block;
.el-button {
border-radius: 6px;
height: 36px; // 调整按钮高度
font-size: 13px; // 调整按钮字体
:deep(.el-icon) {
font-size: 14px; // 调整图标大小
}
}
}
// 平板端适配 (768px - 1024px)
@media (max-width: 1024px) and (min-width: 769px) {
.content-container {
max-width: 100%;
padding: 0 30px;
}
.features-grid {
grid-template-columns: repeat(2, 1fr); // 平板端显示2列
gap: 25px;
}
.section-header {
margin-bottom: 80px;
.section-title {
font-size: 36px;
}
}
}
// 移动端适配 (768px以下)
@media (max-width: 768px) {
.content-container {
max-width: 100%;
padding: 0 20px;
}
2026-04-07 11:01:11 +08:00
2026-01-16 22:04:12 +08:00
.section-header {
margin-bottom: 60px;
2026-04-07 11:01:11 +08:00
2026-01-16 22:04:12 +08:00
.section-title {
font-size: 32px;
}
}
2026-04-07 11:01:11 +08:00
2026-01-16 22:04:12 +08:00
.features-grid {
grid-template-columns: 1fr; // 移动端显示1列
gap: 20px;
}
2026-04-07 11:01:11 +08:00
2026-01-16 22:04:12 +08:00
.feature-card {
padding: 20px;
}
2026-04-07 11:01:11 +08:00
2026-01-16 22:04:12 +08:00
.hero-section .hero-background {
height: 300px;
}
2026-04-07 11:01:11 +08:00
2026-01-16 22:04:12 +08:00
.content-section {
padding: 40px 0 120px;
}
2026-04-07 11:01:11 +08:00
2026-01-16 22:04:12 +08:00
.feature-header {
.feature-icon {
width: 30px;
height: 30px;
}
2026-04-07 11:01:11 +08:00
2026-01-16 22:04:12 +08:00
.feature-title {
font-size: 18px;
}
}
2026-04-07 11:01:11 +08:00
2026-01-16 22:04:12 +08:00
.feature-description {
font-size: 14px;
min-height: auto; // 移动端取消固定高度
}
2026-04-07 11:01:11 +08:00
.ad-section {
.ad-container {
padding: 24px 20px;
}
&.ad-section-top {
padding: 24px 0;
}
&.ad-section-middle {
padding: 32px 0;
margin: 32px 0;
}
&.ad-section-bottom {
padding: 32px 0;
}
}
2026-01-16 22:04:12 +08:00
}
// 超大屏幕适配 (1400px以上)
@media (min-width: 1400px) {
.content-container {
max-width: 1400px;
}
}
// 小屏幕手机适配 (480px以下)
@media (max-width: 480px) {
.content-container {
padding: 0 16px;
}
.section-header {
margin-bottom: 40px;
.section-title {
font-size: 28px;
}
.section-subtitle {
font-size: 14px;
}
}
.features-grid {
gap: 16px;
}
.feature-card {
padding: 16px;
}
}
</style>