Authored by ping

update

... ... @@ -23,7 +23,6 @@
height: 100%;
overflow: hidden;
background: #e10c1e;
}
.banner{
width: 100%;
... ... @@ -40,7 +39,6 @@
overflow: hidden;
padding-top: 2rem;
padding-bottom: .6rem;
background: #e10c1e;
}
.centent p{
width: 100%;
... ... @@ -80,7 +78,6 @@
.dialog .close{
width: 1.4rem;
height: 1.4rem;
overflow: hidden;
background: #444;
color: #f1f1f1;
border-radius: 50%;
... ... @@ -90,10 +87,6 @@
line-height: 1.4rem;
text-align: center;
}
.dialog .close img{
width: 100%;
height: auto;
}
.dialog .inform{
width: 100%;
height: 6rem;
... ... @@ -124,10 +117,6 @@
text-align: center;
font-size: 1.2rem;
}
.btn-list a{
text-decoration:none;
color: #000;
}
.hidden{
display: none;
}
... ... @@ -166,9 +155,9 @@
overflow: hidden;
}
.footer .btn{
width: 75.25%;
width: 81.25%;
height:auto;
margin: 0 auto 1.6rem;
margin: 0 auto .6rem;
}
.footer .btn img{
width: 100%;
... ... @@ -183,23 +172,27 @@
color: #fff;
margin: 0 40%;
}
.btn-list a{
text-decoration:none;
color: #000;
}
</style>
</head>
<body>
<div class="page">
<div class="banner">
<img src="images/cokeBanner.jpg">
<img src="/activity/cocacola/images/cokeBanner.jpg">
</div>
<div class="centent">
<div class="coupon">
<img src="images/cokeCoupon.png">
<img src="/activity/cocacola/images/cokeCoupon.png">
</div>
<p class="phone">优惠券已放至账户{{phone}}</p>
<p class="phone">优惠券已放至账户<span id="mobile"></span></p>
<p>登录Yoho!Buy有货客户端即可使用</p>
</div>
<div class="footer">
<div class="btn">
<img src="images/cokeBtn.png">
<a href="http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho"><img src="/activity/cocacola/images/cokeBtn.png"></a>
</div>
<span>活动说明</span>
</div>
... ... @@ -211,14 +204,14 @@
<span>Yoho!Buy有货优惠券</span>
</div>
<div class="btn-list">
<span><a href="1">下载Yoho!Buy有货</a></span>
<span><a href="http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho">下载Yoho!Buy有货</a></span>
<span style="color: red;">我知道了</span>
</div>
</div>
</div>
<div class="keep-out hidden"></div>
<div class="dialog hidden" id="message">
<span class="close"><img src="images/close.png"></span>
<span class="close">X</span>
<div class="activity-message">
<h3>活动说明</h3>
<div class="message">
... ... @@ -229,7 +222,7 @@
</div>
</div>
</body>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="/activity/js/jquery-1.12.0.min.js"></script>
<script type="text/javascript">
(function(w, d, s, j, f) {
var a = d.createElement(s);
... ... @@ -253,6 +246,16 @@
</script>
<script type="text/javascript">
function getQueryStr(key){
var svalue = location.search.match(new RegExp("[\?\&]" + key + "=([^\&]*)(\&?)","i"));
var str = svalue ? svalue[1] : svalue;
return str == null ? "" : str;
}
$(function() {
$("#mobile").html(getQueryStr("mobile"));
});
$('.close').on('click', function(){
$('.dialog').addClass('hidden');
$('.keep-out').addClass('hidden');
... ... @@ -300,11 +303,23 @@
if (typeof(wx) == "undefined") {
return;
}
var shareUrl = "";
$.ajax({
async : false,
url : "/activity/cocacola/CocacolaController/getWechatShareUrl",
dataType : "json",
success : function(data) {
if (!data || data.code != 200) {
return;
}
shareUrl = data.data.wechatShareUrl;
}
});
var _weChatInterface = 'http://www.yohoshow.com/api/wechat/getSignPackage';
var shareTitle = '来Yoho!Buy有货玩潮流,潮流逛不停';
var shareImg = 'http://192.168.102.205:8090/activity/cocacola/images/cokeBanner.jpg';
var shareImg = 'http://img12.static.yhbimg.com/activity/2016/04/07/11/02b3b297581ace1ca6251f7f9e67ca7937.jpg';
var shareDesc = '揭盖赢福利,潮流逛不停';
var shareLink = 'https://www.baidu.com/';
var shareLink = shareUrl;
$.getJSON(_weChatInterface + '?pageurl=' +
encodeURIComponent(location.href.split('#')[0]) + '&callback=?', function(json) {
var _appId, _timestamp, _nonceStr, _signature;
... ...
... ... @@ -21,10 +21,8 @@
.page{
width: 100%;
height: 100%;
overflow: hidden;
background: #e10c1e;
position: absolute;
bottom: 0;
left: 0;
}
.banner{
width: 100%;
... ... @@ -51,15 +49,14 @@
width: 100%;
height: auto;
overflow: hidden;
padding-top: 2.4rem;
background: #e10c1e;
padding-top: 4rem;
}
.centent div{
width: 81.25%;
height: 4rem;
overflow: hidden;
margin: 0 auto;
padding-bottom: 1rem;
padding-bottom: 1.2rem;
}
.centent input{
width: 68%;
... ... @@ -105,7 +102,6 @@
.dialog .close{
width: 1.4rem;
height: 1.4rem;
overflow: hidden;
background: #444;
color: #f1f1f1;
border-radius: 50%;
... ... @@ -115,10 +111,6 @@
line-height: 1.4rem;
text-align: center;
}
.dialog .close img{
width: 100%;
height: auto;
}
.hidden{
display: none;
}
... ... @@ -155,27 +147,12 @@
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>
<div class="page">
<div class="banner">
<img src="images/cokeBanner.jpg">
<img src="/activity/cocacola/images/cokeBanner.jpg">
</div>
<div class="centent">
<div>
... ... @@ -183,21 +160,22 @@
<span>获取验证码</span>
</div>
<div>
<input id="verification" type="text" placeholder="请输入手机验证码" maxlength="6"/>
<input id="verification" type="text" placeholder="请输入手机验证码" maxlength="4"/>
<span>领取</span>
</div>
</div>
<div class="footer">
<img src="images/cokefooter.jpg">
<img src="/activity/cocacola/images/cokefooter.jpg">
<span></span>
</div>
</div>
<div class="message hidden" id="dialog">
<div class="dialog hidden" id="dialog">
<span class="close">X</span>
<div class="content"></div>
</div>
<div class="keep-out hidden"></div>
<div class="dialog hidden" id="message">
<span class="close"><img src="images/close.png"></span>
<span class="close">X</span>
<div class="activity-message">
<h3>活动说明</h3>
<div class="message">
... ... @@ -208,7 +186,9 @@
</div>
</div>
</body>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="/activity/js/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js"></script>
<script type="text/javascript" src="/activity/js/jquery.cookie.js"></script>
<script type="text/javascript">
(function(w, d, s, j, f) {
var a = d.createElement(s);
... ... @@ -234,61 +214,73 @@
var num = 0;
$('#phone').bind('input propertychange', function(){
console.log($(this).val().length);
if ($(this).val().length === 11) {
$('#phone').focus(function(){
$('.centent span').eq('0').addClass('verification-code');
}else{
})
$('#phone').blur(function(){
if (!$(this).val()) {
$('.centent span').eq('0').removeClass();
}
})
$('#verification').bind('input propertychange', function(){
console.log($(this).val().length);
if ($(this).val().length === 4) {
$('.centent span').eq('1').addClass('verification-code');
}else{
$('#verification').focus(function(){
$('.centent span').eq('1').addClass('get');
})
$('#verification').blur(function(){
if (!$(this).val()) {
$('.centent span').eq('1').removeClass();
}
})
$('.centent').on('click', '.verification-code', function(){
$('.centent span').eq('0').removeClass('verification-code');
if ($(this).siblings('input').val().length === 11) {
var phone = $(this).siblings('input').val();
var reg = /[0-9]{11}/;
if (!reg.test(phone)) {
$('#dialog').removeClass('hidden');
$('.keep-out').removeClass('hidden');
$('#dialog .content').html('<p class="phone-error">手机号错误,请重新输入。<p>');
return;
}
$.ajax({
url:'',
url:'/activity/cocacola/CocacolaController/sendSms',
data : {
mobile : $("#phone").val()
},
dataType:'json',
success:function(data){
if (data.code === 200) {
var time = setInterval(function(){
num++;
if (num > 60) {
clearInterval('time');
num = 0;
$('.centent span').eq('0').addClass('verification-code').html('获取验证码');
clearInterval(time);
} else {
$('.centent span').eq('0').removeClass('verification-code').html('重新发送(' + (60-num) + ')');
}
},1000);
}
}
})
} else {
$('#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)
$('#dialog .content').html('<p class="phone-error">'+ data.message +'<p>');
}
}
});
});
$('.centent').on('click', '.get', function(){
if ($(this).siblings('input').val().length === 6) {
$('.centent span').eq('1').removeClass('get');
if ($(this).siblings('input').val().length === 4) {
$.ajax({
url:'',
url:'/activity/cocacola/CocacolaController/validRegCodeAndSendCode',
data : {
code : $("#verification").val(),
mobile : $("#phone").val(),
client_id : $.cookie("_yasvd")
},
dataType:'json',
success:function(data){
if (data.code === 200) {
location.href = "gain.html?mobile=" + $("#phone").val();
} else {
$('#dialog').removeClass('hidden');
$('.keep-out').removeClass('hidden');
... ... @@ -300,11 +292,6 @@ 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(){
... ... @@ -336,11 +323,23 @@ var num = 0;
if (typeof(wx) == "undefined") {
return;
}
var shareUrl = "";
$.ajax({
async : false,
url : "/activity/cocacola/CocacolaController/getWechatShareUrl",
dataType : "json",
success : function(data) {
if (!data || data.code != 200) {
return;
}
shareUrl = data.data.wechatShareUrl;
}
});
var _weChatInterface = 'http://www.yohoshow.com/api/wechat/getSignPackage';
var shareTitle = '来Yoho!Buy有货玩潮流,潮流逛不停';
var shareImg = 'http://192.168.102.205:8090/activity/cocacola/images/cokeBanner.jpg';
var shareImg = 'http://img12.static.yhbimg.com/activity/2016/04/07/11/02b3b297581ace1ca6251f7f9e67ca7937.jpg';
var shareDesc = '揭盖赢福利,潮流逛不停';
var shareLink = 'https://www.baidu.com/';
var shareLink = shareUrl;
$.getJSON(_weChatInterface + '?pageurl=' +
encodeURIComponent(location.href.split('#')[0]) + '&callback=?', function(json) {
var _appId, _timestamp, _nonceStr, _signature;
... ...
... ... @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{cokeTitle}}</title>
<title>有货&可口可乐</title>
<meta name="apple-mobile-web-app-title" content="SUMMER SALE">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui" media="(device-height: 568px)">
... ... @@ -135,7 +135,7 @@
<body>
<div class="page">
<div class="banner">
<img src="images/cokeBanner.jpg">
<img src="/activity/cocacola/images/cokeBanner.jpg">
</div>
<div class="centent">
<h3>Yoho!Buy有货</h3>
... ... @@ -145,7 +145,7 @@
</div>
<div class="footer">
<div class="btn">
<img src="images/cokeBtn.png">
<img src="/activity/cocacola/images/cokeBtn.png">
</div>
<span>活动说明</span>
</div>
... ... @@ -162,7 +162,7 @@
</div>
</div>
</div>
</body><script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
</body><script type="text/javascript" src="/activity/js/jquery-1.12.0.min.js"></script>
<script type="text/javascript">
(function(w, d, s, j, f) {
var a = d.createElement(s);
... ... @@ -195,9 +195,9 @@
}
var _weChatInterface = 'http://www.yohoshow.com/api/wechat/getSignPackage';
var shareTitle = '来Yoho!Buy有货玩潮流,潮流逛不停';
var shareImg = 'http://192.168.102.205:8090/activity/cocacola/images/cokeBanner.jpg';
var shareImg = '';
var shareDesc = '揭盖赢福利,潮流逛不停';
var shareLink = 'http://192.168.102.205:8090/activity/cocacola/html/index1.html';
var shareLink = '';
$.getJSON(_weChatInterface + '?pageurl=' +
encodeURIComponent(location.href.split('#')[0]) + '&callback=?', function(json) {
var _appId, _timestamp, _nonceStr, _signature;
... ...