Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2023-02-10 18:19:47 +08:00

View File

@@ -7,7 +7,7 @@
</div> </div>
<div class="avatar_info"> <div class="avatar_info">
<div class="avatar_name">{{ user.name }}</div> <div class="avatar_name">{{ user.name }}</div>
<div class="avatar_time">{{ today }}</div> <div class="avatar_time">每天需要完成2次打卡中间间隔6小时以上才算完成打卡任务</div>
</div> </div>
</div> </div>
<div class="title">打卡记录</div> <div class="title">打卡记录</div>
@@ -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,7 +42,6 @@ export default {
return { return {
time: '', time: '',
today: '', today: '',
status: 0, // 打卡状态0、未打卡1、已打卡
signlist: [], signlist: [],
current: 1, current: 1,
} }
@@ -73,16 +73,22 @@ 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.flag = false
this.$u.toast(`打卡成功`) this.$u.toast(`打卡成功`)
this.getToday() this.getToday()
this.getList() 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() { onShow() {
@@ -115,11 +121,10 @@ export default {
box-sizing: border-box; box-sizing: border-box;
.avatar_img { .avatar_img {
width: 96px; width: 96px;
height: 96px;
img { img {
width: 100%; width: 96px;
height: 100%; height: 96px;
border-radius: 50%; border-radius: 50%;
} }
} }
@@ -183,6 +188,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 +236,6 @@ export default {
font-size: 28px; font-size: 28px;
} }
} }
.active {
background-image: linear-gradient(180deg, #bcff75 0%, hsl(132, 87%, 30%) 100%);
}
} }
} }
</style> </style>