<template>
	<view>
		<view class="list">
			<view class="item" v-for="(item,index) in list" :key="index" @click="go_h5(item.id)">
				<view class="left">
					<image
						src="https://cdn.colorhub.me/WVXVGE4diOu9Yss0DxCy_j-YfGBA4xDRwsos4PyE_Jk/rs:auto:280:0:0/g:ce/bG9jYWw6Ly8vOTkv/N2QvMGVjMDQ0MGY4/ZDkyZWU4ZTdmMDg0/YjM4MzUxNDI5MTMz/ZGM5OTk3ZC5qcGVn.jpg"
						mode="aspectFill"></image>
				</view>
				<view class="right">
					<view class="title">
						<view class="name">{{item.name}}</view>
						<view class="tip">拼图</view>
					</view>
					<view class="text"></view>
					<view class="content">
						<view class="time">{{item.start_time}}</view>
						<view class="box">
							<view class="line">
								<view class="line_box" :style="{width: + item.percent_complete + '%'}"></view>
							</view>
							<view class="num">{{item.percent_complete}}%</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		name: "t-o-news-tab-3",
		data() {
			return {
				list: []
			};
		},
		created() {
			this.get_jigsawPuzzle_specialList()
		},
		methods: {
			get_jigsawPuzzle_specialList() {
				this.$api.jigsawPuzzle_specialList({

				}).then((res) => {
					console.log(res.data.data)

					const data = res.data.data

					data.forEach((item, index) => {
						this.list = this.list.concat(item.special_list)
					})
				})
			},
			go_h5(id) {
				uni.navigateTo({
					url: "../../origanization/news/tab_3/h5/h5?id="+id
				})
			}
		}
	}
</script>

<style lang="scss">
	.list {
		box-sizing: border-box;
		padding: 0 25rpx;

		.item {
			width: 700rpx;
			margin-bottom: 20rpx;

			box-sizing: border-box;
			padding: 20rpx;
			padding-top: 24rpx;

			background-color: #FFFFFF;
			display: flex;

			.left {
				width: 180rpx;

				image {
					width: 180rpx;
					height: 180rpx;

					border-radius: 10rpx;
				}
			}

			.right {
				width: 450rpx;
				margin-left: 20rpx;

				.title {
					display: flex;
					justify-content: space-between;
					align-items: center;

					.name {
						font-size: 26rpx;
						color: #f39800;

						overflow: hidden;
						white-space: nowrap;
						text-overflow: ellipsis;
					}

					.tip {
						width: 75rpx;
						text-align: center;
						font-size: 24rpx;
						color: #f39800;
						border: 1rpx solid #f39800;
						border-radius: 10rpx;
					}
				}

				.text {
					height: 80rpx;
					margin-top: 8rpx;
					font-size: 28rpx;

					text-overflow: -o-ellipsis-lastline;
					overflow: hidden;
					text-overflow: ellipsis;
					display: -webkit-box;
					-webkit-line-clamp: 2;
					line-clamp: 2;
					-webkit-box-orient: vertical;
				}

				.content {

					.time {
						margin-right: 60rpx;
						text-align: right;
						font-size: 24rpx;
						color: #999999;
					}

					.box {
						display: flex;
						align-items: center;

						.line {
							width: 400rpx;
							height: 6rpx;
							background-color: #E4E4E4;
							border-radius: 10rpx;

							.line_box {
								width: 36%;
								height: 6rpx;
								background-color: #009FE8;
								border-radius: 10rpx;
							}
						}

						.num {
							margin-left: 10rpx;
							font-size: 24rpx;
							color: #009FE8;
						}
					}

				}
			}
		}
	}
</style>
