|
@@ -1,45 +1,51 @@
|
|
|
<template>
|
|
|
<div class="SignUp">
|
|
|
<!-- <m-header /> -->
|
|
|
- <div v-show="show" class="container" :style="backgroundImg">
|
|
|
- <h2>{{ baseInfo.posterTitle }}</h2>
|
|
|
- <div class="section" v-if="baseInfo.transStatus === 'APPLIED' || baseInfo.transStatus === 'EXAM_ING' || baseInfo.transStatus === 'EXAM_END' || baseInfo.transStatus === 'RESULT_CONFIRM' || baseInfo.transStatus === 'CLOSE'" key="status">
|
|
|
- <div class="sectionStatus">
|
|
|
- <img src="../../assets/images/level/sign_over.png" alt="">
|
|
|
- <h3>您来迟啦,报名已结束~</h3>
|
|
|
- </div>
|
|
|
+ <div v-show="show" :class="[styles ? '' : 'bg', 'container']" :style="styles ? null : backgroundImg">
|
|
|
+ <h2 v-if="!styles">{{ baseInfo.posterTitle }}</h2>
|
|
|
+ <div v-if="styles">
|
|
|
+ <img :src="baseInfo.customPoster" alt="">
|
|
|
+ <van-button type="primary" v-if="baseInfo.status" @click="onSubmit" round block>我要报名</van-button>
|
|
|
</div>
|
|
|
- <div class="section" v-else-if="baseInfo.transStatus === 'NOT_START'" key="status">
|
|
|
- <div class="sectionStatus">
|
|
|
- <img src="../../assets/images/level/sign_not_start.png" alt="">
|
|
|
- <h3>您来早啦,报名还未开始~</h3>
|
|
|
- <p>报名时间:{{ baseInfo.enrollTime2 }}</p>
|
|
|
+ <div v-else>
|
|
|
+ <div class="section" v-if="baseInfo.transStatus === 'APPLIED' || baseInfo.transStatus === 'EXAM_ING' || baseInfo.transStatus === 'EXAM_END' || baseInfo.transStatus === 'RESULT_CONFIRM' || baseInfo.transStatus === 'CLOSE'" key="status">
|
|
|
+ <div class="sectionStatus">
|
|
|
+ <img src="../../assets/images/level/sign_over.png" alt="">
|
|
|
+ <h3>您来迟啦,报名已结束~</h3>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="section" v-else key="status">
|
|
|
- <div class="title" style="margin-top: 0">考试类型</div>
|
|
|
- <div class="content">{{ baseInfo.examMode === "OFFLINE" ? "线下" : "线上" }}</div>
|
|
|
-
|
|
|
- <div class="title">考试地址</div>
|
|
|
- <div class="content" v-if="baseInfo.examMode === 'OFFLINE'">
|
|
|
- <template v-if="baseInfo.examLocations">
|
|
|
- <p v-for="(item, index) in baseInfo.examLocations" :key="index">
|
|
|
- {{ item.address }}
|
|
|
- </p>
|
|
|
- </template>
|
|
|
+ <div class="section" v-else-if="baseInfo.transStatus === 'NOT_START'" key="status">
|
|
|
+ <div class="sectionStatus">
|
|
|
+ <img src="../../assets/images/level/sign_not_start.png" alt="">
|
|
|
+ <h3>您来早啦,报名还未开始~</h3>
|
|
|
+ <p>报名时间:{{ baseInfo.enrollTime2 }}</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="content" v-else>线上网络教室</div>
|
|
|
+ <div class="section" v-else key="status">
|
|
|
+ <div class="title" style="margin-top: 0">考试类型</div>
|
|
|
+ <div class="content">{{ baseInfo.examMode === "OFFLINE" ? "线下" : "线上" }}</div>
|
|
|
+
|
|
|
+ <div class="title">考试地址</div>
|
|
|
+ <div class="content" v-if="baseInfo.examMode === 'OFFLINE'">
|
|
|
+ <template v-if="baseInfo.examLocations">
|
|
|
+ <p v-for="(item, index) in baseInfo.examLocations" :key="index">
|
|
|
+ {{ item.address }}
|
|
|
+ </p>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <div class="content" v-else>线上网络教室</div>
|
|
|
|
|
|
- <div class="title">考试简介</div>
|
|
|
- <div class="content" v-html="baseInfo.posterProfile"></div>
|
|
|
+ <div class="title">考试简介</div>
|
|
|
+ <div class="content" v-html="baseInfo.posterProfile"></div>
|
|
|
|
|
|
- <div class="title">报名时间</div>
|
|
|
- <div class="content">{{ baseInfo.enrollTime }}</div>
|
|
|
+ <div class="title">报名时间</div>
|
|
|
+ <div class="content">{{ baseInfo.enrollTime }}</div>
|
|
|
|
|
|
- <div class="title">预计考试日期</div>
|
|
|
- <div class="content">{{ baseInfo.expectExamTime }}</div>
|
|
|
+ <div class="title">预计考试日期</div>
|
|
|
+ <div class="content">{{ baseInfo.expectExamTime }}</div>
|
|
|
+ </div>
|
|
|
+ <van-button type="primary" :color="buttonColor" v-if="baseInfo.status" @click="onSubmit" round block>我要报名</van-button>
|
|
|
</div>
|
|
|
- <van-button type="primary" :color="buttonColor" v-if="baseInfo.status" @click="onSubmit" round block>我要报名</van-button>
|
|
|
<!-- <a class="protocol" @click="onProtocol" v-if="baseInfo.status">协议</a> -->
|
|
|
</div>
|
|
|
</div>
|
|
@@ -72,6 +78,7 @@ export default {
|
|
|
baseInfo: {}, // 基本信息
|
|
|
backgroundImg: null,
|
|
|
buttonColor: null,
|
|
|
+ styles: false, // 显示哪种风格
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -87,9 +94,14 @@ export default {
|
|
|
let res = await examinationBasicInfo({ examId: this.examId })
|
|
|
if(res.data.code == 200) {
|
|
|
let tempData = res.data.data
|
|
|
+ // tempData.status = "NOT_START"
|
|
|
+ // tempData.status = "CLOSE"
|
|
|
let tempStatus = false
|
|
|
if(tempData.status == "APPLYING") {
|
|
|
tempStatus = true
|
|
|
+ if(tempData.customPoster) { // 是否显示图片风格
|
|
|
+ this.styles = true
|
|
|
+ }
|
|
|
}
|
|
|
localStorage.setItem("examStartTime", dayjs(tempData.expectExamStartTime).format("YYYY-MM-DD"))
|
|
|
this.baseInfo = {
|
|
@@ -102,6 +114,7 @@ export default {
|
|
|
status: tempStatus,
|
|
|
examLocations: tempData.examLocations, // 地址
|
|
|
posterProfile: tempData.posterProfile ? tempData.posterProfile.replace(/\n/ig,'<br/>') : null,
|
|
|
+ customPoster: tempData.customPoster, // 自定义图片
|
|
|
transStatus: tempData.status
|
|
|
}
|
|
|
let poster = tempData.posterBackgroundImg ? JSON.parse(tempData.posterBackgroundImg) : ""
|
|
@@ -147,9 +160,11 @@ export default {
|
|
|
}
|
|
|
.container {
|
|
|
min-height: 100vh;
|
|
|
- background: url('../../assets/images/level/signUpBg.png') no-repeat center top #F3F4F8;
|
|
|
- background-size: contain;
|
|
|
overflow: hidden;
|
|
|
+ &.bg {
|
|
|
+ background: url('../../assets/images/level/signUpBg.png') no-repeat center top #F3F4F8;
|
|
|
+ background-size: contain;
|
|
|
+ }
|
|
|
h2 {
|
|
|
position: absolute;
|
|
|
padding-top: .4rem;
|