feat: 新增测试页面并优化用户界面及API调用
- 新增测试页面 `/test`,用于展示题目答案的交互式网格和列表布局 - 为 CompetitionLayout 组件添加标题背景类型支持,优化视觉一致性 - 更新 `fetchUpdateCurrentQuestionUse` API 参数,简化调用逻辑 - 优化用户界面细节,包括图标替换、样式调整和布局改进
This commit is contained in:
@ -134,7 +134,8 @@ onMounted(async () => {
|
||||
|
||||
<template>
|
||||
<CompetitionLayout
|
||||
:show-back="true" :show-next="showNextButton" :title="activityName" @back="handleBack"
|
||||
:show-back="true" :show-next="showNextButton" :title="activityName" :title-bg-type="2"
|
||||
@back="handleBack"
|
||||
@next="handleNext"
|
||||
>
|
||||
<div class="h-screen w-full overflow-y-auto font-sans">
|
||||
|
||||
@ -70,24 +70,15 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<CompetitionLayout
|
||||
:show-back="true"
|
||||
:show-next="isAllEnd"
|
||||
next-btn-text="查看队伍结果"
|
||||
title="展示组别"
|
||||
@back="handleBack"
|
||||
@next="handleNext"
|
||||
:show-back="true" :show-next="isAllEnd" next-btn-text="查看队伍结果" :title-bg-type="2"
|
||||
title="展示组别" @back="handleBack" @next="handleNext"
|
||||
>
|
||||
<!-- Groups Grid -->
|
||||
<div class="groups-container">
|
||||
<TransitionGroup name="list-anim" tag="div" class="groups-grid">
|
||||
<div
|
||||
v-for="(item, index) in groups"
|
||||
v-show="showContent"
|
||||
:key="item.Id"
|
||||
class="group-item"
|
||||
:class="{ 'is-disabled': item.IsEnd }"
|
||||
:style="{ '--delay': `${index * 0.05}s` }"
|
||||
@click="selectGroup(item)"
|
||||
v-for="(item, index) in groups" v-show="showContent" :key="item.Id" class="group-item"
|
||||
:class="{ 'is-disabled': item.IsEnd }" :style="{ '--delay': `${index * 0.05}s` }" @click="selectGroup(item)"
|
||||
>
|
||||
<div class="icon-wrapper">
|
||||
<div class="flower-bg" />
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,8 +62,6 @@ function handleNext() {
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/styles/scss/variables.scss';
|
||||
|
||||
.rules-content-wrapper {
|
||||
width: 100%;
|
||||
max-height: 80%;
|
||||
@ -76,7 +74,6 @@ function handleNext() {
|
||||
margin-top: 10px;
|
||||
font-size: 28px;
|
||||
line-height: 2;
|
||||
// color: #5d4037; // Dark brown/grey text
|
||||
|
||||
.intro-text {
|
||||
margin-bottom: 30px;
|
||||
|
||||
Reference in New Issue
Block a user