Authored by uedxwg

Merge branch 'feature/coupon' of http://git.dev.yoho.cn/web/yohobuy into feature/coupon

... ... @@ -5,11 +5,8 @@ var $ = require('jquery');
var $receive = $('.coupon-right-reBox');
var $mask = $('.coupon-mask');
var $message = $('.coupon-message');
var $messageOpDet = $('.coupon-message-op-det');
var $messageOpGo = $('.coupon-message-op-go');
var $messageOpRel = $('.coupon-message-op-rel');
var $tooltip = $('.coupon-tooltip');
var timeID;
$receive.on('touchend',function(){
$.ajax({
url:'/coupon/receiveCoupon',
... ... @@ -17,42 +14,15 @@ $receive.on('touchend',function(){
success:function(data){
var msg=data.msg;
var status=data.status;
$message.find('.coupon-message-content').text(msg);
$mask.show();
$message.show();
if(status==1){
$messageOpDet.show();
$messageOpRel.hide();
$messageOpGo.hide();
maskAutoHide(3000);
}else if(status==2){
$messageOpRel.show();
$messageOpDet.hide();
$messageOpGo.hide();
$mask.unbind('touchend');
console.log(status);
if(!status){
$tooltip.show();
}else{
$messageOpGo.show();
$messageOpDet.hide();
$messageOpRel.hide();
maskAutoHide(3000);
$message.find('.coupon-message-content').text(msg);
$mask.show();
$message.show();
}
},
error:function(){}
});
});
$mask.on('touchend',function(){
$mask.hide();
$message.hide();
clearTimeout(timeID);
});
function maskAutoHide(time){
timeID=setTimeout(task,time);
function task(){
if($mask.css('display')!='none') {
$message.hide();
$mask.hide();
}
}
}
\ No newline at end of file
});
\ No newline at end of file
... ...
.coupon-page {
.coupon-title {
background-color: #fff;
text-align: center;
height: 96rem/$pxConvertRem;
line-height: 96rem/$pxConvertRem;
font-size: 30rem / $pxConvertRem;
}
.coupon-box {
background-color: #fff;
padding: 36rem/$pxConvertRem;
padding-top: 0;
height: 172rem/$pxConvertRem;
.coupon-box-main {
width: 100%;
float: left;
height: 170rem / $pxConvertRem;
.coupon-left {
float: left;
width: 80%;
height: 170rem/$pxConvertRem;
background-size: 100%;
background-repeat: no-repeat;
}
.coupon-right {
float: left;
width: 20%;
.coupon-title {
background-color: #fff;
text-align: center;
height: 170rem/$pxConvertRem;
background-color: rgb(224,84,85);
.coupon-right-reBox {
height: 100%;
width: 100%;
color:#fff;
.coupon-right-re {
font-size: 25rem/$pxConvertRem;
margin-top: 60rem/$pxConvertRem;
}
}
.coupon-right-goBox {
height: 100%;
width: 100%;
color:#fff;
font-size: 15rem/$pxConvertRem;
.coupon-right-st {
margin-top: 40rem/$pxConvertRem;
}
.coupon-right-go {
border-radius: 15px;
border: 1px solid #fff;
margin: 0 auto;
margin-top: 20rem/$pxConvertRem;
width: 90rem/$pxConvertRem;
height: 30rem/$pxConvertRem;
line-height: 30rem/$pxConvertRem;
}
height: 96rem/$pxConvertRem;
line-height: 96rem/$pxConvertRem;
font-size: 30rem / $pxConvertRem;
}
.coupon-box {
background-color: #fff;
padding: 36rem/$pxConvertRem;
padding-top: 0;
height: 172rem/$pxConvertRem;
.coupon-box-main {
width: 100%;
float: left;
height: 170rem / $pxConvertRem;
.coupon-left {
float: left;
width: 80%;
height: 170rem/$pxConvertRem;
background-size: 100%;
background-repeat: no-repeat;
}
.coupon-right {
float: left;
width: 20%;
text-align: center;
height: 170rem/$pxConvertRem;
background-color: rgb(224,84,85);
.coupon-right-reBox {
height: 100%;
width: 100%;
color:#fff;
.coupon-right-re {
font-size: 25rem/$pxConvertRem;
margin-top: 60rem/$pxConvertRem;
}
}
.coupon-right-goBox {
height: 100%;
width: 100%;
color:#fff;
font-size: 15rem/$pxConvertRem;
.coupon-right-st {
margin-top: 40rem/$pxConvertRem;
}
.coupon-right-go {
border-radius: 15px;
border: 1px solid #fff;
margin: 0 auto;
margin-top: 20rem/$pxConvertRem;
width: 90rem/$pxConvertRem;
height: 30rem/$pxConvertRem;
line-height: 30rem/$pxConvertRem;
}
}
}
}
}
}
}
}
.coupon-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .5);
display: none;
z-index: 9;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .5);
display: none;
z-index: 9;
}
.coupon-message {
position: fixed;
top: 50%;
left: 50%;
width: 550rem/$pxConvertRem;
height: 250rem/$pxConvertRem;
margin-left: -275rem/$pxConvertRem;
margin-top: -125rem/$pxConvertRem;
z-index: 10;
background-color: rgba(250, 250, 250, .92);
display: none;
border-radius: 10px;
.coupon-message-content {
border-bottom: 1px solid rgb(197, 197, 197);
height: 160rem/$pxConvertRem;
text-align: center;
line-height: 160rem/$pxConvertRem;
font-size: 28rem/$pxConvertRem;
}
.coupon-message-op {
height: 90rem/$pxConvertRem;
text-align: center;
line-height: 90rem/$pxConvertRem;
font-size: 32rem/$pxConvertRem;
position: fixed;
top: 50%;
left: 50%;
width: 550rem/$pxConvertRem;
height: 250rem/$pxConvertRem;
margin-left: -275rem/$pxConvertRem;
margin-top: -125rem/$pxConvertRem;
z-index: 10;
background-color: rgba(250, 250, 250, .92);
display: none;
border-radius: 10px;
.coupon-message-op-det {
color: rgb(223, 98, 112);
display:none;
}
.coupon-message-op-go {
color:rgb(223,98,112);
display:none;
.coupon-message-content {
border-bottom: 1px solid rgb(197, 197, 197);
height: 160rem/$pxConvertRem;
text-align: center;
line-height: 160rem/$pxConvertRem;
font-size: 28rem/$pxConvertRem;
}
.coupon-message-op-rel {
color: rgb(223, 98, 112);
display:none;
.coupon-message-op {
height: 90rem/$pxConvertRem;
text-align: center;
line-height: 90rem/$pxConvertRem;
font-size: 32rem/$pxConvertRem;
color: rgb(223, 98, 112);
}
}
}
.coupon-tooltip{
position: fixed;
top: 50%;
left: 50%;
width: 220rem/$pxConvertRem;
height: 140rem/$pxConvertRem;
margin-left: -110rem/$pxConvertRem;
margin-top: -70rem/$pxConvertRem;
z-index: 11;
background-color: rgba(60, 60, 60, .7);
display: none;
border-radius: 8rem/$pxConvertRem;
line-height: 140rem/$pxConvertRem;
text-align: center;
color: #fff;
}
\ No newline at end of file
... ...
... ... @@ -50,16 +50,14 @@
<div class="coupon-message">
<div class="coupon-message-content"></div>
<div class="coupon-message-op">
<a class="coupon-message-op-det">
<span>去查看</span>
</a>
<a href="http://m.dev.yohobuy.com/boy" class="coupon-message-op-go">
<span>去逛逛</span>
</a>
<a href="http://m.dev.yohobuy.com/coupon/floor">
<span class="coupon-message-op-rel">刷新</span>
</a>
</div>
</div>
<div class="coupon-tooltip">
<img src=""/>
<div>领取成功</div>
</div>
{{/floor}}
{{> layout/footer}}
\ No newline at end of file
... ...