<template>
	<view class="vip-card">
		<view class="vip-content">
			<view>
				<view class="name">VIP<text class="text">会员中心</text></view>
				<view class="remark">成为VIP尊享会员可享受更多权益~</view>
			</view>
			<view class="vip-btn" v-if="userInfo.isVip">
				<u-icon name="eye-fill" size="26"></u-icon>
				<text class="text">查看特权</text>
			</view>
			<view class="vip-btn" v-else>
				<u-icon name="lock-fill" size="26"></u-icon>
				<text class="text">立即开通</text>
			</view>
		</view>
	</view>
</template>

<script>
	import sheep from '@/sheep'; 
	export default {
		data() {
			return {
				
			}
		},
		computed: {
			userInfo: {
			    get() {
			      return sheep.$store('user').userInfo;
			    },
			},
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.vip-card {
		background: linear-gradient(-120deg, #2bab89, #388772, #3e8472, #227761);
		width: 100%;
		height: 64px;
		border-radius: 6px;
		position: relative;
		z-index: 1;
		margin-bottom: 30rpx;
		
		.vip-content {
			position: absolute;
			left: 0;
			right: 0;
			top: 0;
			bottom: 0;
			color: #fff;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0px 15px;
			
			.name {
				color: #a8f9e4;
				font-size: 15px;
				font-weight: bold;
				margin-bottom: 5px;
				display: flex;
				align-items: center;
			}
			
			.text {
				font-size: 12px;
			}
			
			.remark {
				font-size: 10px;
				color: #0fe3ac;
			}
			
			.vip-btn {
				background: linear-gradient(-120deg, #2c8970, #3c8975, #39a287, #0eb68b);
				padding: 7px 10px;
				border-radius: 40px;
				font-size: 10px;
				
				.text {
					margin-left: 2px;
					color: #dafff5;
				}
			}
		}
	}
	
	.vip-card:after {
		content: " ";
		position: absolute;
		z-index: -1;
		width: 100%;
		height: 100%;
		left: 0;
		bottom: 0;
		border-radius: inherit;
		opacity: 1;
		-webkit-transform: scale(1, 1);
		transform: scale(1, 1);
		background-size: 100% 100%;
	}
</style>