<template>
	<view class="safe-area-inset-bottom">
		<navigator :url="`/party/pages/activity/detail?id=`+item.id" hover-class="none"  class="card" v-for="(item,index) in list" :key="index">
			<view class="left">
				<image :src="item.img" mode="">
					<view class="cu-tag sm bg-pass" style="position: absolute;left: 0;top: 0;" >
						<text v-if="item.activityStatus==1">进行中</text>
						<text v-if="item.activityStatus==0">已关闭</text>
					</view>
					<!-- <view style="position: absolute;left: 0;bottom: 0;right: 0;background-color: rgba(0,0,0,.4);color: #FFFFFF;font-size: 24rpx;height: 46rpx;line-height: 46rpx;">
						<text class="cuIcon-people" style="padding:0 4rpx;"></text>
						<text>{{item.enrollCount || 0}}人已报名</text>
					</view> -->
				</image>
			</view>
			<view class="right">
				<text class="title text-cut-2">{{item.name}}</text>
				<view class="time">
					<view class="">
						<text class="cuIcon-people padding-right-10"></text>
						<text>报名人数：{{item.enrollCount || 0}}</text>
					</view>
					<view class="padding-top-10">
						<text class="cuIcon-time padding-right-10"></text>
						<text>时间：{{item.beginTime | date('yyyy-mm-dd') }} 至  {{item.endTime | date('yyyy-mm-dd')}}</text>
					</view>
				</view>
			</view>
		</navigator>
	</view>
</template>

<script>
export default {
	data() {
		return {
			
		}
	},
	props:{
		list:Array
	},
	filters: {
	  formatDate (ndate,fmt) {
		  const date = new Date(ndate.replace(/\-/g, '/'))
		  let o = {   
			"M+" : date.getMonth()+1,                 //月份   
			"d+" : date.getDate(),                    //日   
			"h+" : date.getHours(),                   //小时   
			"m+" : date.getMinutes(),                 //分   
			"s+" : date.getSeconds(),                 //秒   
			"q+" : Math.floor((date.getMonth()+3)/3), //季度   
			"S"  : date.getMilliseconds()             //毫秒   
		  };   
		  if(/(y+)/.test(fmt))   
			fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length));   
		  for(var k in o)   
			if(new RegExp("("+ k +")").test(fmt))   
		  fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));   
		  return fmt;   
	  }
    },
	methods: {
		
	}
}
</script>

<style lang="scss">
page{
	background-color: #FFFFFF;
}
.card{
	padding:15rpx 20rpx;
	display: flex;
	background-color: #FFFFFF;
	border-bottom: 4rpx solid #F1F1F1;
	
	.left{
		position: relative;
		image{
			display: block;
			position: relative;
			width: 190rpx;
			height: 200rpx;
			border-radius: 6rpx;
		}
	}
	
	.right{
		width: 100%;
		padding-left: 20rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-around;
		.title{
			width: 100%;
			color: #1a1a1a;
			font-size: 32rpx;
			font-weight: 800;
		}
		
		.time{
			display: flex;
			flex-direction: column;
			width: 100%;
			text{
				color:  #7a7a7a;
				padding-bottom: 10rpx;
			}
		}
	}
}
</style>