<template>
	<view>
		<view class="list">
			<view class="item" v-for="(item,index) in list" :key="index">
				<view class="title">{{item.title}}</view>
				<view class="box">
					<view class="box_item" v-for="(item_2,index_2) in item.special_list" :key="index_2" @click="go_h5(item_2.id)">
						<view class="time">有效时间：{{item_2.start_time}}——{{item_2.end_time}}</view>
						<view class="inner">
							<view class="left">
								{{item_2.name}}
							</view>
							<view class="right">
								<image src="./icon/btn.png"></image>
							</view>
						</view>
						<view class="bottom">
							<view class="line">
								<view class="line_box" :style="{width: + item_2.percent_complete + '%'}"></view>
							</view>
							<view class="num">{{item_2.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)
					// })
					this.list = res.data.data
					// console.log(this.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 {
			margin-top: 60rpx;
			width: 700rpx;
			margin-bottom: 20rpx;

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

			background: #FFFFFF;
			border: 3rpx solid #202492;
			border-radius: 20rpx;
			
			position: relative;

			.title{
				position: absolute;
				top: -35rpx;
				left: 50rpx;
				
				width: 250rpx;
				height: 70rpx;
				line-height: 70rpx;
				border-radius: 10rpx;
				
				background-image: url(./icon/title.png);
				background-size: cover;
				background-repeat: no-repeat;
				
				text-align: center;
				
				font-size: 42rpx;
				font-family: FZLanTingHeiS-B-GB;
				font-weight: 700;
				color: #00A0E8;
				text-shadow: 3rpx 5rpx 4rpx rgba(0, 103, 150, 0.76);
				-webkit-text-stroke: 1rpx #FFFFFF;
				text-stroke: 1rpx #FFFFFF;
			}
			.box{
				.box_item{
					margin-bottom: 20rpx;
					background-image: url(./icon/bg.png);
					background-size: 100% 100%;
					background-repeat: no-repeat;
					
					box-sizing: border-box;
					padding: 20rpx 30rpx;
					
					.time{
						display: inline-block;
						
						background-color: #FBDF33;
						box-sizing: border-box;
						padding: 5rpx 10rpx;
						font-size: 24rpx;
						
						border: 1rpx solid #000000;
						box-shadow: 0rpx 3rpx 0rpx 0rpx rgba(0, 76, 110, 0.61);
						border-radius: 20rpx;
					}
					.inner{
						margin-top: 20rpx;
						display: flex;
						justify-content: space-between;
						align-items: center;
						.left{
							color: #FFFFFF;
						}
						.right{
							margin-left: 20rpx;
							image{
								width: 76rpx;
								height: 76rpx;
								display: block;
							}
						}
					}
					.bottom {
						margin-top: 20rpx;
						display: flex;
						align-items: center;
					
						.line {
							width:520rpx;
							height: 6rpx;
							background-color: #E4E4E4;
							border-radius: 10rpx;
					
							.line_box {
								width: 36%;
								height: 6rpx;
								background-color: #00FFFF;
								border-radius: 10rpx;
							}
						}
					
						.num {
							margin-left: 10rpx;
							font-size: 24rpx;
							color: #FFFFFF;
						}
					}
				}
			}
		}
	}
</style>
