refactor: 移除用户应用相关代码和资源文件

清理未使用的用户应用代码、资源文件和配置
更新管理后台的路由和国际化配置
This commit is contained in:
2026-01-16 18:02:48 +08:00
parent b7ec446f19
commit 77315b36ed
209 changed files with 86 additions and 13988 deletions

View File

@ -0,0 +1,84 @@
<script setup lang="ts">
import type { CompetitionItem } from './data'
import { NButton, NCard, NTag } from 'naive-ui'
import { computed } from 'vue'
interface Props {
item: CompetitionItem
}
const props = defineProps<Props>()
// 状态配置:颜色和文本
const statusConfig = computed(() => {
if (props.item.status === 'ongoing') {
return { type: 'success', text: '进行中', bgClass: 'bg-green-100 text-green-600' }
}
return { type: 'default', text: '未开始', bgClass: 'bg-gray-100 text-gray-500' }
})
// 处理标题换行
const formattedTitle = computed(() => props.item.title.replace(/\n/g, '<br/>'))
</script>
<template>
<NCard
:bordered="false"
class="group relative h-full overflow-hidden rounded-2xl transition-all duration-300 hover:shadow-lg"
content-style="padding: 24px; display: flex; flex-direction: column; height: 100%;"
>
<!-- 特殊背景装饰 (仅高亮卡片显示) -->
<div
v-if="item.isHighlight"
class="pointer-events-none absolute right-0 top-0 z-0 h-32 w-32 rounded-bl-full bg-blue-50/80 -mr-8 -mt-8"
/>
<div class="relative z-10 h-full flex flex-col justify-between">
<!-- 顶部内容 -->
<div>
<!-- 状态标签 -->
<div class="mb-4">
<NTag
:bordered="false"
size="small"
round
class="px-3 font-medium" :class="[statusConfig.bgClass]"
>
{{ statusConfig.text }}
</NTag>
</div>
<!-- 标题 -->
<h3
class="mb-3 min-h-[3rem] text-lg text-gray-800 font-bold leading-tight dark:text-white"
v-html="formattedTitle"
/>
<!-- 日期 -->
<div class="mb-6 flex items-center text-sm text-gray-400">
<div class="i-carbon-calendar mr-2 text-base" />
<span>{{ item.date }}</span>
</div>
</div>
<!-- 底部内容 -->
<div class="flex items-center justify-between border-t border-gray-50 pt-4 dark:border-gray-800">
<span class="text-xs text-gray-500 font-medium">
{{ item.teamCount }} 支参赛队伍
</span>
<NButton
text
type="primary"
size="small"
class="font-bold hover:underline"
>
查看配置详情
</NButton>
</div>
</div>
</NCard>
</template>
<style scoped>
/* 可选:微调样式 */
</style>

View File

@ -0,0 +1,70 @@
// src/views/competition/modules/data.ts
export interface CompetitionItem {
id: string
title: string
date: string
teamCount: number
status: 'ongoing' | 'pending' // ongoing: 进行中, pending: 未开始
isHighlight?: boolean // 用于标记第一个卡片的特殊背景
}
export const competitionList: CompetitionItem[] = [
{
id: '1',
title: '阅读之星大赛\n辞海遨游环节', // 使用换行符或在组件中处理换行
date: '2026.01.12',
teamCount: 40,
status: 'ongoing',
isHighlight: true,
},
{
id: '2',
title: '诗词大会总决赛',
date: '2026.01.12',
teamCount: 32,
status: 'pending',
},
{
id: '3',
title: '趣味百科大作战',
date: '2026.01.12',
teamCount: 32,
status: 'pending',
},
{
id: '4',
title: '经典文学研读周',
date: '2026.01.12',
teamCount: 32,
status: 'pending',
},
{
id: '5',
title: '未来科学家阅读赛',
date: '2026.01.12',
teamCount: 32,
status: 'pending',
},
{
id: '6',
title: '历史人文知识赛',
date: '2026.01.12',
teamCount: 32,
status: 'pending',
},
{
id: '7',
title: '少儿绘本创意营',
date: '2026.01.12',
teamCount: 32,
status: 'pending',
},
{
id: '8',
title: '唐诗三百首挑战',
date: '2026.01.12',
teamCount: 32,
status: 'pending',
},
]