GST002_H5
JayChou 4 days ago
parent 5ed2084163
commit 621f128be3
  1. 1
      .env.development
  2. 4
      src/Layout/footer/index.vue
  3. 7
      src/api/race.ts
  4. BIN
      src/assets/images/newsList.png
  5. 4
      src/main.ts
  6. 20
      src/router/module/constRouter/index.ts
  7. 211
      src/views/answer/index.vue
  8. 166
      src/views/home/index.vue
  9. 15
      src/views/raceInfo/index.vue
  10. 263
      src/views/raceProject/index.vue
  11. 3
      src/views/registrationPersonage/index.vue
  12. 17
      src/views/userInfo/components/reacList.vue

@ -2,6 +2,7 @@
NODE_ENV = 'development'
VITE_APP_TITLE = '教学一体化平台'
VITE_APP_BASE_API = http://localhost:18085/jeecg-boot
# VITE_APP_BASE_API = http://localhost:18085/jeecg-boot
# VITE_APP_BASE_API = 'http://127.0.0.1:8080'
VITE_APP_BASE_API_JEECG = '/student'
VITE_APP_PC_URL = http://115.190.99.211:803/#/home

@ -1,12 +1,12 @@
<template>
<div class="footer" :class="{ 'dark-layout': useThemeStore.isDark }">
<div class="footer-nav">
<!-- <div class="footer-nav">
<div v-for="item in NewList" :key="item.id" @click="toNewsDetail(item.id)">
<div class="item">
{{ item.title }}
</div>
</div>
</div>
</div> -->
<div class="copyright">源码自然版权所有@2023 湘豫CP备 19005950-1</div>
<div class="report">
违法和不良信息举报 举报电话0xxx-8xxxxxxx 举报邮箱xxxxxxxxx@qq.com

@ -7,6 +7,13 @@ export const getRaceProjectList = (params: any) => {
params,
})
}
// 获取年度比赛项目列表
export const getannualCompPointList = (params: any) => {
return request({
url: '/AnnualCompPoint/annualCompPoint/list',
params,
})
}
// 获取年度比赛列表
export const getYearRaceList = (params: any) => {
return request({

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

@ -59,8 +59,8 @@ const pcHost = new URL(import.meta.env.VITE_APP_PC_URL).host
if (isMobile && currentHost !== mobileHost) {
console.log('手机端,跳转到移动站')
location.href = import.meta.env.VITE_APP_MOBILE_URL
// location.href = import.meta.env.VITE_APP_MOBILE_URL
} else if (!isMobile && currentHost !== pcHost) {
console.log('电脑端,跳转到 PC 站')
location.href = import.meta.env.VITE_APP_PC_URL
// location.href = import.meta.env.VITE_APP_PC_URL
}

@ -180,5 +180,25 @@ export const constRouter: any = {
hidden: true,
},
},
{
path: '/raceProject',
name: 'RaceProject',
component: () => import('@/views/raceProject/index.vue'),
meta: {
icon: '',
title: '选择项目',
hidden: true,
},
},
{
path: '/answer',
name: 'Answer',
component: () => import('@/views/answer/index.vue'),
meta: {
icon: '',
title: '答题',
hidden: true,
},
},
],
}

