feat: 新增测试页面并优化用户界面及API调用
- 新增测试页面 `/test`,用于展示题目答案的交互式网格和列表布局 - 为 CompetitionLayout 组件添加标题背景类型支持,优化视觉一致性 - 更新 `fetchUpdateCurrentQuestionUse` API 参数,简化调用逻辑 - 优化用户界面细节,包括图标替换、样式调整和布局改进
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { NCarousel } from 'naive-ui'
|
||||
import { NCarousel, NImage } from 'naive-ui'
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import beacon from '@/assets/imgs/user/event-card-bg-icon.svg'
|
||||
import CompetitionLayout from '@/components/custom/user/CompetitionLayout.vue'
|
||||
import { useRouterPush } from '@/hooks/common/router'
|
||||
import { fetchGetActivityList } from '@/service/api/competition'
|
||||
@ -81,7 +82,8 @@ onMounted(() => {
|
||||
<template>
|
||||
<CompetitionLayout
|
||||
:show-back="false" :show-next="false" title="赛事总览" action-position="top" back-btn-text="返回"
|
||||
btn-theme="light" @back="handleBack" @next="handleNext"
|
||||
btn-theme="light" :title-bg-type="2" @back="handleBack"
|
||||
@next="handleNext"
|
||||
>
|
||||
<!-- Cards Section -->
|
||||
<div class="cards-container">
|
||||
@ -106,7 +108,11 @@ onMounted(() => {
|
||||
<div class="card-top-bar" />
|
||||
<div class="card-body">
|
||||
<div class="icon-wrapper">
|
||||
<SvgIcon :local-icon="item.icon" class="event-icon" />
|
||||
<NImage
|
||||
:src="beacon"
|
||||
preview-disabled
|
||||
object-fit="contain"
|
||||
/>
|
||||
</div>
|
||||
<div class="text-content">
|
||||
<h3 class="event-title">
|
||||
@ -168,20 +174,12 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.icon-wrapper {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
border-radius: 50%;
|
||||
width: 170px;
|
||||
height: 161px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 30px;
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
|
||||
|
||||
.event-icon {
|
||||
font-size: 48px;
|
||||
color: $secondary-color;
|
||||
}
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.text-content {
|
||||
@ -203,8 +201,8 @@ onMounted(() => {
|
||||
transform: translateY(-10px);
|
||||
|
||||
.icon-wrapper {
|
||||
transform: scale(1.1) rotate(5deg);
|
||||
transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
transform: scale(1.1) rotate(2deg);
|
||||
transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user