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