<style>
	.trade-activity {
		padding: 30rpx;
		background-color: #F6F6F6;
	}

	.trade_List {
		width: 100%;
		background-color: #fff;
		border-radius: 30rpx;
		margin-bottom: 20rpx;
		padding: 30rpx;
		display: flex;
	}

	.tradeImgDiv {
		width: 80px;
		height: 80px;
		flex-shrink: 0;
		border-radius: 20rpx;
		overflow: hidden;
		margin-right: 20rpx;
	}

	.tradeName {
		width:100%;
		display: flex;
		justify-content: space-between;
	}
	.Activity_Name{
		font-weight: bold;
		font-size: 30rpx;
		width:430rpx;
		color: #1F1F1F;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
	}
	.Activity_Time {
		color: #999999;
		font-size: 25rpx;
	}
	.trade_Btn{
		position: fixed;
		width:100%;
		bottom:35rpx;
		left:17%;
	}
</style>
<template>
	<view class="trade-activity" :style="{height:'calc(100vh  - '+pagePaddingBottom+')'}">
		<view class="trade_List" v-for="(item, index) in tradeData">
			<view class="tradeImgDiv">
				<image :src="item.CoverImg" style="width:100%;height:100%" mode="aspectFill"></image>
			</view>
			<view>
				<view class="tradeName">
					<view class="Activity_Name">{{item.ActivityName}}</view>
					<view>
						<u-checkbox-group>
							<u-checkbox v-model="item.IsCheck" :disabled="item.IsDefault"></u-checkbox>
						</u-checkbox-group>
					</view>
				</view>
				<view class="Activity_Time" style="margin-top:20rpx;">
					报名时间：{{item.StartTime}}
				</view>
				<view class="Activity_Time" style="margin-top:10rpx;">
					活动时间：{{item.EndTime}}
				</view>
			</view>
		</view>
		<view class="trade_Btn">
			<u-button size="80" :ripple="true" :custom-style="{
				  backgroundColor: mc,
				  height: '80rpx',
				  color: '#FFF',
				  fontSize: '14px',
				  margin: '0 3vw',
				  width: '60vw',
				}" @click="goSignUp()">立即报名</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		props: ["dataObj",'pagePaddingBottom'],
		data() {
			return {
				mc: '',
				tradeData: this.dataObj,
				Ids: ''
			}
		},
		mounted() {
			this.mc = this.$uiConfig.mainColor;
		},
		created() {
		},
		methods: {
			//跳转报名
			goSignUp() {
				let MyArray=[];
				this.tradeData.forEach(x=>{
					if(x.IsCheck){
						MyArray.push(x.Id);	
					}
				})
				this.Ids = MyArray.toString();				
				uni.navigateTo({
					url: "/pages/kotra/activeSignUp?Id=" + this.Ids
				});
			}
		},
	};
</script>

<style>

</style>
