feat(user): 重构用户端竞赛流程并添加新页面

- 将原单页竞赛流程拆分为独立路由页面(首页、封面、规则、抽题、答题、图解、组别、队伍)
- 新增 Pinia store 管理竞赛状态、计时器和音频控制
- 添加 SCSS 变量文件定义主题色
- 更新路由配置和类型定义以支持新页面结构
- 重构 QuestionRenderer 组件优化样式
- 添加图标依赖并更新国际化配置
- 移动图片资源到用户目录并清理旧文件
This commit is contained in:
2026-02-06 17:45:44 +08:00
parent ca42c6a876
commit b71a758474
39 changed files with 1559 additions and 486 deletions

View File

@ -0,0 +1,41 @@
<script setup lang="ts">
import { computed } from 'vue'
import CompetitionLayout from '@/components/custom/user/CompetitionLayout.vue'
import { useRouterPush } from '@/hooks/common/router'
import { useCompetitionStore } from '@/store/modules/competition'
const { routerPushByKey } = useRouterPush()
const store = useCompetitionStore()
const currentNode = computed(() => store.currentNode)
function handleDraw() {
routerPushByKey('user_game')
}
function handleBack() {
routerPushByKey('user_cover')
}
</script>
<template>
<CompetitionLayout :show-back="true" :show-next="false" :title="currentNode?.moduleName || '抽题'" @back="handleBack">
<div class="h-full w-full flex flex-col items-center pt-10 font-sans">
<div v-if="currentNode" class="mb-20 max-w-4xl text-center">
<div class="text-2xl text-gray-800 font-medium leading-relaxed tracking-wide">
{{ currentNode.description }}
</div>
</div>
<!-- 抽题按钮 (大圆形) -->
<div class="group relative">
<button
class="h-64 w-64 flex flex-col items-center justify-center border-4 border-blue-400 rounded-full bg-gray-200/80 text-3xl text-gray-700 font-bold shadow-xl transition-all active:scale-95 hover:scale-105"
@click="handleDraw"
>
<span>抽题</span>
</button>
</div>
</div>
</CompetitionLayout>
</template>