<template>
<div class="prizeResult">
    <div class="gxn">
		<img src="./img/mod.png" class="mod">
		<div class="gxn-box">
			<img src="./img/gxn.png" alt="">
			<div  class="jifen-info">
				<div class="jifen">获得<span>88</span>积分</div>
				<div class="stxt">您已累计获得4000积分</div>
				<div class="stxt">请前往积分商城进行兑换</div>
			</div>
		</div>
	</div>
	<div class="btn-box">
		<button class="duihuan">立即兑换</button>
		<button class="saoma">继续扫码</button>
	</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: "prizeResult",
	props: ["comp", "cfg", "selectedPage"],
	data() {
		return {
			danpic:"",
			prizeMask:false,
			showPrize:false,
			ruleMask:false,
			cz:1,
			zaFlag:false //防止多次砸蛋
		};
	},
	created: function() {
		// var that = this;
		// this.mergeCompProps(this.comp);
		this.danpic = dan;
		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;
		},
		zajindan(){
			if(this.zaFlag){
				return;
			}
			this.cz = 2;
			setTimeout(()=>{
				this.danpic = danlie;
				this.zaFlag = true;
				this.cz = 3;
			},600);
			setTimeout(()=>{
				this.prizeMask = true;
			},1200);
		}
	}
};
</script>

<style scoped>
.prizeResult{
	background: url("./img/bg.png");
	height: 100vh;
	padding-top: 6rem;
	box-sizing: border-box;
	background-size: 100% 100%;
}
.gxn{
	position: relative;
	width: 100%;
	margin: 0 auto;
	text-align: center;
}
.gxn-box{
	width: 80%;
	margin: 0 auto;
}
.gxn img{
	width: 100%;
}
.jifen-info{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	color: #fff;
	padding-top: 5rem;
}
.jifen{
	margin-bottom: 1rem;
}
.jifen span{
	font-size: 5rem;
}
.stxt{
	font-size: .8rem;
}
.mod{
	position: absolute;
	left: 0;
	bottom: -11rem;
	width: 100%;
	z-index: 20;
}
@media screen and (min-width: 500px) {
	.mod{
		position: absolute;
		left: 0;
		bottom: -16rem;
		width: 100%;
		z-index: 20;
	}
	.jifen-info{
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		color: #fff;
		padding-top: 10rem;
	}
}
@media screen and (min-width: 768px) {
	.mod{
		position: absolute;
		left: 0;
		bottom: -20rem;
		width: 100%;
		z-index: 20;
	}
	.jifen-info{
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		color: #fff;
		padding-top: 10rem;
	}
}
.btn-box{
	padding: 1rem 1.5rem;
	position: relative;
	z-index: 50;
}
.duihuan{
	width: 100%;
	height: 2.4rem;
	margin-bottom: 1rem;
	background: #fff;
	color: #3b8afc;
	border: none;
	font-size: 1rem;
	border-radius: 5px;
	outline: none;
}
.saoma{
	width: 100%;
	height: 2.4rem;
	background:transparent;
	color: #fff;
	border: 1px solid #fff;
	font-size: 1rem;
	border-radius: 5px;
	outline: none;
}
</style>
