<template>
	<view class="card-wrap">
		<view class="title-wrap">
			<view class="icon"></view>
			<view class="name">{{ name }}</view>
			<view @click="goDetail()" v-if="!notShow" class="detail">点击查看详情</view>
		</view>
		<view class="content-wrap">
			<slot name="content"></slot>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		props: ['name', 'notShow', 'data'],
		onLoad() {
	
		},
		methods: {
			goDetail() {
				this.$emit('goDetail', this.data)
			}
		}
	}
</script>

<style scoped>
	.card-wrap {
		overflow: hidden;
		background: #FFFFFF;
		box-shadow: 2rpx 14rpx 22px 0px rgba(0,0,0,0.13);
		border-radius: 14rpx;
	}
	.card-wrap .title-wrap {
		display: flex;
		align-items: center;
		height: 89rpx;
		padding: 24rpx 42rpx 24rpx 24rpx;
		background: linear-gradient(-90deg, #FFFFFF, #E6FAFF);
	}
	.card-wrap .title-wrap .icon {
		width: 6rpx;
		height: 100%;
		margin-right: 23rpx;
		background-color: #33C777;
	}
	.card-wrap .title-wrap .name {
		width: calc(100% - 29rpx - 132rpx);
		font-weight: 700;
		font-size: 33rpx;
		color: #343434;
	}
	.card-wrap .title-wrap .detail {
		color: #3394F9;
		font-size: 22rpx;
	}
	.content-wrap {
		background-color: #fff;
	}
</style>