diff --git a/src/views/modules/heart/actinfo-list.vue b/src/views/modules/heart/actinfo-list.vue index 378aca3d..eb47711a 100644 --- a/src/views/modules/heart/actinfo-list.vue +++ b/src/views/modules/heart/actinfo-list.vue @@ -2,33 +2,44 @@
- + - - - + + - - + + + + + + + + + + + + + + + + + + + + {{ $t('query') }} @@ -101,8 +112,10 @@ export default { dataForm: { actStatus: '', startTime: '', - endTime: '' + endTime: '', + title:'', //新增活动标题查询 }, + time:[], addOrUpdateVisible: false, actInfoDetailVisible: false, actUserRelationVisible: false, @@ -172,7 +185,17 @@ export default { this.$refs.actinfoCancel.init() }) } - } + }, + setRegistTime () { //时间处理 + if (null == this.time){ + this.dataForm.startTime = '' + this.dataForm.endTime = '' + }else { + console.log(this.time[0]) + this.dataForm.startTime = this.time[0] + this.dataForm.endTime = this.time[1] + } + }, } } diff --git a/src/views/modules/heart/actuserclock-detail.vue b/src/views/modules/heart/actuserclock-detail.vue index c5ea0221..988a7341 100644 --- a/src/views/modules/heart/actuserclock-detail.vue +++ b/src/views/modules/heart/actuserclock-detail.vue @@ -149,7 +149,8 @@ export default { status:'', }, previewImgList: [], - isAble: false + isAble: false, + ifTime:false, } }, mounted () { @@ -299,6 +300,8 @@ export default { this.getDataList() }) .catch(() => {}) + //判断该活动是否结束 + this.activityEndNo(); }, capacity (data) { if (data.radius > 0 && data.radius <= 25) { @@ -338,6 +341,9 @@ export default { if (this.dataList == undefined || this.dataList.length <= 0){ return this.$message.error('请先确认打卡信息') } + if (!this.ifTime){ + return this.$message.error('请活动结束之后再来增加积分!!!') + } if (this.dataForm.failureReason.length > 100) { return this.$message.error('处理意见不超过100字') } @@ -368,7 +374,20 @@ export default { }, 1000, { leading: true, trailing: false } - ) + ), + //判断活动是否结束的方法 + activityEndNo(){ + this.$http.get(`/heart/actinfo/ifTime/${this.dataForm.actId}`) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + let a = res.data; + if (a === "1"){ + this.ifTime = true; + } + }) + } } }