新增比赛详情

main
JayChou 8 months ago
parent d6bac87f3a
commit 5df7f3966f
  1. 2
      src/Layout/tabbar/index.vue
  2. 18
      src/router/module/constRouter/index.ts
  3. 25
      src/views/home/index.vue
  4. 14
      src/views/raceInfo/index.vue

@ -30,7 +30,7 @@
<div class="avater"> <div class="avater">
<img src="../../assets/images/default.png" alt="" /> <img src="../../assets/images/default.png" alt="" />
</div> </div>
<el-dropdown> <el-dropdown style="width:.625rem">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
{{ useUserStore.userInfo.username }} {{ useUserStore.userInfo.username }}
<el-icon class="el-icon--right"> <el-icon class="el-icon--right">

@ -1,5 +1,4 @@
export const constRouter: any = export const constRouter: any = {
{
path: '/', path: '/',
component: () => import('@/Layout/index.vue'), component: () => import('@/Layout/index.vue'),
name: 'Layout', name: 'Layout',
@ -108,8 +107,8 @@ export const constRouter: any =
icon: '', icon: '',
title: '新闻内容详情', title: '新闻内容详情',
hidden: false, hidden: false,
} },
} },
], ],
}, },
{ {
@ -122,6 +121,15 @@ export const constRouter: any =
hidden: true, hidden: true,
}, },
}, },
{
path: '/raec-info',
name: 'RaecInfo',
component: () => import('@/views/raceInfo/index.vue'),
meta: {
icon: '',
title: '比赛详情',
hidden: true,
},
},
], ],
} }

@ -1,9 +1,9 @@
<template> <template>
<div class="container-1420" v-if="isLoading"> <div class="container-1420" v-if="isLoading">
<div class="banner"> <div class="banner">
<div class="title">{{ reacProjectList[0].objName}}火热报名中</div> <div class="title">{{ reacProjectList[0].compname }}火热报名中</div>
<div class="description"> <div class="description">
{{ reacProjectList[0].annualCompId_dictText }} <div v-html="reacProjectList[0].introduce"></div>
</div> </div>
<div class="application gradient">立即报名</div> <div class="application gradient">立即报名</div>
<div class="nav-title"> <div class="nav-title">
@ -20,7 +20,9 @@
<div class="reac-info"> <div class="reac-info">
<div class="reac-title">{{ item.compname }}</div> <div class="reac-title">{{ item.compname }}</div>
<div class="reac-project"><div v-html="item.introduce"></div></div> <div class="reac-project"><div v-html="item.introduce"></div></div>
<div class="time">报名时间:{{item.starttime}}-{{ item.endtime }}</div> <div class="time">
报名时间:{{ item.starttime }}-{{ item.endtime }}
</div>
</div> </div>
</div> </div>
</div> </div>
@ -78,17 +80,17 @@ const getRaceProjectListEvent = async () => {
pageNo: 1, pageNo: 1,
pageSize: 8, pageSize: 8,
} }
const res:any = await getRaceList(page) const res: any = await getRaceList(page)
console.log(res) console.log(res)
reacProjectList.value = res.result.records reacProjectList.value = res.result.records
console.log(reacProjectList.value ,'reacProjectList.value '); console.log(reacProjectList.value, 'reacProjectList.value ')
isLoading.value = true isLoading.value = true
} }
getRaceProjectListEvent() getRaceProjectListEvent()
const active = ref(1) const active = ref(1)
const setImageUrl = (url:string) => { const setImageUrl = (url: string) => {
return import.meta.env.VITE_APP_BASE_API +url return import.meta.env.VITE_APP_BASE_API + url
} }
</script> </script>
@ -158,6 +160,10 @@ const setImageUrl = (url:string) => {
width: 340px; width: 340px;
height: 360px; height: 360px;
// background-color: pink; // background-color: pink;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.06);
cursor: pointer;
border-radius: 10px;
transition: all 0.2s;
.image { .image {
width: 100%; width: 100%;
height: 194px; height: 194px;
@ -185,6 +191,9 @@ const setImageUrl = (url:string) => {
} }
} }
} }
.item:hover{
transform: translateY(-5px);
}
.item:nth-child(n) { .item:nth-child(n) {
margin-top: 20px; margin-top: 20px;
} }

@ -0,0 +1,14 @@
<template>
<div>
赛事详情
</div>
</template>
<script lang='ts' setup>
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
</script>
<style lang='scss' scoped>
</style>
Loading…
Cancel
Save