打卡次数
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user