<template>
	<view class="box">
		<view class="boxlist">
			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
				<image class="imgbox" :src="item.img" mode=""></image>
				<view class="dffd flex1">
					<view class="title elli">{{ item.title }}</view>
					<view class="textgrey fontsm">{{ item.up_name }}</view>
					<view v-if="flag == 2" class="auth dfsb">
						<text class="fontssm textgrey">作者：{{ item.up_name }}</text>
						<text class="fontssm textgrey">{{ item.see_num }}人下载</text>
					</view>
				</view>
				<image v-if="flag == 3" class="down" src="/static/img/pro/navdown.png" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	props: {
		list: {
			type: Array,
			default: []
		},
		flag: {
			type: [String, Number],
			default: 1
		}
	},
	methods: {
		nextTo(item) {
			uni.navigateTo({
				url: '/pages/index/video/videoInfo?id='+item.id
			});
		}
	}
};
</script>

<style scoped lang="scss">
.boxlist {
	.vidLi {
		width: 100%;
		padding: 27rpx 0;
		background-color: #fff;
		&:nth-of-type(2n) {
			margin-right: 0;
		}
		.imgbox {
			width: 146rpx;
			height: 146rpx;
			margin-right: 18rpx;
			border-radius: 10rpx;
		}
		.title {
			font-size: 28rpx;
			line-height: 40rpx;
			margin-bottom: 12rpx;
		}
		.auth {
			margin-top: 15rpx;
			width: 100%;
		}
		.down {
			width: 35rpx;
			height: 30rpx;
			margin-left: 58rpx;
		}
	}
}
</style>
