<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>新用户大礼包</title>
	<style>
	 * {
            padding: 0;
            margin: 0;
        }
        html,
        body {
            height: 100%;
			-webkit-background-size: cover;
			-moz-background-size: cover;
			-o-background-size: cover;
			background-size: cover;
            position: relative;
			background-color:#fedf46;
        }
		.button{
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            text-decoration:none;
			display:block;
			position:absolute;
			width:380px;
			height:100px;
			left:0;
			top:0;
			}
	</style>
</head>
<body>

	<div class="page">
		<img src="https://yueduyun.oss-cn-hangzhou.aliyuncs.com/h5/new_user_privilege.jpg" style="width:100%;display:block">
         <a href="{{$url}}" class="button" ></a>

	</div>
</body>
<script>
	window.onload=function(){
		var oImg = document.querySelector('.page img');
		var oImgHeight = oImg.offsetHeight;
		var oImgWidth = oImg.offsetWidth;
		var aHref = document.querySelector('.button');
		aHref.style.top = (oImgHeight*0.83)+'px';
		aHref.style.left = (oImgWidth-380)/2+'px';
        document.querySelector('.button').addEventListener('touchstart',function(e){
            e.preventDefault();
            var href= this.attributes['href'].value;
            if(href == ''){
                alert('暂无活动');
                location.href = '/'
            }else{
                location.href = href;
            }
            return false;
        },false);
	}


</script>
</html>	
	