打卡签到

This commit is contained in:
shijingjing
2023-03-30 15:31:55 +08:00
parent 06d6255d97
commit b69af7117c
2 changed files with 8 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@@ -51,8 +51,7 @@
</div>
<div class="btn-wrapper" v-if="info.type == 0">
<div class="btn" @click="clockIn" hover-class="text-hover" :class="isClock== 0? 'gray': isClock==3? 'gray': isClock== 2? 'opacity':''">
<div class="daka">{{ dkqd }}</div>
<div class="text" v-if="isClock==1">积分+{{ intoIntegral }}</div>
<div class="daka">{{ dkqd }}<span>/积分+{{ intoIntegral }}</span></div>
</div>
</div>
</div>
@@ -60,6 +59,7 @@
<script>
import { mapState } from 'vuex'
var QQMapWX = require('./libs/qqmap-wx-jssdk.js')
export default {
name: "taskDetail",
appName: "任务详情",
@@ -140,7 +140,7 @@ export default {
const inETimes = new Date(this.info.intoEndtime?.replaceAll('-', '/')).getTime() // 进场结束
const outSTimes = new Date(this.info.exitBegintime?.replaceAll('-', '/')).getTime() // 离场开始
const outETimes = new Date(this.info.exitEndtime?.replaceAll('-', '/')).getTime() // 离场结束
if (this.info.clockRange > this.distance && (this.info.intoClock && (inSTimes < times && times < inETimes)) || (this.info.exitClock && outSTimes < times && times < outETimes)) {
if (this.info.clockRange > this.distance && (this.info.intoClock && (times > inSTimes && times < inETimes)) || (this.info.exitClock && outSTimes < times && times < outETimes)) {
return `已打卡`
}
if (this.info.clockRange > this.distance && (!this.info.intoClock && (times > inSTimes && times < inETimes)) || !this.info.exitClock && (times > outSTimes && times < outETimes)) {
@@ -153,7 +153,6 @@ export default {
const times = new Date().getTime()
const inSTimes = new Date(this.info.intoBegintime).getTime() // 报名开始
const inETimes = new Date(this.info.intoEndtime).getTime() // 报名结束
console.log(inSTimes, inETimes, times);
// 1已报名
if (this.info.enrollClock) {
return 1
@@ -234,6 +233,10 @@ export default {
signUp() {
if(this.info.enrollClock) return
if(this.baoming==0) {
return this.$u.toast('不符合报名条件')
}
this.flag = true
this.daKa()
},