@ -0,0 +1,211 @@
<template>
<div class="question-card">
<!-- 顶部状态栏 -->
<div class="header">
<div class="timer"> 00:04</div>
<div class="progress">{{ current + 1 }}/{{ total }}</div>
</div>
<!-- 题型 -->
<div class="type">单选题</div>
<div class="type" style="margin-left: 10px;">史记</div>
<!-- 题干 -->
<div class="question">
{{ questions[current].question }}
</div>
<!-- 选项 -->
<div class="options">
<div
v-for="option in questions[current].options"
:key="option.key"
class="option"
:class="{ selected: answers[current] === option.key }"
@click="selectOption(option.key)"
>
<div class="key">{{ option.key }}</div>
<div class="text">{{ option.text }}</div>
</div>
</div>
<!-- 底部按钮 -->
<div class="footer-buttons">
<button @click="goBack">返回</button>
<button :disabled="current === 0" @click="prevQuestion">上一题</button>
<button :disabled="current === total - 1" @click="nextQuestion">下一题</button>
<button class="submit" @click="submit">提交</button>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue'
import {ElMessage} from 'element-plus'
import { useRouter } from 'vue-router'
const router = useRouter()
//
const questions = ref([
{
question: '关于中国古代公文制度,下列说法不正确的是:',
options: [
{ key: 'A', text: '押署制度是一种公文用印制度' },
{ key: 'B', text: '贴黄制度是一种公文改错制度' },
{ key: 'C', text: '票拟制度是一种公文分级保密制度' },
{ key: 'D', text: '驳传制度是一种接待往来官员和负责公文传递事务的制度' },
]
},
{
question: '下列哪项不是唐代科举考试的内容?',
options: [
{ key: 'A', text: '明经' },
{ key: 'B', text: '进士' },
{ key: 'C', text: '武举' },
{ key: 'D', text: '八股文' },
]
}
])
const total = questions.value.length
const current = ref(0)
const answers = ref(Array(total).fill(null)) //
function selectOption(key) {
answers.value[current.value] = key
}
function prevQuestion() {
if (current.value > 0) current.value--
}
function nextQuestion() {
if (current.value < total - 1) current.value++
}
function goBack() {
router.push('/user-info')
}
function submit() {
console.log('提交答案', answers.value)
ElMessage.success('提交成功')
router.push('/user-info')
}
</script>
<style lang="scss" scoped>
.question-card {
background: #f8f9fc;
padding: 16px;
border-radius: 10px;
font-family: sans-serif;
// width: 400px;
margin-top: 80px;
height: 100vh;
.header {
display: flex;
justify-content: space-between;
font-size: 14px;
color: #555;
margin-bottom: 8px;
}
.type {
font-size: 12px;
color: #2f80ed;
border: 1px solid #2f80ed;
padding: 2px 6px;
border-radius: 6px;
margin-bottom: 12px;
display: inline-block;
}
.question {
font-size: 15px;
font-weight: 600;
color: #333;
margin-bottom: 14px;
}
.options {
display: flex;
flex-direction: column;
gap: 10px;
.option {
display: flex;
gap: 10px;
align-items: center;
padding: 10px;
border: 1px solid #ccc;
border-radius: 8px;
background: #fff;
cursor: pointer;
&.selected {
border-color: #6fcf97;
background-color: #eafaf1;
.key {
background: #6fcf97;
color: #fff;
}
}
.key {
width: 24px;
height: 24px;
border: 1px solid #ccc;
border-radius: 50%;
text-align: center;
line-height: 22px;
font-weight: bold;
flex-shrink: 0;
}
.text {
font-size: 14px;
flex: 1;
color: #333;
line-height: 20px;
}
}
}
.footer-buttons {
display: flex;
justify-content: space-between;
margin-top: 20px;
gap: 8px;
button {
flex: 1;
padding: 10px 0;
font-size: 14px;
border: none;
border-radius: 6px;
background-color: #eee;
color: #333;
cursor: pointer;
transition: 0.2s;
&:hover:not(:disabled) {
background-color: #ddd;
}
&:disabled {
background-color: #ccc;
cursor: not-allowed;
}
&.submit {
background-color: #34a853;
color: #fff;
&:hover {
background-color: #2f9d45;
}
}
}
}
}
</style>

