<template>
	<view class="ayuu">
 
		<view class="xuehhbfr">
			<view class="indhuyr">
				<view class="indjbrr"></view>
				<text>今天</text>
			</view>
			<view>
				<view v-if="today.length==0" style="text-align: center; width: 100%;">暂无数据</view>
				<view v-for="(item,index) in today" :key="index" class="fzctob xiekkt">
					<view class="sckjert" style="overflow: hidden;">
						<image :src="item.img" mode="aspectFill" style="width: 100%; height: 100%;"></image>
					</view>
					<view class="fsxto" style="width: 100%;margin-left: 24rpx;">
						<view class="cphrry"><text>{{item.title}}</text></view>
						<view class="cptxtyra" style="margin-top: 4rpx;margin-bottom: 0;"><text>观看至{{item.catalog_title}}</text></view>
					</view>
				</view>
				
			</view>
		</view>
		
		<view class="xuehhbfr">
			<view class="indhuyr">
				<view class="indjbrr"></view>
				<text>昨天</text>
			</view>
			<view>
				<view v-if="yesterday.length==0" style="text-align: center; width: 100%;">暂无数据</view>
				<view v-for="(item,index) in yesterday" :key="index" class="fzctob xiekkt">
					<view class="sckjert" style="overflow: hidden;">
						<image :src="item.img" mode="aspectFill" style="width: 100%; height: 100%;"></image>
					</view>
					<view class="fsxto" style="width: 100%;margin-left: 24rpx;">
						<view class="cphrry"><text>{{item.title}}</text></view>
						<view class="cptxtyra" style="margin-top: 4rpx;margin-bottom: 0;"><text>观看至{{item.catalog_title}}</text></view>
					</view>
				</view>
				
			</view>
		</view>
		
		<view class="xuehhbfr">
			<view class="indhuyr">
				<view class="indjbrr"></view>
				<text>更早</text>
			</view>
			<view>
				<view v-if="earlier.length==0" style="text-align: center; width: 100%;">暂无数据</view>
				<view v-for="(item,index) in earlier" :key="index" class="fzctob xiekkt">
					<view class="sckjert" style="overflow: hidden;">
						<image :src="item.img" mode="aspectFill" style="width: 100%; height: 100%;"></image>
					</view>
					<view class="fsxto" style="width: 100%;margin-left: 24rpx;">
						<view class="cphrry"><text>{{item.title}}</text></view>
						<view class="cptxtyra" style="margin-top: 4rpx;margin-bottom: 0;"><text>观看至{{item.catalog_title}}</text></view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<style>
	page {
		background: #FAFAFA;
	}
</style>
<script>
	export default {
		data() {
			return {
                page:1,
                num:20,
                total:0,
                today:[],
                yesterday:[],
                earlier:[],
			}
		},
        onLoad() {
          this.getlist()  
        },
        methods:{
            getlist(){
                this.$post({
                    data:{
                        do:'MyCourse',
                        data:{
                            user_id:uni.getStorageSync('id'),
                        }
                    }
                }).then(res=>{
                    console.log(res)
                    this.today = res.data.today
                    this.yesterday = res.data.yesterday
                    this.earlier = res.data.earlier
                })
            }
        }


	}
</script>

<style lang="scss" scoped>
	 
 
 
	 
	 
</style>
