<template>
	<view class="contentlist">
		<view class="liststyle" v-for="item in props.list" :key="item.courseId" @tap="seVideo(item)">
			<image :src="item.titleImg" style="width: 188rpx;height: 247rpx;border-radius:21rpx 21rpx 21rpx 21rpx"
				mode=""></image>
			<view style="color: #333333;">
				{{item.title.slice(0,6)}}
			</view>
			<view style="color: #999999;">
				{{item.courseLabel}}
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		returnIsSafari
	} from '@/utils/app.js'
	const props = defineProps({
		list: {
			type: Array,
			default: []
		},
	})

	function seVideo(item) {
		uni.navigateTo({
			url:"/pages/video/detail?courseId="+item.courseId+"&courseDetailsId="+item.courseDetailsId
		})
	}
</script>

<style scoped lang="scss">
	.contentlist {
		display: flex;
		align-items: center;
		justify-content: space-around;
		flex-wrap: wrap;
		margin-top: 10rpx;
		padding: 0 26rpx;

		.liststyle {
			border-radius: 21rpx 21rpx 21rpx 21rpx;
			width: 30%;
			margin-top: 20rpx;

			>view {
				font-weight: 400;
				font-size: 25rpx;
				text-align: left;
			}
		}

		.liststyle:last-child {
			margin-right: auto;
			margin-left: 6rpx;
		}
	}
</style>