Commit c259ddb7 authored by wangjj's avatar wangjj

本地模板

parent f66ba42a
...@@ -95,29 +95,34 @@ ...@@ -95,29 +95,34 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
.enter-img img { .enter-img img {
width: 90%; width: 90%;
} }
.red-packet { .red-packet {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
top: 0; top: 0;
left: 0; left: 0;
background-color: rgba(0,0,0,.5); background-color: rgba(0, 0, 0, .5);
z-index: 20; z-index: 20;
} }
.red-packet .info { .red-packet .info {
position: absolute; position: absolute;
left: 50%; left: 50%;
margin-left: -150px; margin-left: -150px;
top: 50%; top: 50%;
width: 300px; width: 300px;
transform:translateY(-50%); transform: translateY(-50%);
} }
.red-packet .info img { .red-packet .info img {
width: 100%; width: 100%;
} }
.red-packet .info .text { .red-packet .info .text {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -126,20 +131,24 @@ ...@@ -126,20 +131,24 @@
text-align: center; text-align: center;
color: #fff; color: #fff;
} }
.red-packet .info .text h3 { .red-packet .info .text h3 {
height: 140px; height: 140px;
line-height: 145px; line-height: 145px;
} }
.red-packet .info .text p { .red-packet .info .text p {
font-size: 48px; font-size: 48px;
font-family: arial, sans-serif; font-family: arial, sans-serif;
padding: 0 0 20px; padding: 0 0 20px;
} }
.red-packet .info .text b { .red-packet .info .text b {
font-weight: normal; font-weight: normal;
font-size: 14px; font-size: 14px;
font-family: "Helvetica Neue", Helvetica, "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", Arial, sans-serif;
} }
.red-packet .info .text button { .red-packet .info .text button {
position: relative; position: relative;
width: 80px; width: 80px;
...@@ -152,8 +161,9 @@ ...@@ -152,8 +161,9 @@
background-color: #fff259; background-color: #fff259;
color: red; color: red;
font-size: 24px; font-size: 24px;
box-shadow: 0 0 1px 0 rgba(0,0,0,0.3), 0 0 30px 2px rgba(0,0,0,0.15); box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.3), 0 0 30px 2px rgba(0, 0, 0, 0.15);
} }
.red-packet .info .text button:after { .red-packet .info .text button:after {
content: ''; content: '';
position: absolute; position: absolute;
...@@ -162,9 +172,10 @@ ...@@ -162,9 +172,10 @@
width: 70px; width: 70px;
height: 70px; height: 70px;
border-radius: 100%; border-radius: 100%;
border: 2px dotted rgba(0,0,0,.2); border: 2px dotted rgba(0, 0, 0, .2);
box-sizing: border-box; box-sizing: border-box;
} }
.red-packet .info .text button span { .red-packet .info .text button span {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -185,6 +196,7 @@ ...@@ -185,6 +196,7 @@
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;
} }
.red-packet .info .close { .red-packet .info .close {
position: absolute; position: absolute;
left: 50%; left: 50%;
...@@ -201,16 +213,7 @@ ...@@ -201,16 +213,7 @@
} }
</style> </style>
<div class="red-packet" id="redpack"> <div class="red-packet" id="redpack" style="display: none">
<div class="info">
<img src="skin/default/images/packet.png" alt="">
<div class="text">
<h3>恭喜您获得</h3>
<p><b>一个随机红包</b></p>
<button>拆</button>
</div>
<a href="javascript:;" class="close" id="redpack-close"><i class="iconfont icon-close"></i></a>
</div>
</div> </div>
<script src="[!--news.url--]e/member/login/logincas.php"></script> <script src="[!--news.url--]e/member/login/logincas.php"></script>
...@@ -218,9 +221,9 @@ ...@@ -218,9 +221,9 @@
<script type='text/javascript' src="[!--temp.ucenterurl--]common/nav.js"></script> <script type='text/javascript' src="[!--temp.ucenterurl--]common/nav.js"></script>
<script src="/skin/default/js/lazyload.js"></script> <script src="/skin/default/js/lazyload.js"></script>
<script> <script>
var mySwiper = new Swiper ('.swiper-container', { var mySwiper = new Swiper('.swiper-container', {
autoplay: 5000, autoplay: 5000,
pagination : '.swiper-pagination', pagination: '.swiper-pagination',
}) })
$(function () { $(function () {
...@@ -231,10 +234,10 @@ ...@@ -231,10 +234,10 @@
}); });
function setWidth() { function setWidth() {
if($(window).width() >= 900){ if ($(window).width() >= 900) {
$('.newest-list').find('.learn-course-box').width(427); $('.newest-list').find('.learn-course-box').width(427);
}else { } else {
$('.newest-list').find('.learn-course-box').width(($(window).width() - 45)/2); $('.newest-list').find('.learn-course-box').width(($(window).width() - 45) / 2);
} }
$('.newest-list').show(); $('.newest-list').show();
} }
...@@ -245,15 +248,15 @@ ...@@ -245,15 +248,15 @@
}); });
$.getJSON("[!--temp.ucenterurl--]tip/state-call?tips=s_checkin&callback=?", function(data) { $.getJSON("[!--temp.ucenterurl--]tip/state-call?tips=s_checkin&callback=?", function (data) {
var sign = $(".common-top a.sign"); var sign = $(".common-top a.sign");
var checkinUrl = "http://bbs.yunya.com/plugin.php?id=wq_sign:wq_sign"; var checkinUrl = "http://bbs.yunya.com/plugin.php?id=wq_sign:wq_sign";
if (data.s_checkin) { if (data.s_checkin) {
sign.attr("href", checkinUrl); sign.attr("href", checkinUrl);
} else { } else {
sign.parent().append('<span class="tips">签到领金币</span>'); sign.parent().append('<span class="tips">签到领金币</span>');
sign.click(function() { sign.click(function () {
$.getJSON("[!--temp.ucenterurl--]tip/state-push?tip=s_checkin&callback=?", function(data) { $.getJSON("[!--temp.ucenterurl--]tip/state-push?tip=s_checkin&callback=?", function (data) {
location.href = checkinUrl; location.href = checkinUrl;
}); });
}); });
...@@ -261,14 +264,11 @@ ...@@ -261,14 +264,11 @@
}); });
}); });
$('#redpack-close').click(function () {
$('#redpack').hide();
});
</script> </script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script> <script>
function wechatcallback(jsconfig){ function wechatcallback(jsconfig) {
//其它的在对应页面 //其它的在对应页面
var link = window.location.href; var link = window.location.href;
var imgUrl = "http://u.ibanshou.cn/assets/img/logo.jpg"; var imgUrl = "http://u.ibanshou.cn/assets/img/logo.jpg";
...@@ -332,8 +332,9 @@ ...@@ -332,8 +332,9 @@
}); });
}) })
} }
var script = document.createElement('script'); var script = document.createElement('script');
script.src = "/e/action/wechat/jsconfig?callback=wechatcallback&url="+window.location.href; script.src = "/e/action/wechat/jsconfig?callback=wechatcallback&url=" + window.location.href;
document.getElementsByTagName('head')[0].appendChild(script); document.getElementsByTagName('head')[0].appendChild(script);
</script> </script>
...@@ -341,12 +342,48 @@ ...@@ -341,12 +342,48 @@
<script src="[!--temp.ucenterurl--]common/js-app.js"></script> <script src="[!--temp.ucenterurl--]common/js-app.js"></script>
<script> <script>
if (BanShou.inApp() && BanShou.isSupport('messagePush')) { if (BanShou.inApp() && BanShou.isSupport('messagePush')) {
BanShou.ready(function(native) { BanShou.ready(function (native) {
$.ajax({type:"get", url:"[!--temp.ucenterurl--]member/regpushconf", dataType:"jsonp"}).done(function(conf) { $.ajax({
type: "get",
url: "[!--temp.ucenterurl--]member/regpushconf",
dataType: "jsonp"
}).done(function (conf) {
native.registerPushConfig(conf); native.registerPushConfig(conf);
}); });
}); });
} }
function showRedpack() {
$.getJSON("//http://s.test.yunyamooc.com/e/action/inviteRedpack.php", function (data) {
if (data == null || (data.status == 0 && data.type == '见面礼')) {
var html = '<div class="info">' +
' <img src="skin/default/images/packet.png" alt="">' +
' <div class="text">' +
' <h3>恭喜您获得</h3>' +
' <p><b>一个随机红包</b></p>' +
' <button onclick="inviteRedpack()" >拆</button>' +
' </div>' +
' <a href="javascript:;" class="close" onclick="redpackClose()"><i class="iconfont icon-close"></i></a>' +
' </div>';
$('#redpack').html(html).show();
}
})
}
function redpackClose(){
$('#redpack').hide();
};
function inviteRedpack() {
window.location.href = "[!--temp.ucenterurl--]invite-redpack/index";
}
$(function () {
showRedpack();
});
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment