You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zhishifufei_uniapp/pages/learningCenter/clockRecord.vue

181 lines
4.1 KiB

9 months ago
<template>
<BaseContainer class="record flex">
<NavBar title="打卡记录" />
9 months ago
<image :src="getImgPath('/static/frontend/record-bg.png')" mode="aspectFill" class="bg"></image>
9 months ago
<view class="record-container">
<view class="record-info flex">
<view class="total">
<view>累计打卡</view>
<view><text>{{ totalClock }}</text><text></text></view>
</view>
<view class="line"></view>
<view class="today">
<view>今日打卡</view>
<view :style="{ color: todayClock ? '#52C794' : '' }">{{ todayClock ? '已打卡' : '暂未打卡' }}</view>
</view>
</view>
<view class="calendar-box">
<calendar />
</view>
<view class="record-list">
<view class="list-title">
打卡记录
</view>
<view v-for="(item, index) in recordList" :key="index" class="list-item">
<view class="item-top flex flex-center-x">
<view>{{ item.name }}</view>
<view>{{ item.score }}</view>
</view>
<view class="item-bottom flex flex-center-x">
<view>用时{{ item.time }}</view>
<view>{{ item.date }}</view>
</view>
</view>
</view>
</view>
</BaseContainer>
</template>
<script>
import Calendar from './components/calendar.vue';
export default {
components: {
Calendar,
},
data() {
return {
totalClock: 50,
todayClock: false,
recordList: [
{ name: '英语四级考试专项训练', time: '01:23:52', score: '98', date: '2023-10-20' },
{ name: '英语四级考试专项训练', time: '01:23:52', score: '98', date: '2023-10-20' },
{ name: '英语四级考试专项训练', time: '01:23:52', score: '98', date: '2023-10-20' },
{ name: '英语四级考试专项训练', time: '01:23:52', score: '98', date: '2023-10-20' },
{ name: '英语四级考试专项训练', time: '01:23:52', score: '98', date: '2023-10-20' },
]
};
},
methods: {
},
};
</script>
<style lang="scss" scoped>
.record {
flex-direction: column;
.bg {
position: absolute;
top: 0;
left: 0;
width: 750rpx;
height: 743rpx;
z-index: 0;
}
.record-container {
flex: 1;
padding-top: 60rpx;
.record-info {
justify-content: space-between;
margin-bottom: 50rpx;
padding: 0 150rpx;
>view {
color: #333;
font-size: 30rpx;
line-height: 30rpx;
&.line {
width: 2rpx;
height: 76rpx;
background: #EEEEEE;
}
>view:last-child {
height: 70rpx;
font-size: 38rpx;
color: #666;
margin-top: 27rpx;
>text {
font-size: 24rpx;
color: #999;
&:first-child {
font-size: 70rpx;
color: #3293FF;
}
}
}
}
}
.calendar-box {
width: 690rpx;
// height: 630rpx;
background: #fff;
border-radius: 10rpx;
margin: 0 auto;
position: relative;
padding: 0 35rpx;
&:before {
content: '';
width: 12rpx;
height: 36rpx;
background: linear-gradient(0deg, #DCEBF4 0%, #3293FF 100%);
border-radius: 6rpx;
position: absolute;
top: -18rpx;
left: 100rpx;
}
&:after {
content: '';
width: 12rpx;
height: 36rpx;
background: linear-gradient(0deg, #DCEBF4 0%, #3293FF 100%);
border-radius: 6rpx;
position: absolute;
top: -18rpx;
right: 100rpx;
}
}
.record-list {
background: #fff;
border-radius: 10rpx;
padding: 40rpx 30rpx;
width: 690rpx;
margin: 20rpx auto 0;
.list-title {
text-align: center;
color: #333333;
font-size: 34rpx;
margin-bottom: 20rpx;
}
.list-item {
border-bottom: 1rpx solid #F0F0F0;
padding: 30rpx 0;
>view {
justify-content: space-between;
&.item-top {
color: #333333;
font-size: 30rpx;
line-height: 30rpx;
margin-bottom: 15rpx;
>view:last-child {
color: #3293FF;
font-size: 32rpx;
}
}
&.item-bottom {
font-size: 22rpx;
color: #999797;
line-height: 22rpx;
}
>view {
&:first-child {
width: 400rpx;
}
&:last-child {
margin-left: auto;
}
}
}
}
}
}
}
</style>