Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="avatar_info">
|
||||
<div class="avatar_name">{{ user.name }}</div>
|
||||
<div class="avatar_time">{{ today }}</div>
|
||||
<div class="avatar_time">每天需要完成2次打卡,中间间隔6小时以上,才算完成打卡任务。</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">打卡记录</div>
|
||||
@@ -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,7 +42,6 @@ export default {
|
||||
return {
|
||||
time: '',
|
||||
today: '',
|
||||
status: 0, // 打卡状态:0、未打卡;1、已打卡
|
||||
signlist: [],
|
||||
current: 1,
|
||||
}
|
||||
@@ -73,16 +73,22 @@ 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.flag = false
|
||||
this.$u.toast(`打卡成功`)
|
||||
this.getToday()
|
||||
this.getList()
|
||||
} else {
|
||||
this.flag = false
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
}).catch(err=> console.log(err))
|
||||
}).catch(err=> {
|
||||
this.flag = false
|
||||
this.$u.toast(err)
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
@@ -115,11 +121,10 @@ export default {
|
||||
box-sizing: border-box;
|
||||
.avatar_img {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
@@ -183,6 +188,14 @@ export default {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.count {
|
||||
margin-left: auto;
|
||||
align-self: center;
|
||||
color: #4783FF;
|
||||
font-weight: 600;
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,10 +236,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