Authored by yyq

coupon tip

... ... @@ -20,6 +20,7 @@
border-top: 40px solid #000;
text-align: center;
line-height: 1.25;
z-index: 10;
}
.tip .title {
... ... @@ -51,5 +52,41 @@
background: #000;
text-decoration: none;
}
.tip.coupon-tip {
border-top: 0;
background: url('//img11.static.yhbimg.com/sns/2018/10/16/19/0172232208d89e64d308dae5c4f5d5ac79.png') no-repeat;
background-size: 100%;
width: 200px;
margin-left: -100px;
padding-top: 100px;
&:after {
content: '';
position: absolute;
left: 0;
right: 0;
top: 50%;
bottom: 0;
z-index: -1;
background-color: #ce1230;
}
.title {
font-size: 20px;
color: #fff;
}
.content {
font-size: 12px;
color: #fff;
}
.button {
background: none;
color: #fff;
border: 1px solid #fff;
}
}
}
... ...
... ... @@ -111,18 +111,21 @@ let _getCoupon = function(data){
utils.showTip({
title: '领取成功',
content: '恭喜您,领取成功',
tipClassName: 'coupon-tip',
close: true
});
} else if (res.code === 401) {
utils.showTip({
title: '已经领取',
content: '快去分享给更多<br>喜爱<span class="highlight">潮流</span>的小伙伴吧!',
tipClassName: 'coupon-tip',
close: true
});
} else if (res.message) {
utils.showTip({
title: '领取失败<br>请刷新重新领取',
content: res.message + '<br>如多次领取失败,请联系客服人员<br>带来不便敬请谅解',
tipClassName: 'coupon-tip',
close: false
});
}
... ... @@ -131,6 +134,7 @@ let _getCoupon = function(data){
utils.showTip({
title: '领取失败<br>请刷新重新领取',
content: '如多次领取失败,请联系客服人员<br>带来不便敬请谅解',
tipClassName: 'coupon-tip',
close: false
});
});
... ...
... ... @@ -146,6 +146,10 @@ export default {
$tipTmpl.find('.button').addClass('refresh').html('刷新');
}
if (data.tipClassName) {
$tipTmpl.find('.tip').addClass(data.tipClassName);
}
$('body').append($tipTmpl);
$tipTmpl.show();
},
... ...