<template>
<div class="game">
    <div class="game-box">
		<div class="img-yqjl">
			<img src="./img/gztxt.png" @click="showRule()"/>
		</div>
		<img src="./img/zhuti.png" class="img-zhuti">
		<img src="./img/cp.png" class="center-k">
		<div class="synthesis-redpackage">
			<button @click="showPrize()">领取专属优惠</button>
		</div>
    </div>
    <!-- 中奖 -->
    <div class="mask" v-show="prizeMask">
		<div class="w-prize">
			<img src="./img/gxn.png" class="gxn">
			<div class="prize-info">获得新品优惠特权</div>
			<div class="prize-hbinfo2"><img src="./img/yhq.png" alt=""></div>
			<div>
				<button class="yaoqing-btn" @click="showPopup()">立即使用</button>
			</div>
		</div>
		<div class="clear-div">
			<span class="clear" @click="clear()"></span>
		</div>
	</div>
	<!-- 规则 -->
    <div class="mask" v-show="ruleMask">
		<div class="rule-box">
			<div class="clear-gz">
				<img src="./img/hdgz.png" class="tc-icon">
				<span class="clear" @click="clear()"></span>
			</div>
			<img src="./img/gz.png" class="gz-title">
			<div class="rule-info">
				<h4>活动时间</h4>
				<p>2020/03/24</p>
				<h4>活动范围</h4>
				<p>全国（不包括港澳台地区）</p>
				<h4>活动范围</h4>
				<p>一等奖</p>
				<p>二等奖</p>
				<p>三等奖</p>
			</div>
		</div>
	</div>
</div>
</template>

<script>
import { Toast } from "mint-ui";
import apiHelper from "@/assets/js/apiHelper.js";
import { Indicator } from "mint-ui";
import ut from "@/assets/js/utils.js";

export default {
	name: "customerRecommendation",
	props: ["comp", "cfg", "selectedPage"],
	data() {
		return {
			prizeMask:false,
			ruleMask:false,
		};
	},
	created: function() {
		// var that = this;
		// this.mergeCompProps(this.comp);

		switch (this.sup8.env) {
			case this.sup8._def.env.design:
				this.env = "设计器模式";
				this.envType = "design";
				break;
			case this.sup8._def.env.preview:
				this.env = "预览模式";
				break;
			case this.sup8._def.env.run:
				this.env = "运行模式";
				break;
			default:
				break;
		}
	},
	mounted() {
	},
	methods: {
		showRule(){
			this.ruleMask=true;
		},
		clear(){
			this.prizeMask = false;
			this.ruleMask = false;
		},
		showPrize(){
			this.prizeMask = true;
		}
	}
};
</script>

<style scoped>
.game{
  min-height: 100vh;
  background-color: #9d1927;
  background-image: url("./img/bg.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.game-box{
	position: relative;
}
.img-yqjl{
	padding: 1rem 1rem;
	text-align: right;
}
.img-yqjl img{
	width: 5rem;
}
.img-bg {
	box-sizing: border-box;
	width: 100%;
	overflow: hidden;
	z-index: 1;
}
.center-k{
	margin: 0 auto;
	width: 100%;
    display: block;
}
.logo{
	text-align: center;
	margin: 0 auto;
	color: #fff;
	font-size: 1.5rem;
}
.img-zhuti{
	display: block;
	width: 70%;
	margin: 0 auto 1.5rem;
}
.synthesis-redpackage{
	position: absolute;
	width: 100%;
	bottom: 0;
	padding: 1rem 0;
	text-align: center;
}
.synthesis-redpackage button{
	width: 80%;
	height: 2.2rem;
	border-radius: 5px;
	border: none;
	background: #9d1313;
	color: #fff;
}
.btn-div{
	position: absolute;
	width: 100%;
	left: 0;
	bottom: 4rem;
	text-align: center;
	color: #fff;
}
.btn-div button{
	width: 70%;
	height: 2.8rem;
	border-radius: 2.8rem;
	background: linear-gradient(#ffe983, #fbc35a,#f7803a);
	border: none;
	font-size: 1.1rem;
	margin-bottom: 1rem;
	color: #fff;
}
.k-item-box{
	width: 20.8rem;
	margin: 0 auto;
}
.k-item{
	width: 4rem;
	float: left;
	margin-right: .2rem;
}
.k-item img{
	width: 100%;
}
.k-item:last-child{
	width: 4rem;
	float: left;
	margin-right: 0px;
}
.k-success{
	color: #fff;
	text-align: center;
}
.rule-btn{
	color: #fff;
	font-size: .9rem;
}
.rule-icon{
	display: inline-block;
	width: 0.9rem;
  	height: 1rem;
	/* background: url("./img/gzicon.png"); */
	background-size: 100% 100%;
	color: #7a0409;
	vertical-align: top;
}

.rule {
  position: absolute;
  width: 100%;
  top: 78%;
  text-align: center;
  font-size: 0.9rem;
  color: #404040;
}
.mask {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
}
.w-prize {
  position: fixed;
  padding: 3rem 4rem 0 4rem;
  top: 50%;
  left: 50%;
  width: 20rem;
  height: 20rem;
  margin-left: -10rem;
  margin-top: -10rem;
  background: url("./img/hbbg.png") no-repeat;
  background-size: 100% 100%;
  z-index: 10001;
  box-sizing: border-box;
  text-align: center;
  color: #fff;
}
.gxn{
	width: 8rem;
	display: block;
	margin: 0 auto 1.5rem auto;
}
/* .prize-hbinfo{
	margin-bottom: 1rem;
	font-size: .8rem;
	color: #ffff8c;
}
.prize-hbinfo span{
	font-size: 1.5rem;
} */
.prize-info{
	margin-bottom: 1rem;
	font-size: 1rem;
	color: #ffe5c4;
}
.prize-hbinfo2{
	margin-bottom: 1.5rem;
	font-size: .9rem;
	color: #ffff8c;
	padding: 0 .5rem;
}
.prize-hbinfo2 img{
	width: 100%;
}
.prize-info-tips{
	font-size: .8rem;
}
.yaoqing-btn{
	width: 90%;
	height: 2rem;
	border-radius: 2rem;
	color: #b62232;
	background: linear-gradient(#ffff8c, #f4c66a,#e98c49);
	border: none;
	font-size: 1rem;
}
.clear-div{
	padding: 1rem;
	text-align: right;
}
.tc-icon{
	float: left;
	width: 6rem;
}
.clear{
	float: right;
	width: 1.5rem;
	height: 1.5rem;
	/* display: inline-block; */
	background: url("./img/x.png");
	background-size: 100% 100%;
}
.rule-box{
	position: fixed;
	top: 50%;
	left: 50%;
	width: 80%;
	height: 30rem;
	margin-left: -40%;
	margin-top: -15rem;
	background-size: 100%;
	z-index: 10001;
	box-sizing: border-box;
	border: 3px solid #f7cd92;
	border-radius: 5px;
	background: #fff;
}
.clear-gz{
	position:absolute;
	padding: .8rem;
	top:0;
	left:0;
	width: 100%;
	text-align: right;
	box-sizing: border-box;
}
.gz-title{
	width: 100%;
}
.rule-info{
	padding: 0 .8rem;
	height: 23rem;
	overflow-y: scroll;
}
</style>
