转跳移动端关闭

GST002
王家东 3 weeks ago
parent e577726bd3
commit 7f4f8e41f3
  1. 4
      src/main.ts
  2. 80
      src/views/raceInfo/index.vue

@ -60,10 +60,10 @@ const pcHost = new URL(import.meta.env.VITE_APP_PC_URL).host
if (isMobile && currentHost !== mobileHost) { if (isMobile && currentHost !== mobileHost) {
console.log('手机端,跳转到移动站') 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) { } else if (!isMobile && currentHost !== pcHost) {
console.log('电脑端,跳转到 PC 站') console.log('电脑端,跳转到 PC 站')
location.href = import.meta.env.VITE_APP_PC_URL // location.href = import.meta.env.VITE_APP_PC_URL
} }

@ -120,7 +120,7 @@
</div> </div>
<!-- 年度比赛列表 --> <!-- 年度比赛列表 -->
<div style="margin-top: 30px; font-size: 24px; font-weight: 600"> <div style="margin-top: 30px; font-size: 24px; font-weight: 600">
年度比赛列表: 年度比赛项目列表:
</div> </div>
<el-card v-if="reacProjectList.length === 0" style="margin-top: 20px"> <el-card v-if="reacProjectList.length === 0" style="margin-top: 20px">
<div <div
@ -152,16 +152,16 @@
</div> </div>
<div class="reac-info"> <div class="reac-info">
<div class="niandu"> <div class="niandu">
<div>{{ item.annualname }}年度</div> <div>{{ item.name }}</div>
<el-button type="primary" size="small">报名</el-button> <el-button type="primary" size="small">报名</el-button>
</div> </div>
<div <div
class="reac-title" class="reac-title"
style="font-weight: 600; color: #000; font-size: 16px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" style="font-weight: 600; color: #000; font-size: 16px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"
> >
{{ item.name }} {{ item.objName }}
</div> </div>
<div class="reac-title">负责部门{{ item.compOrgan }}</div> <div class="reac-title">负责部门{{ item.coorganizer }}</div>
<!-- <div class="reac-project">{{ item.introduction }}</div> --> <!-- <div class="reac-project">{{ item.introduction }}</div> -->
<div <div
class="time" class="time"
@ -252,7 +252,7 @@ const goToCompetition = async (id: any, endTime: string,isOpen:string) => {
return ElMessage.error('比赛已结束') return ElMessage.error('比赛已结束')
} }
const projectId: any = await getProjectId({ anncmopid: id }) const projectId: any = await getProjectId({ anncmopid: id })
console.log(projectId.result) console.log(projectId.result,'12121212')
// return // return
Router.push(`/projectName?id=${projectId.result}&bcId=${id}`) Router.push(`/projectName?id=${projectId.result}&bcId=${id}`)
@ -308,9 +308,9 @@ const scrollToPosition = () => {
.top-image { .top-image {
width: 100%; width: 100%;
height: 300px; height: 300px;
background: var(--background-color); background-color: skyblue;
text-align: center; text-align: center;
color: var(--text-color); color: #fff;
font-size: 32px; font-size: 32px;
font-weight: 700; font-weight: 700;
line-height: 300px; line-height: 300px;
@ -319,14 +319,16 @@ const scrollToPosition = () => {
width: 100%; width: 100%;
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
// grid-template-rows: repeat(2, 1fr);
// gap: 10px;
// margin-top: 10px;
.item { .item {
width: 340px; width: 340px;
height: 360px; height: 360px;
background-color: var(--card-bg-color); // background-color: pink;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.06); box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.06);
cursor: pointer; cursor: pointer;
border-radius: 10px; border-radius: 10px;
border: 1px solid var(--border-color);
transition: all 0.2s; transition: all 0.2s;
.image { .image {
width: 100%; width: 100%;
@ -334,21 +336,19 @@ const scrollToPosition = () => {
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 4px;
} }
} }
.reac-info { .reac-info {
padding: 0 8px; padding: 0 8px;
.reac-title { .reac-title {
margin-top: 19px; margin-top: 19px;
color: var(--text-color); color: #c9c9c9;
opacity: 0.65;
font-size: 12px; font-size: 12px;
} }
.reac-project { .reac-project {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: var(--text-color); color: #333333;
margin-top: 10px; margin-top: 10px;
line-height: 20px; line-height: 20px;
height: 60px; height: 60px;
@ -359,12 +359,11 @@ const scrollToPosition = () => {
} }
.time { .time {
font-size: 14px; font-size: 14px;
color: var(--text-color); color: #8c8b8b;
opacity: 0.65;
margin-top: 30px; margin-top: 30px;
} }
.niandu { .niandu {
color: var(--text-color); color: #1e2033;
font-size: 18px; font-size: 18px;
margin-top: 20px; margin-top: 20px;
font-weight: 600; font-weight: 600;
@ -376,7 +375,6 @@ const scrollToPosition = () => {
} }
.item:hover { .item:hover {
transform: translateY(-5px); transform: translateY(-5px);
border-color: var(--primary-color);
} }
.item:nth-child(n) { .item:nth-child(n) {
margin-top: 20px; margin-top: 20px;
@ -393,13 +391,12 @@ const scrollToPosition = () => {
width: 300px; width: 300px;
margin-left: 40px; margin-left: 40px;
.title { .title {
color: var(--text-color); color: #1e2033;
font-size: 28px; font-size: 28px;
font-weight: 600; font-weight: 600;
} }
.description { .description {
color: var(--text-color); color: #1e2033;
opacity: 0.65;
font-size: 14px; font-size: 14px;
margin-top: 15px; margin-top: 15px;
} }
@ -409,7 +406,8 @@ const scrollToPosition = () => {
position: relative; position: relative;
width: 100%; width: 100%;
height: 140px; height: 140px;
color: var(--text-color); // background-color: pink;
color: #333333;
padding: 15px; padding: 15px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -417,13 +415,8 @@ const scrollToPosition = () => {
box-shadow: 0rem 0rem 0.05208rem rgba(0, 0, 0, 0.06); box-shadow: 0rem 0rem 0.05208rem rgba(0, 0, 0, 0.06);
margin-top: 10px; margin-top: 10px;
cursor: pointer; cursor: pointer;
background: var(--card-bg-color);
border: 1px solid var(--border-color);
border-radius: 4px;
transition: all 0.3s;
.year { .year {
font-size: 12px; font-size: 12px;
opacity: 0.65;
} }
.name { .name {
width: 130px; width: 130px;
@ -433,7 +426,6 @@ const scrollToPosition = () => {
} }
.time { .time {
font-size: 12px; font-size: 12px;
opacity: 0.45;
} }
.go-to { .go-to {
position: absolute; position: absolute;
@ -444,9 +436,9 @@ const scrollToPosition = () => {
line-height: 28px; line-height: 28px;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
color: #ffffff; color: #f6f5fb;
background: var(--primary-color); background: url('../../assets/images/left-top.png') no-repeat;
border-radius: 0 4px 0 4px; background-size: contain;
} }
.icon { .icon {
position: absolute; position: absolute;
@ -458,14 +450,6 @@ const scrollToPosition = () => {
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
opacity: 0.8;
}
}
&:hover {
transform: translateY(-2px);
border-color: var(--primary-color);
.name {
color: var(--primary-color);
} }
} }
} }
@ -490,14 +474,12 @@ const scrollToPosition = () => {
display: flex; display: flex;
.label { .label {
font-size: 16px; font-size: 16px;
color: var(--text-color); color: #aaa;
opacity: 0.45;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: var(--text-color);
} }
} }
li:first-child { li:first-child {
@ -517,8 +499,7 @@ const scrollToPosition = () => {
margin-top: 25px; margin-top: 25px;
.label { .label {
font-size: 16px; font-size: 16px;
color: var(--text-color); color: #aaa;
opacity: 0.45;
} }
.deaceiption { .deaceiption {
font-size: 16px; font-size: 16px;
@ -526,7 +507,6 @@ const scrollToPosition = () => {
line-height: 26px; line-height: 26px;
margin-top: 15px; margin-top: 15px;
height: 300px; height: 300px;
color: var(--text-color);
} }
.file { .file {
margin-top: 25px; margin-top: 25px;
@ -539,16 +519,12 @@ const scrollToPosition = () => {
width: 100%; width: 100%;
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
border: 1px solid var(--border-color); border: 1px solid #ccc;
background-color: var(--card-bg-color);
padding: 20px; padding: 20px;
margin-top: 20px; margin-top: 20px;
color: var(--text-color);
p { p {
img { img {
width: 100%; width: 100%;
border-radius: 4px;
border: 1px solid var(--border-color);
} }
} }
} }
@ -556,12 +532,6 @@ const scrollToPosition = () => {
:deep(.el-card) { :deep(.el-card) {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: var(--card-bg-color);
border-color: var(--border-color);
color: var(--text-color);
.el-card__header {
border-bottom: 1px solid var(--border-color);
}
} }
img { img {
width: 100%; width: 100%;

Loading…
Cancel
Save