Authored by ping

Merge branch 'cocacola' into dev

... ... @@ -23,6 +23,7 @@
height: 100%;
overflow: hidden;
background: #e10c1e;
}
.banner{
width: 100%;
... ... @@ -39,6 +40,7 @@
overflow: hidden;
padding-top: 2rem;
padding-bottom: .6rem;
background: #e10c1e;
}
.centent p{
width: 100%;
... ... @@ -78,6 +80,7 @@
.dialog .close{
width: 1.4rem;
height: 1.4rem;
overflow: hidden;
background: #444;
color: #f1f1f1;
border-radius: 50%;
... ... @@ -87,6 +90,10 @@
line-height: 1.4rem;
text-align: center;
}
.dialog .close img{
width: 100%;
height: auto;
}
.dialog .inform{
width: 100%;
height: 6rem;
... ... @@ -117,6 +124,10 @@
text-align: center;
font-size: 1.2rem;
}
.btn-list a{
text-decoration:none;
color: #000;
}
.hidden{
display: none;
}
... ... @@ -155,9 +166,9 @@
overflow: hidden;
}
.footer .btn{
width: 81.25%;
width: 75.25%;
height:auto;
margin: 0 auto .6rem;
margin: 0 auto 1.6rem;
}
.footer .btn img{
width: 100%;
... ... @@ -172,10 +183,6 @@
color: #fff;
margin: 0 40%;
}
.btn-list a{
text-decoration:none;
color: #000;
}
</style>
</head>
<body>
... ... @@ -211,7 +218,7 @@
</div>
<div class="keep-out hidden"></div>
<div class="dialog hidden" id="message">
<span class="close">X</span>
<span class="close"><img src="/activity/cocacola/images/close.png"></span>
<div class="activity-message">
<h3>活动说明</h3>
<div class="message">
... ...
... ... @@ -21,7 +21,6 @@
.page{
width: 100%;
height: 100%;
overflow: hidden;
background: #e10c1e;
}
.banner{
... ... @@ -49,14 +48,15 @@
width: 100%;
height: auto;
overflow: hidden;
padding-top: 4rem;
padding-top: 2.4rem;
background: #e10c1e;
}
.centent div{
width: 81.25%;
height: 4rem;
overflow: hidden;
margin: 0 auto;
padding-bottom: 1.2rem;
padding-bottom: 1rem;
}
.centent input{
width: 68%;
... ... @@ -102,6 +102,7 @@
.dialog .close{
width: 1.4rem;
height: 1.4rem;
overflow: hidden;
background: #444;
color: #f1f1f1;
border-radius: 50%;
... ... @@ -111,6 +112,10 @@
line-height: 1.4rem;
text-align: center;
}
.dialog .close img{
width: 100%;
height: auto;
}
.hidden{
display: none;
}
... ... @@ -147,6 +152,21 @@
margin:0 auto;
line-height: 2rem;
}
.messages{
width: 82%;
height: 4rem;
position: absolute;
background: rgba(0,0,0,.9);
border-radius: .6rem;
left:9%;
top: 45%;
margin-top: -2rem;
z-index: 2;
color: #fff;
}
.messages p{
line-height: 4rem;
}
</style>
</head>
<body>
... ... @@ -169,13 +189,12 @@
<span></span>
</div>
</div>
<div class="dialog hidden" id="dialog">
<span class="close">X</span>
<div class="messages hidden" id="dialog">
<div class="content"></div>
</div>
<div class="keep-out hidden"></div>
<div class="dialog hidden" id="message">
<span class="close">X</span>
<span class="close"><img src="/activity/cocacola/images/close.png"></span>
<div class="activity-message">
<h3>活动说明</h3>
<div class="message">
... ... @@ -214,22 +233,20 @@
var num = 0;
$('#phone').focus(function(){
$('#phone').bind('input propertychange', function(){
if ($(this).val().length === 11) {
$('.centent span').eq('0').addClass('verification-code');
})
$('#phone').blur(function(){
if (!$(this).val()) {
$('.centent span').eq('0').removeClass();
}
})
$('#verification').focus(function(){
}else{
$('.centent span').eq('0').removeClass();
}
})
$('#verification').bind('input propertychange', function(){
if ($(this).val().length === 4) {
$('.centent span').eq('1').addClass('get');
})
$('#verification').blur(function(){
if (!$(this).val()) {
$('.centent span').eq('1').removeClass();
}
})
}else{
$('.centent span').eq('1').removeClass();
}
})
$('.centent').on('click', '.verification-code', function(){
$('.centent span').eq('0').removeClass('verification-code');
var phone = $(this).siblings('input').val();
... ... @@ -238,6 +255,11 @@ var num = 0;
$('#dialog').removeClass('hidden');
$('.keep-out').removeClass('hidden');
$('#dialog .content').html('<p class="phone-error">手机号错误,请重新输入。<p>');
setTimeout(function(){
$('.messages').addClass('hidden');
$('.keep-out').addClass('hidden');
$('#dialog .content').html(' ')
}, 1400);
return;
}
$.ajax({
... ... @@ -263,6 +285,11 @@ var num = 0;
$('#dialog').removeClass('hidden');
$('.keep-out').removeClass('hidden');
$('#dialog .content').html('<p class="phone-error">'+ data.message +'<p>');
setTimeout(function(){
$('.messages').addClass('hidden');
$('.keep-out').addClass('hidden');
$('#dialog .content').html(' ')
}, 1400);
}
}
});
... ... @@ -285,6 +312,11 @@ var num = 0;
$('#dialog').removeClass('hidden');
$('.keep-out').removeClass('hidden');
$('#dialog .content').html('<p class="phone-error">'+ data.message +'<p>');
setTimeout(function(){
$('.messages').addClass('hidden');
$('.keep-out').addClass('hidden');
$('#dialog .content').html(' ')
}, 1400);
}
}
})
... ... @@ -292,6 +324,11 @@ var num = 0;
$('#dialog').removeClass('hidden');
$('.keep-out').removeClass('hidden');
$('#dialog .content').html('<p class="phone-error">验证码错误,请重新输入。<p>');
setTimeout(function(){
$('.messages').addClass('hidden');
$('.keep-out').addClass('hidden');
$('#dialog .content').html(' ')
}, 1400);
}
});
$('.close').on('click', function(){
... ... @@ -350,7 +387,7 @@ var num = 0;
_signature = json.signature.toString();
wx.config({
debug: false,
debug: true,
appId: _appId,
timestamp: _timestamp,
nonceStr: _nonceStr,
... ...