@ -1,8 +1,12 @@
<template>
<div
:class="{
'container-1420': useThemeStore.currentTheme.name !== '白蓝主题' && useThemeStore.currentTheme.name !== '白紫主题',
'container-100': useThemeStore.currentTheme.name === '白蓝主题' || useThemeStore.currentTheme.name === '白紫主题',
'container-1420':
useThemeStore.currentTheme.name !== '白蓝主题' &&
useThemeStore.currentTheme.name !== '白紫主题',
'container-100':
useThemeStore.currentTheme.name === '白蓝主题' ||
useThemeStore.currentTheme.name === '白紫主题',
}"
v-if="isLoading"
>
@ -71,7 +75,62 @@
</ul>
</div>
<!-- 新闻列表 -->
<!-- 新闻列表 -->
<div
class="news-list"
:class="{
'light-blue-news': useThemeStore.currentTheme.name === '白蓝主题',
'light-purple-news': useThemeStore.currentTheme.name === '白紫主题',
}"
>
<div class="news-title">
<div class="top">
<div>新闻资讯</div>
<div @click="router.push('/news')">
<el-icon><ArrowRightBold /></el-icon>
</div>
</div>
<!-- <div class="bottom">30+项目登陆后报名</div> -->
</div>
<div class="newa-panel">
<div class="newa-main">
<div
class="right"
:class="{
'full-width': useThemeStore.currentTheme.name === '暗夜绿主题',
}"
>
<div class="title">{{ newInfo.name }}</div>
<div class="description">
<!-- 我是新闻描述,我是新闻描述,我是新闻描述 -->
</div>
<div class="newa-main-list">
<ul>
<li
v-for="item in childrenNewList"
:key="item.id"
@click="toNewsDetail(item.id)"
>
<div
class="img"
v-if="
useThemeStore.currentTheme.name === '白蓝主题' ||
useThemeStore.currentTheme.name === '白紫主题'
"
>
<img src="../../assets/images/orange.png" alt="" />
</div>
<div class="info">
{{ item.title }}
</div>
<div class="time">{{ item.createTime }}</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- 报名板块 -->
</div>
</template>
@ -122,8 +181,14 @@ const setImageUrl = (url: string) => {
//
const toDetail = (id: number) => {
router.push({
path: '/race-info',
// router.push({
// path: '/race-info',
// query: {
// id,
// },
// })
router.push({
path: '/raceProject',
query: {
id,
},
@ -178,7 +243,7 @@ export default {
align-items: center;
justify-content: center;
// padding: 0 100px;
background-image: url('../../assets/images/banner1.png');
background-image: url('../../assets/images/banner1.png') ;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
@ -516,7 +581,7 @@ export default {
font-size: 24px;
color: #fff;
cursor: pointer;
background: linear-gradient(90deg, #B46EFD, #684FFF);
background: linear-gradient(90deg, #b46efd, #684fff);
transition: all 0.3s;
margin: 0;
@ -620,7 +685,7 @@ export default {
}
}
.news-list {
margin-top: 170px;
// margin-top: 170px;
background: var(--background-color);
.news-title {
.top {
@ -656,13 +721,12 @@ export default {
}
.newa-panel {
width: 100%;
height: 630px;
// height: 630px;
background: var(--card-bg-color);
backdrop-filter: blur(10px);
box-shadow: 2px 6px 14px rgba(0, 0, 0, 0.25);
border: 1px solid var(--border-color);
margin-top: 25px;
padding-top: 46px;
margin-top: 20px;
display: flex;
flex-direction: column;
align-items: center;
@ -703,8 +767,8 @@ export default {
}
.newa-main {
width: 90%;
height: 465px;
padding: 58px 54px 19px 25px;
// height: 465px;
// padding: 58px 54px 19px 25px;
display: flex;
align-items: center;
justify-content: space-between;
@ -721,7 +785,7 @@ export default {
.right {
flex: 1;
height: 388px;
margin-left: 89px;
// margin-left: 89px;
padding: 15px 0;
&.full-width {
@ -777,6 +841,14 @@ export default {
color: var(--text-color);
flex: 1;
margin-right: 20px;
overflow: visible;
-webkit-line-clamp: unset;
-webkit-box-orient: unset;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
&:hover {
color: var(--primary-color);
@ -799,10 +871,9 @@ export default {
height: auto !important;
border: none;
box-shadow: none;
.newa-main{
.newa-main {
width: 100% !important;
height: auto !important;
height: auto !important;
}
}
.tab {
@ -816,11 +887,11 @@ export default {
}
}
.newa-main {
padding: 0 !important;
padding: 0 !important;
.right {
height: auto !important;
height: auto !important;
.title{
.title {
display: none !important;
}
margin-left: 0 !important;
@ -829,55 +900,58 @@ export default {
// overflow: hidden !important;
ul {
display: flex;
flex-wrap: wrap;
display: flex;
flex-wrap: wrap;
li {
padding: 0 !important;
flex-direction: column !important;
align-items: start !important;
// box-shadow: 0.01042rem 0.03125rem 0.07292rem rgba(0, 0, 0, 0.25);
flex-direction: column !important;
align-items: start !important;
// box-shadow: 0.01042rem 0.03125rem 0.07292rem rgba(0, 0, 0, 0.25);
border: none !important;
justify-content: start !important;
justify-content: start !important;
width: 350px !important;
height: 358px !important;
transition: all 0.2s !important;
.img{
.img {
width: 100%;
height: 200px;
// height: 100%;
img{
img {
width: 100%;
height: 100%;
}
}
.info{
.info {
width: 50%;
margin-top: 10px;
color: #292D33;
color: #292d33;
height: 50px;
font-size: 18px !important;
font-weight: 600 !important;
// height: 30px !important;
flex: none !important;
padding: 0 10px;
overflow: visible;
-webkit-line-clamp: unset;
-webkit-box-orient: unset;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
line-height: 25px;
}
.time{
.time {
margin-top: 10px;
padding: 0 10px;
}
&:not(:nth-child(3n)){
&:not(:nth-child(3n)) {
margin-right: 30px;
}
&:hover{
&:hover {
background: #fff !important;
transform: translateY(-5px) !important;
box-shadow: 0px -4px 18px 1px rgba(0,0,0,0.15);
box-shadow: 0px -4px 18px 1px rgba(0, 0, 0, 0.15);
}
}
}
@ -895,7 +969,7 @@ export default {
height: auto !important;
border: none;
box-shadow: none;
.newa-main{
.newa-main {
width: 100% !important;
height: auto !important;
}
@ -914,7 +988,7 @@ export default {
padding: 0 !important;
.right {
height: auto !important;
.title{
.title {
display: none !important;
}
margin-left: 0 !important;
@ -932,17 +1006,17 @@ export default {
width: 350px !important;
height: 358px !important;
transition: all 0.2s !important;
.img{
.img {
width: 100%;
height: 200px;
img{
img {
width: 100%;
height: 100%;
}
}
.info{
.info {
margin-top: 10px;
color: #292D33;
color: #292d33;
height: 50px;
font-size: 18px !important;
font-weight: 600 !important;
@ -955,17 +1029,17 @@ export default {
-webkit-box-orient: vertical;
line-height: 25px;
}
.time{
.time {
margin-top: 10px;
padding: 0 10px;
}
&:not(:nth-child(3n)){
&:not(:nth-child(3n)) {
margin-right: 30px;
}
&:hover{
&:hover {
background: #fff !important;
transform: translateY(-5px) !important;
box-shadow: 0px -4px 18px 1px rgba(0,0,0,0.15);
box-shadow: 0px -4px 18px 1px rgba(0, 0, 0, 0.15);
}
}
}

@ -28,7 +28,7 @@
<div class="left">
<el-image
:src="setImageUrl(raceInfo.compLogo)"
style="width: 1.5625rem; height: 1.5625rem"
style="width:1.8667rem; height: 1.8667rem"
:preview-src-list="[
setImageUrl(raceInfo.compLogo),
setImageUrl(raceInfo.compImg),
@ -473,14 +473,15 @@ const scrollToPosition = () => {
.race-info {
.top {
display: flex;
flex-direction: column;
// flex-direction: column;
align-items: center;
// height: 200px;
justify-content: center;
.right {
display: flex;
felx-direction: column;
margin-top: 20px;
// margin-left: 25px;
// margin-top: 20px;
margin-left: 25px;
// flex: 1;
ul {
width: 100%;
@ -523,6 +524,12 @@ const scrollToPosition = () => {
margin-top: 15px;
// height: 300px;
color: var(--text-color);
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
}
.file {
margin-top: 25px;

@ -0,0 +1,263 @@
<template>
<div class="container">
<div class="signup-page">
<el-steps
style="max-width: 600px;position: relative;z-index: 2;"
:active="active"
finish-status="success"
align-center
>
<el-step title="校级赛" />
<el-step title="县/区赛" />
<el-step title="市级赛" />
<el-step title="省级赛" />
</el-steps>
<!-- 状态栏 -->
<div class="status-bar">
<div class="left"> 正在报名</div>
<div class="right">23:24:09 结束</div>
</div>
<!-- 卡片区域 -->
<div class="card-list">
<!-- 校级赛卡片 -->
<div class="card active" v-for="item in list" :key="item.id" v-show="item.objLevel_dictText === '校赛'">
<h2 class="title">
{{ item.compnames }}{{ item.objLevel_dictText }}-{{
item.objName
}}
</h2>
<p class="date">{{ item.starttime }} - {{ item.endtime }}</p>
<a href="#" class="link">查看考试说明</a>
<button class="btn" @click="sublit(item)">立即报名</button>
<p class="count">
已有
<span>{{ item.pointnums }}</span>
人报名
</p>
</div>
<!-- /区级赛卡片 -->
<!-- <div class="card disabled">
<h2 class="title">河南省青少年阅读大赛/区级赛</h2>
<p class="date">2024年3月1日 - 2026年12月31日</p>
<a href="#" class="link">查看考试说明</a>
<button class="btn" disabled>暂未开放</button>
<p class="count">
已有
<span>0</span>
人报名
</p>
</div> -->
</div>
</div>
</div>
</template>
<script setup>
import { ref, computed, nextTick, watch, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { getannualCompPointList } from '@/api/race'
const router = useRouter()
const route = useRoute()
const active = ref(0)
const list = ref([])
const getList = async () => {
const res = await getannualCompPointList()
console.log(res)
list.value = res.result.records
}
getList()
const sublit = (data) => {
router.push({
path: '/registrationPersonage',
query: {
// id:data.annualCompId,
// annualCompid: data.annualCompId,
// enrollCode: data.enrollCode,
// entryFormat: data.entryFormat
id: data.id,
objName: data.compnames,
bcId:data.annualCompId,
},
})
}
</script>
<style lang="scss" scoped>
.container {
overflow: hidden;
}
.signup-page {
position: relative;
padding: 16px;
background-color: #f5f5f5;
min-height: 100vh;
margin-top: 80px;
.status-bar {
position: relative;
z-index: 2;
height: 90px;
font-size: 18px;
display: flex;
justify-content: space-between;
// align-items: center;
// padding-top: 20px;
background: linear-gradient(90deg, #8bfdfd, #b3ff82);
color: #219653;
padding: 20px 16px;
border-radius: 15px;
font-weight: bold;
color: #000;
margin-top: 10px;
}
.card-list {
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
gap: 16px;
margin-top: -40px;
.card {
background: #fff;
border-radius: 15px;
padding: 20px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
transition: 0.3s;
&.disabled {
background: #fff;
color: #aaa;
pointer-events: none;
opacity: 0.7;
.btn {
background: #ccc;
cursor: not-allowed;
box-shadow: 0px 6px 5px 1px rgba(0, 0, 0, 0.2);
}
.link {
color: #bbb;
}
}
.title {
font-size: 16px;
font-weight: bold;
margin-bottom: 6px;
}
.date {
font-size: 14px;
color: #666;
margin-bottom: 15px;
margin-top: 15px;
// padding-left: 10px;
display: flex;
align-items: center;
&::before {
content: ' ';
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #97ae20;
display: block;
margin-right: 10px;
}
}
.link {
font-size: 13px;
color: #3498db;
text-decoration: underline;
margin-bottom: 12px;
// padding-left: 10px;
display: flex;
align-items: center;
&::before {
content: ' ';
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #97ae20;
display: block;
margin-right: 10px;
}
}
.btn {
width: 100%;
padding: 12px;
border: none;
border-radius: 20px;
font-size: 15px;
font-weight: bold;
color: #fff;
background: linear-gradient(to right, #9ad24a, #60b529);
cursor: pointer;
margin-top: 10px;
box-shadow: 0px 6px 5px 1px rgba(165, 209, 81, 0.2);
}
.count {
text-align: center;
font-size: 13px;
color: #888;
margin-top: 15px;
span {
color: #9ad24a;
font-weight: bold;
}
}
}
}
&::after {
position: fixed;
content: '';
top: -70%;
left: 50%;
transform: translateX(-50%);
width: 100% * 2;
height: 375px * 2;
background: #ddf4ff;
z-index: 1;
border-radius: 50%;
}
}
:deep(.is-process){
color: #1aeae2;
font-weight: 400;
.is-text{
width: 30px;
height: 30px;
background-color: #1aeae2;
border-color: #1aeae2;
color: #fff;
font-size: 16px;
}
.el-step__line{
background: linear-gradient(to right, #9ad24a, #60b529);;
}
}
:deep(.is-wait){
.is-text{
width: 30px;
height: 30px;
background-color: #dcf5ff;
font-size: 16px;
// border-color: #1aeae2;
// color: #fff;
}
}
</style>

@ -266,6 +266,7 @@ async function submit(substa:string) {
upData.value.substa = substa
try {
const res: any = await getSignUpApi({ ...upData.value })
if(res.code == 500) return ElMessage.error(res.message)
if(substa == '1'){
subLoading.value = true
ElMessage({
@ -408,7 +409,7 @@ getTopicListApi()*/
.registration-layout {
margin-top: 20px;
margin: 0 auto;
width: 1397px;
// width: 1397px;
&>* {
background: #ffffff;

@ -90,6 +90,14 @@
>
取消
</el-button>
<el-button
link
type="primary"
size="small"
@click="goAnswer(row.enrollCode)"
>
答题
</el-button>
</div>
</template>
</el-table-column>
@ -320,6 +328,15 @@ const cancelEvent = async (id: any) => {
ElMessage.success(res.message)
getList()
}
const goAnswer = (code) => {
router.push({
path: '/answer',
query: {
code
}
})
}
</script>
<style scoped lang="scss">

Loading…
Cancel
Save