<%@ page language="java" contentType="text/html; charset=UTF-8"
|
pageEncoding="UTF-8"%>
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="UTF-8">
|
<title>填写邀请码</title>
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
<style type="text/css">
|
body{
|
margin: 0;
|
font-family: "微软雅黑";
|
}
|
.page{
|
width: 100%;
|
background: url(img/yqm.png) no-repeat center;
|
background-size: 100% 100%;
|
position: relative;
|
}
|
.cont{
|
width: 70%;
|
position: absolute;
|
left: 15%;
|
top: 49%;
|
}
|
.cont span{
|
display: inline-block;
|
padding: 10px 20px;
|
padding-bottom: 24px;
|
line-height: 20px;
|
color: #C07F99;
|
font-size: 12px;
|
}
|
.inputCont{
|
height: 60px;
|
/*background: url(img/y_txt.png) no-repeat center;
|
background-size: 100% 100%;*/
|
}
|
.inputCont input{
|
width: 100%;
|
height: 100%;
|
outline: none;
|
text-align: center;
|
border-radius: 32px;
|
border: none;
|
font-size: 18px;
|
padding: 0;
|
}
|
.btn{
|
height: 60px;
|
background: url(img/y_tj.png) no-repeat center;
|
background-size: 100% 100%;
|
}
|
/*弹框*/
|
.pos{
|
position: fixed;
|
width: 100%;
|
height: 100%;
|
background: rgba(0,0,0,0.5);
|
top: 0;
|
left: 0;
|
display: none;
|
}
|
.pos .alert{
|
width: 66%;
|
height: 22%;
|
background: #fff;
|
border-radius: 16px;
|
position: absolute;
|
top: 34%;
|
left: 17%;
|
}
|
.pos .alert:after{
|
content: '';
|
width: 100%;
|
height: 1px;
|
background: #ccc;
|
position: absolute;
|
bottom: 50px;
|
left: 0;
|
}
|
.alert div{
|
height: 50px;
|
width: 100%;
|
line-height: 50px;
|
text-align: center;
|
font-size: 18px;
|
color: #FF3082;
|
position: absolute;
|
bottom: 0;
|
left: 0;
|
}
|
.alert span{
|
display: inline-block;
|
text-align: center;
|
width: 100%;
|
height: 20px;
|
font-size: 18px;
|
line-height: 20px;
|
position: absolute;
|
top: 40%;
|
left: 0;
|
margin-top: -20px;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="page">
|
<div class="cont">
|
<div class="inputCont">
|
<input autofocus="autofocus" type="text" name="" id="shareText" value="" />
|
</div>
|
<span>
|
非必填项,提交成功后你的首次下单好友将会获得现金红包
|
</span>
|
<div class="btn mysubmit">
|
|
</div>
|
</div>
|
</div>
|
<div class="pos">
|
<div class="alert">
|
<span id="judge">
|
提交成功!
|
</span>
|
<div id="sure">
|
确定
|
</div>
|
</div>
|
</div>
|
</body>
|
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
|
<script type="text/javascript">
|
var _h = $(document).height();
|
console.log(_h)
|
$('.page').height(_h);
|
// $('.btn').click(function(){
|
// $('.pos').fadeIn();
|
// setTimeout(function(){
|
// $('.pos').fadeOut();
|
// },1000)
|
// })
|
|
if(667<=_h<736){
|
$('.inputCont').height(68);
|
$('.btn').height(68);
|
$('.inputCont input').css('border-radius','34px');
|
}
|
// if(_h>=736){
|
// $('.inputCont').height(70);
|
// $('.btn').height(80);
|
// $('.inputCont input').css('border-radius','35px');
|
// }
|
if(_h<=568){
|
$('.inputCont').height(56);
|
$('.btn').height(56);
|
$('.inputCont input').css('border-radius','28px');
|
}
|
$(function(){
|
$(".mysubmit").bind("click",function(){
|
var share = $("#shareText").val();
|
$.post("../client/shareSubmit",{"uid":<%=request.getAttribute("uid")%>,"share":share},function(data){
|
if(data.code==0){
|
var state = data.data;
|
if(state == 0){
|
$('#judge').html('不存在该邀请码!');
|
}else if(state == 1){
|
$('#judge').html('提交成功!');
|
}else if(state == 2){
|
alert("被邀请者不是新用户!");
|
$('#judge').html('被邀请者不是新用户!');
|
}else if(state == 3){
|
$('#judge').html('被邀请者已存在!');
|
}else if(state == -1){
|
$('#judge').html('邀请者与被邀请者不能相同!');
|
}
|
}else{
|
$('#judge').html('请求出错!');
|
}
|
setTimeout(function(){
|
$('.pos').fadeIn();
|
},100)
|
},'json');
|
});
|
$('#sure').click(function(){
|
$('.pos').fadeOut();
|
})
|
});
|
</script>
|
</html>
|