2025-08-10 22:49:43 +08:00

142 lines
2.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="not-found">
<div class="container">
<div class="not-found-content">
<div class="error-image">
<n-icon size="120" color="#ccc">
<AlertCircleOutline />
</n-icon>
</div>
<h1>404</h1>
<h2>页面未找到</h2>
<p>抱歉您访问的页面不存在或已被移除</p>
<div class="actions">
<n-button type="primary" size="large" @click="$router.push('/')">
返回首页
</n-button>
<n-button size="large" @click="$router.back()">
返回上页
</n-button>
</div>
<div class="suggestions">
<h3>您可能想要</h3>
<ul>
<li><a href="/">浏览首页</a></li>
<li><a href="/courses">查看课程</a></li>
<li><a href="/login">登录账户</a></li>
</ul>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { AlertCircleOutline } from '@vicons/ionicons5'
</script>
<style scoped>
.not-found {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: #f8f9fa;
}
.not-found-content {
text-align: center;
max-width: 500px;
padding: 40px;
}
.error-image {
margin-bottom: 32px;
}
h1 {
font-size: 6rem;
font-weight: bold;
color: #18a058;
margin: 0;
line-height: 1;
}
h2 {
font-size: 2rem;
color: #333;
margin: 16px 0;
}
p {
font-size: 1.1rem;
color: #666;
margin-bottom: 32px;
line-height: 1.6;
}
.actions {
display: flex;
gap: 16px;
justify-content: center;
margin-bottom: 40px;
}
.suggestions {
text-align: left;
background: white;
padding: 24px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.suggestions h3 {
margin: 0 0 16px;
color: #333;
font-size: 1.2rem;
}
.suggestions ul {
list-style: none;
padding: 0;
margin: 0;
}
.suggestions li {
margin-bottom: 8px;
}
.suggestions a {
color: #18a058;
text-decoration: none;
transition: color 0.3s;
}
.suggestions a:hover {
color: #0c7a43;
text-decoration: underline;
}
@media (max-width: 768px) {
.not-found-content {
padding: 20px;
}
h1 {
font-size: 4rem;
}
h2 {
font-size: 1.5rem;
}
.actions {
flex-direction: column;
align-items: center;
}
}
</style>