feat: 完善签到页面
This commit is contained in:
@@ -1,8 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="everyday-box">
|
<div class="everyday-box">
|
||||||
<h4>每日签到页持续coding中~~~</h4>
|
<h4>每日签到</h4>
|
||||||
<h5>当前已连续签到{{number}}天</h5>
|
<h5>
|
||||||
<el-button type="primary" @click="signInOnclic">点击完成签到</el-button>
|
<el-button class="btn-signin" type="primary" @click="signInOnclic">点击完成今日签到</el-button>当前已连续签到{{number}}天
|
||||||
|
|
||||||
|
<el-tooltip >
|
||||||
|
<template #content>
|
||||||
|
1.每天随机3-10<br />
|
||||||
|
2.连续签到每次累加多+1<br />
|
||||||
|
3.随机到以9结尾,额外再获取1倍*2<br />
|
||||||
|
4.每次签到最大上限为30
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<span>说明<el-icon><WarningFilled /></el-icon></span>
|
||||||
|
</el-tooltip>
|
||||||
|
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
|
||||||
<el-calendar v-model="signInRecordData">
|
<el-calendar v-model="signInRecordData">
|
||||||
<template #date-cell="{ data }">
|
<template #date-cell="{ data }">
|
||||||
@@ -31,15 +45,20 @@ const signInOnclic = async () => {
|
|||||||
message: `恭喜!运气爆棚,今日获得:${data.value} 钱钱`,
|
message: `恭喜!运气爆棚,今日获得:${data.value} 钱钱`,
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
|
await loadSignInData();
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
const loadSignInData=async()=>{
|
||||||
//登录后才去查询签到记录
|
|
||||||
if (isLogin) {
|
if (isLogin) {
|
||||||
const { data:{signInItem,currentContinuousNumber} } = await signInRecord();
|
const { data:{signInItem,currentContinuousNumber} } = await signInRecord();
|
||||||
number.value=currentContinuousNumber;
|
number.value=currentContinuousNumber;
|
||||||
signInData.value=signInItem;
|
signInData.value=signInItem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
//登录后才去查询签到记录
|
||||||
|
await loadSignInData();
|
||||||
});
|
});
|
||||||
|
|
||||||
const containSameDay=(time)=>{
|
const containSameDay=(time)=>{
|
||||||
@@ -60,9 +79,18 @@ const isSameDay=(time1, time2)=> {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
.everyday-box {
|
.everyday-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
padding: 0px 30px;
|
||||||
|
.btn-signin
|
||||||
|
{
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
h5{
|
||||||
|
color: #181818;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.is-selected {
|
.is-selected {
|
||||||
color: #1989fa;
|
color: #1989fa;
|
||||||
|
|||||||
Reference in New Issue
Block a user