打卡次数

This commit is contained in:
shijingjing
2023-02-09 16:19:13 +08:00
parent afdbfec823
commit d3bb4d4f0b

View File

@@ -19,13 +19,14 @@
<div class="time">{{ item.createDate }}</div>
<div class="tips">打卡成功</div>
</div>
<div class="count">{{ item.times}}</div>
</div>
</scroll-view>
</div>
<div class="sign_btn">
<div class="btn" @click="signIn" :class="status==0? '': 'active'">
<div>{{ status==1? '已打卡':'打卡'}}</div>
<div class="btn" @click="signIn">
<div>打卡</div>
<div>{{ time }}</div>
</div>
</div>
@@ -41,9 +42,9 @@ export default {
return {
time: '',
today: '',
status: 0, // 打卡状态0、未打卡1、已打卡
signlist: [],
current: 1,
flag: false,
}
},
computed: {
@@ -73,16 +74,16 @@ export default {
},
// 打卡
signIn() {
if(this.status == 1) {
return this.$u.toast("已打卡,请勿重复打卡!")
}
if(this.flag) return
this.flag = true
this.$http.post(`/api/appwechatsigninfo/sign`).then(res=> {
if(res.code == 0) {
this.$u.toast(`打卡成功`)
this.getToday()
this.getList()
}
}).catch(err=> console.log(err))
}).catch(err=> this.$u.toast(err))
}
},
onShow() {
@@ -183,6 +184,14 @@ export default {
margin-top: 8px;
}
}
.count {
margin-left: auto;
align-self: center;
color: #4783FF;
font-weight: 600;
font-size: 36px;
}
}
}
@@ -223,10 +232,6 @@ export default {
font-size: 28px;
}
}
.active {
background-image: linear-gradient(180deg, #bcff75 0%, hsl(132, 87%, 30%) 100%);
}
}
}
</style>