【bug】报名页面 会议失效报名按钮消失 给出错误提示
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<label>召开时间:</label>
|
||||
<span>{{holdtime}}</span>
|
||||
<span>{{ holdtime }}</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<label>会议内容:</label>
|
||||
@@ -46,7 +46,7 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<label>召开地点:</label>
|
||||
<span>{{holdAddress}}</span>
|
||||
<span>{{ holdAddress }}</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<label>备注:</label>
|
||||
@@ -60,7 +60,8 @@
|
||||
</a-col>
|
||||
<a-col :span="12" style="display: flex">
|
||||
<label>附件:</label>
|
||||
<preview-file :file-id="currentMeetingInfo.meetingFiles" v-if="currentMeetingInfo.meetingFiles"></preview-file>
|
||||
<preview-file :file-id="currentMeetingInfo.meetingFiles"
|
||||
v-if="currentMeetingInfo.meetingFiles"></preview-file>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
@@ -69,7 +70,8 @@
|
||||
<a-row>
|
||||
<img :src="singUpQRCode" class="qr-code"/>
|
||||
</a-row>
|
||||
<a-button type="primary" style="margin-left: 19px;" @click="toSingUpPage">立即报名</a-button>
|
||||
<a-button type="primary" style="margin-left: 19px;" @click="toSingUpPage" v-if="!invalidationBool">立即报名
|
||||
</a-button>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
@@ -84,7 +86,7 @@ import {getMeetInfoById} from '@api/incomeMeetingApi'
|
||||
|
||||
export default {
|
||||
name: 'SignUpEntrance',
|
||||
components:{
|
||||
components: {
|
||||
PreviewFile
|
||||
},
|
||||
data() {
|
||||
@@ -97,11 +99,13 @@ export default {
|
||||
// 会议费用
|
||||
meetingMoney: '',
|
||||
// 召开时间
|
||||
holdtime:'',
|
||||
holdtime: '',
|
||||
// 召开地点
|
||||
holdAddress:'',
|
||||
holdAddress: '',
|
||||
// 会议id
|
||||
meetingId:''
|
||||
meetingId: '',
|
||||
// 当前时间是否超过报名截止时间
|
||||
invalidationBool: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -109,7 +113,7 @@ export default {
|
||||
let id = this.GetQueryString('id')
|
||||
this.meetingId = id
|
||||
document.title = '报名入口'
|
||||
if(id){
|
||||
if (id) {
|
||||
this.getMeetingInfo(id)
|
||||
}
|
||||
},
|
||||
@@ -141,7 +145,7 @@ export default {
|
||||
this.$router.push({
|
||||
path: '/signUpPage',
|
||||
query: {
|
||||
id:this.meetingId
|
||||
id: this.meetingId
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -152,6 +156,14 @@ export default {
|
||||
getMeetInfoById({id: params}).then(res => {
|
||||
if (res.success) {
|
||||
this.currentMeetingInfo = res.result
|
||||
// true超过了 false 未超过
|
||||
this.invalidationBool = this.compareCurrentTime(res.result.registerDeadline)
|
||||
if (this.invalidationBool) {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: '当前会议超出报名时间,不可报名!'
|
||||
})
|
||||
}
|
||||
// 初始化会议费用
|
||||
if (this.currentMeetingInfo.meetingCostsVip) {
|
||||
this.meetingMoney = `普通会员(${this.currentMeetingInfo.meetingCosts}/人) 标协会员(${this.currentMeetingInfo.meetingCostsVip}/人)`
|
||||
@@ -159,11 +171,11 @@ export default {
|
||||
this.meetingMoney = `普通会员(${this.currentMeetingInfo.meetingCosts}/人)`
|
||||
}
|
||||
// 初始化召开时间
|
||||
if(this.currentMeetingInfo.startTime){
|
||||
if (this.currentMeetingInfo.startTime) {
|
||||
this.holdtime = this.currentMeetingInfo.startTime + '~' + this.currentMeetingInfo.endTime
|
||||
}
|
||||
// 初始化召开地点
|
||||
if(this.currentMeetingInfo.venue){
|
||||
if (this.currentMeetingInfo.venue) {
|
||||
this.holdAddress = this.currentMeetingInfo.venue + '/' + this.currentMeetingInfo.address
|
||||
}
|
||||
} else {
|
||||
@@ -172,6 +184,18 @@ export default {
|
||||
})
|
||||
},
|
||||
/*
|
||||
* 当前时间是否超过会议报名时间
|
||||
* */
|
||||
compareCurrentTime(time) {
|
||||
let date = new Date()
|
||||
let compareTime = new Date(time)
|
||||
if (date.getTime() > compareTime.getTime()) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
/*
|
||||
* 会议类型
|
||||
* */
|
||||
initMeetingType(val) {
|
||||
@@ -193,9 +217,9 @@ export default {
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取url的参数
|
||||
* @param name要获取的参数名
|
||||
* */
|
||||
* 获取url的参数
|
||||
* @param name要获取的参数名
|
||||
* */
|
||||
GetQueryString(name) {
|
||||
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
|
||||
var r = window.location.search.substr(1).match(reg)
|
||||
|
||||
Reference in New Issue
Block a user