You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

320 lines
7.5 KiB

9 months ago
<template>
<div class="container-1420" v-if="isLoading">
9 months ago
<div class="banner">
<div class="title">{{ reacProjectList[0].objName}}火热报名中</div>
9 months ago
<div class="description">
{{ reacProjectList[0].annualCompId_dictText }}
9 months ago
</div>
<div class="application gradient">立即报名</div>
<div class="nav-title">
<div class="top">竞赛导航</div>
<div class="bottom">30+项目登陆后报名</div>
</div>
</div>
<!-- 比赛列表 -->
<div class="race-list">
<div class="item" v-for="item in reacProjectList" :key="item.id">
9 months ago
<div class="image">
<img :src="setImageUrl(item.image)" alt="" />
9 months ago
</div>
<div class="reac-info">
<div class="reac-title">{{ item.compname }}</div>
<div class="reac-project"><div v-html="item.introduce"></div></div>
<div class="time">报名时间:{{item.starttime}}-{{ item.endtime }}</div>
9 months ago
</div>
</div>
</div>
<!-- 新闻列表 -->
<div class="news-list">
<div class="news-title">
<div class="top">竞赛导航</div>
<div class="bottom">30+项目登陆后报名</div>
</div>
<div class="newa-panel">
<div class="tab">
<div
:class="active === i ? 'item active gradient' : 'item'"
v-for="i in 5"
:key="i"
@click="active = i"
>
全部
</div>
</div>
<div class="newa-main">
<div class="left"></div>
<div class="right">
<div class="title">新闻标题</div>
<div class="description">
我是新闻描述,我是新闻描述,我是新闻描述
</div>
<div class="newa-main-list">
<ul>
<li v-for="i in 6" :key="i">
<div class="time">2024-09-12</div>
<div class="info">
我是一段新闻描述,我是一段新闻描述,我是一段新闻描述
</div>
</li>
</ul>
</div>
</div>
9 months ago
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { getRaceList } from '@/api/race'
const reacProjectList = ref<any>([])
const isLoading = ref(false)
const getRaceProjectListEvent = async () => {
let page = {
column: 'createTime',
order: 'desc',
pageNo: 1,
pageSize: 8,
}
const res:any = await getRaceList(page)
console.log(res)
reacProjectList.value = res.result.records
console.log(reacProjectList.value ,'reacProjectList.value ');
isLoading.value = true
}
getRaceProjectListEvent()
9 months ago
const active = ref(1)
const setImageUrl = (url:string) => {
return import.meta.env.VITE_APP_BASE_API +url
}
9 months ago
</script>
<style lang="scss" scoped>
.banner {
position: relative;
width: 100%;
height: 692px;
// background: radial-gradient(
// circle,
// rgba(131, 255, 197, 1) 0%,
// rgba(255, 255, 255, 1) 50%
// );
background: url('../../assets/images/banner1.png') no-repeat;
background-size: contain;
9 months ago
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.title {
font-size: 50px;
font-weight: 600;
color: #333333;
}
.description {
width: 1074px;
text-align: center;
font-size: 20px;
color: #666;
margin-top: 37px;
}
.application {
width: 272px;
height: 64px;
text-align: center;
line-height: 64px;
border-radius: 10px;
font-size: 24px;
color: #fff;
cursor: pointer;
margin-top: 50px;
}
.nav-title {
position: absolute;
bottom: 0;
color: #1e2033;
.top {
font-size: 40px;
font-weight: 600;
text-align: center;
}
.bottom {
font-size: 16px;
text-align: center;
margin-top: 10px;
}
}
}
.race-list {
width: 100%;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(2, 1fr);
// gap: 10px;
9 months ago
margin-top: 40px;
.item {
width: 340px;
height: 360px;
// background-color: pink;
.image {
width: 100%;
height: 194px;
img {
width: 100%;
height: 100%;
}
}
.reac-info {
.reac-title {
margin-top: 19px;
color: #c9c9c9;
font-size: 12px;
}
.reac-project {
font-size: 16px;
font-weight: 600;
color: #333333;
margin-top: 10px;
}
.time {
font-size: 14px;
color: #8c8b8b;
margin-top: 40px;
}
}
}
.item:nth-child(n) {
margin-top: 20px;
}
}
.news-list {
margin-top: 170px;
background: url('../../assets/images/bg2.png') no-repeat;
background-size: cover;
9 months ago
.news-title {
.top {
font-size: 40px;
font-weight: 600;
text-align: center;
}
.bottom {
font-size: 16px;
text-align: center;
margin-top: 10px;
}
}
.newa-panel {
width: 100%;
height: 630px;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
box-shadow: 2px 6px 14px rgba(0, 0, 0, 0.25);
margin-top: 25px;
// padding: 46px 180px 70px 180px;
padding-top: 46px;
display: flex;
flex-direction: column;
align-items: center;
9 months ago
.tab {
display: flex;
justify-content: space-between;
align-items: center;
.item {
width: 152px;
height: 70px;
border-radius: 10px;
text-align: center;
line-height: 70px;
color: #1e2033;
font-size: 18px;
box-shadow: 7px 7px 22px -10px rgba(0, 0, 0, 0.22);
cursor: pointer;
transition: all 0.2s;
margin-right: 48px;
9 months ago
}
.item:hover {
9 months ago
transform: scale(1.1);
}
.item:last-child {
margin: 0;
}
9 months ago
.active {
color: #fff;
}
}
.newa-main {
width: 1200px;
height: 465px;
padding: 58px 54px 19px 25px;
display: flex;
align-items: center;
justify-content: space-between;
.left {
width: 546px;
height: 388px;
background-color: #d9d9d9;
border-radius: 15px;
}
.right {
flex: 1;
height: 388px;
margin-left: 89px;
padding: 15px 0;
.title {
font-size: 24px;
font-weight: 600;
color: #1e2033;
}
.description {
font-size: 14px;
margin-top: 10px;
color: #1e2033;
}
.newa-main-list {
width: 100%;
height: 270px;
// background-color: pink;
margin-top: 38px;
ul {
width: 100%;
height: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
li {
width: 227px;
height: 65px;
.time {
position: relative;
font-size: 14px;
color: #1e2033;
padding-left: 13px;
}
.time::before {
content: ' ';
display: block;
position: absolute;
top: 0;
left: 0;
width: 6px;
height: 13px;
background-color: #319245;
}
.info {
margin-top: 12px;
font-size: 12px;
color: #1e2033;
line-height: 18px;
}
}
}
}
}
}
9 months ago
}
}
</style>