284 lines
5.8 KiB
Vue
284 lines
5.8 KiB
Vue
<template>
|
||
<div class="not-found-page">
|
||
<div class="not-found-container">
|
||
<div class="not-found-content">
|
||
<!-- 404 大标题 -->
|
||
<div class="error-code">404</div>
|
||
|
||
<!-- 图标 -->
|
||
<div class="error-icon">
|
||
<Icon name="alert-circle" size="xxl" color="#6B6B6B" />
|
||
</div>
|
||
|
||
<!-- 错误信息 -->
|
||
<h1 class="error-title">页面未找到</h1>
|
||
<p class="error-description">
|
||
抱歉,您访问的页面不存在或已被移除
|
||
</p>
|
||
|
||
<!-- 操作按钮 -->
|
||
<div class="error-actions">
|
||
<button class="btn btn-primary" @click="goHome">
|
||
<Icon name="home" size="sm" style="margin-right: 8px;" />
|
||
返回首页
|
||
</button>
|
||
<button class="btn btn-secondary" @click="goBack">
|
||
<Icon name="arrow-left" size="sm" style="margin-right: 8px;" />
|
||
返回上一页
|
||
</button>
|
||
</div>
|
||
|
||
<!-- 建议链接 -->
|
||
<div class="helpful-links">
|
||
<p class="links-title">您可能想访问:</p>
|
||
<div class="links-grid">
|
||
<router-link to="/" class="link-item">
|
||
<Icon name="grid" size="sm" />
|
||
<span>工作台</span>
|
||
</router-link>
|
||
<router-link to="/tasks" class="link-item">
|
||
<Icon name="clipboard" size="sm" />
|
||
<span>任务大厅</span>
|
||
</router-link>
|
||
<router-link to="/my-tasks" class="link-item">
|
||
<Icon name="check-circle" size="sm" />
|
||
<span>我的任务</span>
|
||
</router-link>
|
||
<router-link to="/designer-hall" class="link-item">
|
||
<Icon name="users" size="sm" />
|
||
<span>设计师大厅</span>
|
||
</router-link>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
import { useRouter } from 'vue-router'
|
||
import Icon from '@/components/Icon.vue'
|
||
|
||
const router = useRouter()
|
||
|
||
// 返回首页
|
||
const goHome = () => {
|
||
router.push('/')
|
||
}
|
||
|
||
// 返回上一页
|
||
const goBack = () => {
|
||
router.back()
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
@import '@/styles/variables.scss';
|
||
|
||
.not-found-page {
|
||
min-height: 100vh;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: $bg-primary;
|
||
padding: 20px;
|
||
}
|
||
|
||
.not-found-container {
|
||
width: 100%;
|
||
max-width: 600px;
|
||
}
|
||
|
||
.not-found-content {
|
||
text-align: center;
|
||
animation: fadeInUp 0.6s ease-out;
|
||
}
|
||
|
||
// 404大标题
|
||
.error-code {
|
||
font-size: 120px;
|
||
font-weight: 800;
|
||
background: linear-gradient(135deg, $brand-primary, $brand-hover);
|
||
-webkit-background-clip: text;
|
||
-webkit-text-fill-color: transparent;
|
||
background-clip: text;
|
||
line-height: 1;
|
||
margin-bottom: 20px;
|
||
font-family: 'Arial Black', sans-serif;
|
||
letter-spacing: -5px;
|
||
animation: scaleIn 0.5s ease-out;
|
||
}
|
||
|
||
// 图标
|
||
.error-icon {
|
||
margin-bottom: 24px;
|
||
animation: bounce 0.8s ease-in-out;
|
||
animation-delay: 0.2s;
|
||
animation-fill-mode: both;
|
||
}
|
||
|
||
// 标题
|
||
.error-title {
|
||
font-size: 28px;
|
||
font-weight: $font-weight-bold;
|
||
color: $text-primary;
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
// 描述
|
||
.error-description {
|
||
font-size: 16px;
|
||
color: $text-secondary;
|
||
margin-bottom: 32px;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
// 操作按钮
|
||
.error-actions {
|
||
display: flex;
|
||
gap: 12px;
|
||
justify-content: center;
|
||
margin-bottom: 48px;
|
||
|
||
.btn {
|
||
padding: 12px 24px;
|
||
font-size: 14px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border-radius: $radius-md;
|
||
transition: all 0.2s ease;
|
||
cursor: pointer;
|
||
border: none;
|
||
|
||
&.btn-primary {
|
||
background: $brand-primary;
|
||
color: white;
|
||
|
||
&:hover {
|
||
background: lighten($brand-primary, 5%);
|
||
transform: translateY(-2px);
|
||
box-shadow: 0 4px 12px rgba($brand-primary, 0.3);
|
||
}
|
||
}
|
||
|
||
&.btn-secondary {
|
||
background: $bg-tertiary;
|
||
color: $text-primary;
|
||
|
||
&:hover {
|
||
background: lighten($bg-tertiary, 3%);
|
||
transform: translateY(-2px);
|
||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||
}
|
||
}
|
||
|
||
&:active {
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
}
|
||
|
||
// 建议链接
|
||
.helpful-links {
|
||
padding-top: 32px;
|
||
border-top: 1px solid $border-primary;
|
||
|
||
.links-title {
|
||
font-size: 14px;
|
||
color: $text-secondary;
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.links-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, 1fr);
|
||
gap: 12px;
|
||
|
||
.link-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 12px 16px;
|
||
background: $bg-secondary;
|
||
border: 1px solid $border-primary;
|
||
border-radius: $radius-md;
|
||
color: $text-primary;
|
||
text-decoration: none;
|
||
transition: all 0.2s ease;
|
||
|
||
&:hover {
|
||
background: $bg-tertiary;
|
||
border-color: $brand-primary;
|
||
color: $brand-primary;
|
||
transform: translateY(-2px);
|
||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||
}
|
||
|
||
span {
|
||
font-size: 14px;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// 动画
|
||
@keyframes fadeInUp {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(30px);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
@keyframes scaleIn {
|
||
from {
|
||
opacity: 0;
|
||
transform: scale(0.8);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: scale(1);
|
||
}
|
||
}
|
||
|
||
@keyframes bounce {
|
||
0%, 100% {
|
||
transform: translateY(0);
|
||
}
|
||
50% {
|
||
transform: translateY(-10px);
|
||
}
|
||
}
|
||
|
||
// 响应式设计
|
||
@media (max-width: 768px) {
|
||
.error-code {
|
||
font-size: 80px;
|
||
}
|
||
|
||
.error-title {
|
||
font-size: 24px;
|
||
}
|
||
|
||
.error-description {
|
||
font-size: 14px;
|
||
}
|
||
|
||
.error-actions {
|
||
flex-direction: column;
|
||
|
||
.btn {
|
||
width: 100%;
|
||
}
|
||
}
|
||
|
||
.helpful-links .links-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
</style>
|