<template>
	<view class="">
		<view class="cu-card case card" v-for="(item,index) in list" :key="index" @click="$jump('/pages/activity/activity')">
			<view class="cu-item shadow">
				<view class="image">
					<image style="width: 100%;height: 450rpx;" :src="item.pic"></image>
				</view>
				<view class="content">
					<view class="top">
						<text class="title">{{item.name}}</text>
						<view v-if="item.introduce" class="desc text-cut-2">
							{{item.introduce}}
						</view>
					</view>
					<view class="bottom">
						<view class="">
							<image src="../../../static/del/map1.png" mode=""></image>
							<text>距此3.5km</text>
						</view>
						<view class="" @click.stop="checkLine(item)">
							<image style="width: 40rpx;height: 40rpx;" src="../../../static/del/lx.png" mode=""></image>
							<text>查看路线</text>
						</view>
						<view class="">
							<image src="../../../static/del/activitys.png" mode=""></image>
							<text>18个活动</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			list:Array
		},
		data(){
			return {
				
			}
		},
		methods:{
			checkLine(item){
				uni.openLocation({
					latitude:parseFloat(item.latitude),
					longitude:parseFloat(item.longitude)
				})
			}
		}
	}
</script>

<style lang="scss">
	.card{
		background-color: #FFFFFF;
		border-bottom: 1rpx solid #ececec;
	}
	
	.card:last-child{
		border: none;
	}
	
	.content{
		display: flex;
		flex-direction: column;
		.top{
			.title{
				font-weight: 800;
				font-size: 28rpx;
			}
			.desc{
				margin-top: 10rpx;
				color: #919191;
				font-size: 24rpx;
			}
		}
		
		.bottom{
			margin-top: 20rpx;
			display: flex;
			width: 100%;
			
			view{
				width: calc(100% / 3);
				display: flex;
				align-items: center;
				image{
					width: 30rpx;
					height: 30rpx;
				}
				
				text{
					font-size: 28rpx;
					margin-left: 6rpx;
				}
			}
			
			view:nth-child(1){
				justify-content: flex-start;
			}
			view:nth-child(2){
				justify-content: center;
			}
			view:nth-child(3){
				justify-content: flex-end;
			}
		}
	}
</style>
