Commit c259ddb7 authored by wangjj's avatar wangjj

本地模板

parent f66ba42a
......@@ -95,29 +95,34 @@
width: 100%;
text-align: center;
}
.enter-img img {
width: 90%;
}
.red-packet {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: rgba(0,0,0,.5);
background-color: rgba(0, 0, 0, .5);
z-index: 20;
}
.red-packet .info {
position: absolute;
left: 50%;
margin-left: -150px;
top: 50%;
width: 300px;
transform:translateY(-50%);
transform: translateY(-50%);
}
.red-packet .info img {
width: 100%;
}
.red-packet .info .text {
position: absolute;
top: 0;
......@@ -126,20 +131,24 @@
text-align: center;
color: #fff;
}
.red-packet .info .text h3 {
height: 140px;
line-height: 145px;
}
.red-packet .info .text p {
font-size: 48px;
font-family: arial, sans-serif;
padding: 0 0 20px;
}
.red-packet .info .text b {
font-weight: normal;
font-size: 14px;
font-family: "Helvetica Neue", Helvetica, "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", Arial, sans-serif;
}
.red-packet .info .text button {
position: relative;
width: 80px;
......@@ -152,8 +161,9 @@
background-color: #fff259;
color: red;
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 {
content: '';
position: absolute;
......@@ -162,9 +172,10 @@
width: 70px;
height: 70px;
border-radius: 100%;
border: 2px dotted rgba(0,0,0,.2);
border: 2px dotted rgba(0, 0, 0, .2);
box-sizing: border-box;
}
.red-packet .info .text button span {
position: absolute;
top: 0;
......@@ -185,6 +196,7 @@
color: #fff;
font-size: 14px;
}
.red-packet .info .close {
position: absolute;
left: 50%;
......@@ -201,16 +213,7 @@
}
</style>
<div class="red-packet" id="redpack">
<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 class="red-packet" id="redpack" style="display: none">
</div>
<script src="[!--news.url--]e/member/login/logincas.php"></script>
......@@ -218,9 +221,9 @@
<script type='text/javascript' src="[!--temp.ucenterurl--]common/nav.js"></script>
<script src="/skin/default/js/lazyload.js"></script>
<script>
var mySwiper = new Swiper ('.swiper-container', {
var mySwiper = new Swiper('.swiper-container', {
autoplay: 5000,
pagination : '.swiper-pagination',
pagination: '.swiper-pagination',
})
$(function () {
......@@ -231,10 +234,10 @@
});
function setWidth() {
if($(window).width() >= 900){
if ($(window).width() >= 900) {
$('.newest-list').find('.learn-course-box').width(427);
}else {
$('.newest-list').find('.learn-course-box').width(($(window).width() - 45)/2);
} else {
$('.newest-list').find('.learn-course-box').width(($(window).width() - 45) / 2);
}
$('.newest-list').show();
}
......@@ -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 checkinUrl = "http://bbs.yunya.com/plugin.php?id=wq_sign:wq_sign";
if (data.s_checkin) {
sign.attr("href", checkinUrl);
} else {
sign.parent().append('<span class="tips">签到领金币</span>');
sign.click(function() {
$.getJSON("[!--temp.ucenterurl--]tip/state-push?tip=s_checkin&callback=?", function(data) {
sign.click(function () {
$.getJSON("[!--temp.ucenterurl--]tip/state-push?tip=s_checkin&callback=?", function (data) {
location.href = checkinUrl;
});
});
......@@ -261,14 +264,11 @@
});
});
$('#redpack-close').click(function () {
$('#redpack').hide();
});
</script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
function wechatcallback(jsconfig){
function wechatcallback(jsconfig) {
//其它的在对应页面
var link = window.location.href;
var imgUrl = "http://u.ibanshou.cn/assets/img/logo.jpg";
......@@ -332,8 +332,9 @@
});
})
}
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);
</script>
......@@ -341,12 +342,48 @@
<script src="[!--temp.ucenterurl--]common/js-app.js"></script>
<script>
if (BanShou.inApp() && BanShou.isSupport('messagePush')) {
BanShou.ready(function(native) {
$.ajax({type:"get", url:"[!--temp.ucenterurl--]member/regpushconf", dataType:"jsonp"}).done(function(conf) {
BanShou.ready(function (native) {
$.ajax({
type: "get",
url: "[!--temp.ucenterurl--]member/regpushconf",
dataType: "jsonp"
}).done(function (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>
</body>
</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