打卡次数
This commit is contained in:
@@ -19,13 +19,14 @@
|
|||||||
<div class="time">{{ item.createDate }}</div>
|
<div class="time">{{ item.createDate }}</div>
|
||||||
<div class="tips">打卡成功</div>
|
<div class="tips">打卡成功</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="count">{{ item.times}}次</div>
|
||||||
</div>
|
</div>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sign_btn">
|
<div class="sign_btn">
|
||||||
<div class="btn" @click="signIn" :class="status==0? '': 'active'">
|
<div class="btn" @click="signIn">
|
||||||
<div>{{ status==1? '已打卡':'打卡'}}</div>
|
<div>打卡</div>
|
||||||
<div>{{ time }}</div>
|
<div>{{ time }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,9 +42,9 @@ export default {
|
|||||||
return {
|
return {
|
||||||
time: '',
|
time: '',
|
||||||
today: '',
|
today: '',
|
||||||
status: 0, // 打卡状态:0、未打卡;1、已打卡
|
|
||||||
signlist: [],
|
signlist: [],
|
||||||
current: 1,
|
current: 1,
|
||||||
|
flag: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -73,16 +74,16 @@ export default {
|
|||||||
},
|
},
|
||||||
// 打卡
|
// 打卡
|
||||||
signIn() {
|
signIn() {
|
||||||
if(this.status == 1) {
|
if(this.flag) return
|
||||||
return this.$u.toast("已打卡,请勿重复打卡!")
|
|
||||||
}
|
this.flag = true
|
||||||
this.$http.post(`/api/appwechatsigninfo/sign`).then(res=> {
|
this.$http.post(`/api/appwechatsigninfo/sign`).then(res=> {
|
||||||
if(res.code == 0) {
|
if(res.code == 0) {
|
||||||
this.$u.toast(`打卡成功`)
|
this.$u.toast(`打卡成功`)
|
||||||
this.getToday()
|
this.getToday()
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
}).catch(err=> console.log(err))
|
}).catch(err=> this.$u.toast(err))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -183,6 +184,14 @@ export default {
|
|||||||
margin-top: 8px;
|
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;
|
font-size: 28px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
|
||||||
background-image: linear-gradient(180deg, #bcff75 0%, hsl(132, 87%, 30%) 100%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user