文件

84 行
2.3 KiB
HTML
可执行文件

<!doctype html>
<html>
<!--[1.4.13]-->
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>领红包</title>
<style>
html, body {
background-color: white;
margin: 0;
padding: 0;
font-size: 0;
}
.container {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.box {
width: 80vw;
height: 110vw;
position: relative;
margin: 0 auto 70px;
}
.bg {
width: 100%;
height: 100%;
border-radius: 2vw;
}
.open {
width: 22vw;
height: 22vw;
border-radius: 50%;
position: absolute;
bottom: 27vw;
left: 29vw;
transition: 1.5s;
}
.rotate {
transform: rotateY(360deg);
}
</style>
</head>
<body>
<div class="container">
<div class="box">
<img class="bg" src="__PUBLIC__/vip/images/activity/reward-bg.png" alt="背景图">
<img class="open" src="__PUBLIC__/vip/images/activity/open.png" alt="开">
</div>
</div>
</body>
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
<script src="__PUBLIC__/vip/js/window-reload.js"></script>
<script src="__PUBLIC__/js/tips.js"></script>
<script>
$('.open').click(function () {
$('.open').addClass('rotate');
$.post("{:U('openReward')}", {}, function (res) {
if (res.status == 1) {
setTimeout(function () {
localStorage.onlinepay = 1;
$('.open').prop('src', "__PUBLIC__/vip/images/activity/opened.png")
location.replace("{:U('reward_success')}?money=" + res.money);
}, 1000)
} else {
showTips(res.msg);
setTimeout(function () {
$('.open').prop('src', "__PUBLIC__/vip/images/activity/opened.png")
}, 1000)
}
})
})
</script>
</html>