<template>
	<BaseContainer class="file-download flex">
		<NavBar title="文件下载" />
		<view class="file-box">
			<view class="file-list">
				<view v-for="(item, index) in fileList" :key="index" class="file-item flex">
					<image :src="item.pic" mode="aspectFill"></image>
					<view class="file-info flex">
						<view class="info-top">{{ item.name }}</view>
						<view class="info-bottom flex flex-center-x">
							<text>{{ item.downloadCount }}人已下载</text>
							<text>去下载</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</BaseContainer>
</template>

<script>
	export default {
		data() {
			return {
				fileList: [
					{ pic: '', name: '雅思托福文件资料下载雅思托福 文件资料下载', url: '', downloadCount: 10000 },
					{ pic: '', name: '雅思托福文件资料下载雅思托福 文件资料下载', url: '', downloadCount: 10000 },
					{ pic: '', name: '雅思托福文件资料下载雅思托福 文件资料下载', url: '', downloadCount: 10000 },
				]
			};
		},
	};
</script>

<style lang="scss" scoped>
	.file-download {
		flex-direction: column;
		.file-box {
			flex: 1;
			width: 690rpx;
			margin: 0 auto ;
			padding-top: 20rpx;
			.file-list {
				.file-item {
					height: 180rpx;
					background: #fff;
					padding: 20rpx 16rpx 24rpx;
					margin-bottom: 20rpx;
					>image {
						width: 210rpx;
						height: 136rpx;
						margin-right: 33rpx;
						flex-shrink: 0;
					}
					.file-info {
						flex: 1;
						flex-direction: column;
						justify-content: space-between;
						.info-top {
							font-size: 28rpx;
							line-height: 35rpx;
							height: 70rpx;
							color: #333;
							-webkit-line-clamp: 2;
							text-overflow: ellipsis;
							display: -webkit-box;
							-webkit-box-orient: vertical;
						}
						.info-bottom {
							color: #666;
							font-size: 20rpx;
							justify-content: space-between;
							>text:last-child {
								width: 110rpx;
								height: 38rpx;
								background: #0F74BB;
								border-radius: 19rpx;
								color: #fff;
								text-align: center;
								line-height: 38rpx;
							}
						}
					}
				}
			}
		}
	}
</style>