<template>
	<view class="container home clearfix">
		<view class="coupon-title" v-if="userIdentity == 4">优惠券仅限{{userName}}（机构）使用 </view>
		<view class="coupon-title" v-if="userIdentity == 2">优惠券仅限{{userName}}使用 </view>
		<image class="coupon-image" src="http://static.caimei365.com/app/meibohui/meibo_coupon_04.jpg" mode=""></image>
	</view>
</template>

<script>
	import { mapState,mapMutations} from 'vuex';
	export default {
		components:{
			
		},
		data() {
			return {
				userName:'',
				userIdentity:0
			}
		},
		onLoad() {

		},
		computed: {
			...mapState(['hasLogin','userInfo','identity','isActivity'])
		},
		methods: {

		},
		onShow(){
			this.$api.getComStorage('userInfo').then((resolve) =>{
				this.userName = resolve.name;
				this.userIdentity = resolve.userIdentity
			}).catch(error =>{
				
			})
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #ff2e4c;
	}
	.container{
		width: 100%;
		height: auto;
		.coupon-title{
			width: 100%;
			height: 110rpx;
			line-height: 110rpx;
			font-size: $font-size-28;
			font-weight: bold;
			background-image: linear-gradient(0deg, #fffaec 0%, #fff7d6 50%, #fff4b9 100%), linear-gradient(#fffaef, #fffaef);
			box-sizing: border-box;
			padding: 0 24rpx;
			white-space: nowrap;
			text-overflow: ellipsis;
			overflow: hidden;
			color: #fd3c5b;
			text-align: center;
		}
		.coupon-image{
			width: 100%;
			height: 2381rpx;
			display: block;
			
		}
	}
</style>
