Commit 43411755 by dabai

直播加油站

parent 19d65058
body .layui-layer {
background-color: transparent;
box-shadow: none;
border-radius: 0;
}
body .layui-layer.layui-layer-hui {
background-color: #000;
filter: alpha(opacity=60);
background-color: rgba(0, 0, 0, .6);
}
body{
background-color: #020615;
}
.main {
width: 10rem;
margin: 0 auto;
height: auto;
position: relative;
font-size: 0;
min-height: 100vh;
background-color: #020615;
padding-bottom: 0.933rem;
}
.mBottom{
position: absolute;
left: 0;
bottom: 0;
width: 10rem;
height: 3.733rem;
}
.rule{
width: 1.466rem;
height: 1.466rem;
position: fixed;
right: 0;
top:6.2rem;
z-index: 1000;
}
.rule img{
width: 100%;
height: 100%;
}
.ref{
width: 1.12rem;
height: 1.12rem;
position: fixed;
right: 0.133rem;
top: 8rem;
z-index: 1000;
}
.ref img{
width: 100%;
height: 100%;
}
.mBox{
background: url(https://app.ixiulive.com/static/liveGas/img/bg_top.png) no-repeat;
background-size: 100% 100%;
width: 10rem;
height: 32.586rem;
position: relative;
margin: 0 auto;
}
.time{
width: 8.44rem;
height: 1rem;
position: absolute;
top: 8.306rem;
left: 50%;
transform: translate(-50%,0);
-webkit-transform: translate(-50%,0);
}
.dayCon{
width: 7rem;
height: 0.733rem;
position: absolute;
top: 12.28rem;
left: 50%;
transform: translate(-50%,0);
-webkit-transform: translate(-50%,0);
}
.swiper-container{
width: 100%;
height: 100%;
}
.swiper-wrapper .swiper-slide{
width: 1.653rem;
height: 0.733rem;
line-height: 0.733rem;
text-align: center;
font-size: 0.32rem;
color:#FFF;
font-weight: bold;
background: url(https://app.ixiulive.com/static/liveGas/img/time1.png) no-repeat;
background-size: 100% 100%;
display: none;
}
.swiper-wrapper .swiper-slide.day1{
background: url(https://app.ixiulive.com/static/liveGas/img/time2.png) no-repeat;
background-size: 100% 100%;
}
.swiper-wrapper .swiper-slide.day2{
background: url(https://app.ixiulive.com/static/liveGas/img/time3.png) no-repeat;
background-size: 100% 100%;
text-shadow: 0 0 0.5em #37efa8, 0 0 0.5em #37efa8;
}
.mTime{
position: absolute;
top: 13.72rem;
left: 5.146rem;
width: 3.453rem;
font-size: 0;
height: .5rem;
line-height: .45rem;
}
.mTime span{
font-size: 0.373rem;
color:#FFF;
font-weight: bold;
text-shadow: 0 0 0.5em #f38bff, 0 0 0.5em #f38bff;
display: inline-block;
width: .5rem;
text-align: center;
}
.mTime span:nth-child(2){
margin-left: .35rem;
width: .7rem;
}
.mTime span:nth-child(3){
margin-left: .3rem;
width: .7rem;
}
.hour,.fires{
position: absolute;
left: 1.56rem;
top: 15.18rem;
width: 2.72rem;
text-align: center;
font-size: 0.426rem;
color:#FFF;
font-weight: bold;
text-shadow: 0 0 0.5em #f38bff, 0 0 0.5em #f38bff;
}
.fires{
left: auto;
right: 1.56rem;
}
.myBox{
position: absolute;
top: 17.213rem;
left: 50%;
width: 8rem;
height: 3.666rem;
transform: translate(-50%,0);
-webkit-transform: translate(-50%,0);
}
.myBox a{
background: url(https://app.ixiulive.com/static/liveGas/img/photo.png) no-repeat;
background-size: 100% 100%;
width: 1.653rem;
height: 1.653rem;
position: absolute;
left: .5rem;
top: 0;
}
.myBox a img{
width: 1.333rem;
height: 1.333rem;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
-webkit-transform: translate(-50%,-50%);
border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
object-fit: cover;
}
.myBoxName{
width: 1.973rem;
position: absolute;
left: .3rem;
top: 1.706rem;
color:#FFF;
font-size: 0.32rem;
text-shadow: 0 0 0.1em #8bfff8, 0 0 0.1em #8bfff8;
text-align: center;
}
.myBoxDesc{
position: absolute;
top: 0;
left: 2.766rem;
width: 4.973rem;
}
.myBoxFires{
top: 1.1rem;
}
.myHourName{
color:#FFF;
font-size: 0.32rem;
text-shadow: 0 0 0.5em #8bfff8, 0 0 0.5em #8bfff8;
}
.progressBox{
background: url(https://app.ixiulive.com/static/liveGas/img/jdt_bg.png) no-repeat;
background-size: 100% 100%;
width: 4.973rem;
height: 0.346rem;
margin-top: 0.11rem;
position: relative;
}
.progressText{
position: absolute;
right: 0.226rem;
width: 100%;
height: .346rem;
text-align: right;
color:#FFF;
text-shadow: 0 0 0.5em #f38bff, 0 0 0.5em #f38bff;
font-size: .3rem;
z-index: 10;
font-weight: bold;
margin-top: -.02rem;
}
.cont{
height: .346rem;
overflow: hidden;
position: relative;
border-radius: .25rem;
-webkit-border-radius: .25rem;
-moz-border-radius: .25rem;
width: 0;
}
.proBg{
width: 4.973rem;
height: .346rem;
background: url(https://app.ixiulive.com/static/liveGas/img/jdt.png);
background-size: auto 100%;
border-radius: 0.25rem 0 0 0.25rem;
-webkit-border-radius: 0.25rem 0 0 0.25rem;
-moz-border-radius: 0.25rem 0 0 0.25rem;
animation: pro-bg-ani 5s linear infinite;
position: relative;
z-index: 2;
}
.proBg2{
position: absolute;
top: 0;
left: 4.8rem;
border-radius: 0 0.25rem 0.25rem 0;
-webkit-border-radius: 0 0.25rem 0.25rem 0;
-moz-border-radius: 0 0.25rem 0.25rem 0;
z-index: 1;
}
@keyframes pro-bg-ani {
0% {
transform: translate(0, 0);
-webkit-transform: translate(0, 0);
}
100% {
transform: translate(-4.35rem, 0);
-webkit-transform: translate(-4.35rem, 0);
}
}
@-webkit-keyframes pro-bg-ani {
0% {
transform: translate(0, 0);
-webkit-transform: translate(0, 0);
}
100% {
transform: translate(-4.35rem, 0);
-webkit-transform: translate(-4.35rem, 0);
}
}
.receivePoint{
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%,0);
-webkit-transform: translate(-50%,0);
background: url(https://app.ixiulive.com/static/liveGas/img/bukeliqu_btn.png) no-repeat;
background-size: 100% 100%;
width: 3.466rem;
height: 1.186rem;
line-height: 1.086rem;
text-align: center;
font-size: 0.4rem;
color:#FFF;
text-shadow: 3px 3px 3px #070e2e;
}
.receivePoint.check{
background: url(https://app.ixiulive.com/static/liveGas/img/liqu_btn.png) no-repeat;
background-size: 100% 100%;
}
.userInter{
position: absolute;
top: 23.453rem;
left: 50%;
transform: translate(-50%,0);
-webkit-transform: translate(-50%,0);
width:3.733rem;
height:0.88rem;
line-height: 0.88rem;
text-align: center;
font-size: 0.346rem;
color:#7bfffa;
}
.userInter font{
font-size: 0.426rem;
font-weight: bold;
text-shadow: 0 0 0.5em #8bfff8, 0 0 0.5em #8bfff8;
vertical-align: middle;
display: inline-block;
margin-top: -.1rem;
}
.interBoxCon{
position: absolute;
top: 22.586rem;
left: 50%;
transform: translate(-50%,0);
-webkit-transform: translate(-50%,0);
width: 9.2rem;
height: 8rem;
}
.interBox{
position: absolute;
left: 0.786rem;
top: 1.68rem;
width: 0.88rem;
height: 0.693rem;
}
.interBox2{
top: 3.6rem;
width: 0.826rem;
height: 0.653rem;
}
.interBox3{
top: 5.466rem;
width: 0.826rem;
height: 0.8rem;
}
.interBoxJdt1{
position: absolute;
top: 1.973rem;
left: 2.08rem;
z-index: 1;
width: 0.24rem;
height: 5.24rem;
}
.interBoxJdt2{
background: url(https://app.ixiulive.com/static/liveGas/img/jdt2.png) no-repeat;
background-size: 0.24rem 5.24rem;
background-position: top;
width: 0.24rem;
height: 0;
position: absolute;
top: 1.973rem;
left: 2.08rem;
z-index: 2;
}
.interBoxBtn{
background: url(https://app.ixiulive.com/static/liveGas/img/liqu_btn1.png) no-repeat;
background-size: 100% 100%;
width: 2.973rem;
height: 0.893rem;
line-height: .793rem;
position: absolute;
right: 0.413rem;
top: 2.386rem;
font-size: 0.3rem;
color:#FFF;
text-align: center;
text-shadow: 2px 2px 2px #070e2e;
}
.interBoxBtn.check{
background: url(https://app.ixiulive.com/static/liveGas/img/bukeliqu_btn1.png) no-repeat;
background-size: 100% 100%;
}
.interBoxBtn2{
top: 4.32rem;
}
.interBoxBtn3{
top: 6.24rem;
}
.mList{
width: 9.413rem;
height: auto;
position: relative;
margin: -1.8rem auto 0;
font-size: 0;
z-index: 10;
}
.mListTop{
background: url(https://app.ixiulive.com/static/liveGas/img/bg1.png) no-repeat;
background-size: 9.413rem 2.946rem;
background-position: 0 0;
width: 9.413rem;
height: 1.6rem;
position: relative;
}
.mListCenter{
background: url(https://app.ixiulive.com/static/liveGas/img/bg2.png) no-repeat;
background-size: 100% 100%;
width: 9.413rem;
min-height: 3.5rem;
position: relative;
margin-top: 0;
}
.mListCenter .notData{
position: absolute;
left: 0;
top: 0;
width: 100%;
text-align: center;
height: 3.5rem;
line-height: 3.5rem;
text-align: center;
font-size: 0.373rem;
color:#FFF;
text-shadow: 0 0 0.5em #8bfff8, 0 0 0.5em #8bfff8;
}
.mListBottom{
background: url(https://app.ixiulive.com/static/liveGas/img/bg3.png) no-repeat;
background-size: 9.413rem 2.386rem;
background-position: bottom;
width: 9.413rem;
height: 1.2rem;
position: relative;
margin-top: -.01rem;
}
.mListDetail{
position: relative;
width: 8.106rem;
height: 1.306rem;
margin: 0 auto;
border-bottom: 0.013rem solid #072f5d;
font-size: 0;
z-index: 10;
}
.mListDetail a{
background: url(https://app.ixiulive.com/static/liveGas/img/photo1.png) no-repeat;
background-size: 100% 100%;
width: 1.106rem;
height: 1.106rem;
position: absolute;
left: 0.213rem;
top: 50%;
transform: translate(0,-50%);
-webkit-transform: translate(0,-50%);
}
.mListDetail a img{
width: 0.933rem;
height: 0.933rem;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
-webkit-transform: translate(-50%,-50%);
border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
object-fit: cover;
}
.mListDetailName{
position: absolute;
left: 1.706rem;
top: 0;
height: 1.306rem;
line-height: 1.306rem;
width: 3rem;
font-size: 0.373rem;
color:#FFF;
text-shadow: 0 0 0.5em #8bfff8, 0 0 0.5em #8bfff8;
}
.mListDetailNum{
position: absolute;
font-size: 0.373rem;
left: 4.733rem;
top: 0;
height: 1.306rem;
line-height: 1.306rem;
color:#FFF;
text-shadow: 0 0 0.5em #8bfff8, 0 0 0.5em #8bfff8;
width: 3.5rem;
}
.mListDetailNum font{
text-shadow: 0 0 0.5em #f38bff, 0 0 0.5em #f38bff;
}
.mListTop .mListDetail{
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%,0);
-webkit-transform: translate(-50%,0);
}
.mListBottom .more{
width: 1.653rem;
height: 0.36rem;
position: absolute;
left: 50%;
bottom: .5rem;
transform: translate(-50%,0);
-webkit-transform: translate(-50%,0);
}
.interBoxNum p{
position: absolute;
left: 0.413rem;
top: 2.6rem;
width: 1.473rem;
height: 0.72rem;
line-height: .72rem;
text-align: center;
font-size: 0.373rem;
font-weight: bold;
color:#ffffff;
text-shadow: 0 0 0.5em #8bfff8, 0 0 0.5em #8bfff8;
}
.interBoxNum p:nth-child(2){
top: 4.45rem;
}
.interBoxNum p:nth-child(3){
top: 6.35rem;
}
.interBoxDesc p{
position: absolute;
left: 2.666rem;
top: 3rem;
line-height: 1.2;
font-size: 0.32rem;
color:#ffffff;
text-shadow: 0 0 0.5em #f38bff, 0 0 0.5em #f38bff;
font-family: PingFang-SC-Medium;
}
.interBoxDesc p:nth-child(2){
top: 4.966rem;
}
.interBoxDesc p:nth-child(3){
top: 6.886rem;
}
\ No newline at end of file
var dayNum = 0;
var flag = true;
var flag2 = true;
var interval = null;
var bonds = 0;
$(function() {
$.ajaxSetup({
global: false,
type: 'post',
dataType: "JSON",
data: {
os: 'WEB',
cid: 'web_gw',
lang: 2,
uid: url_get_params().uid,
token: url_get_params().token
}
})
getData();
receiveList();
})
//获取当前天
function getData() {
$.ajax({
url: _url + '/active202001/LiveGasStation/hall_1/list',
data: {
type: 'stage'
},
success: function(res) {
if(res.code == -1 || res.code == -3){
layer.msg(res.msg);
return;
}
getTime();
userInfo(res.data);
getBtnState(res.data);
dayNum = res.data;
for(var i = 0; i < $('.dayCon .swiper-slide').length; i++) {
if(i == res.data - 1) {
$('.dayCon .swiper-slide').eq(i).addClass('day1');
} else if(i > res.data - 1) {
$('.dayCon .swiper-slide').eq(i).addClass('day2');
} else {
$('.dayCon .swiper-slide').eq(i).addClass('day0');
}
}
$('.dayCon .swiper-slide').show();
var swiperIndex = res.data - 1;
if(res.day > 4) swiperIndex = res.data - 4;
var mySwiper = new Swiper('.swiper-container', {
direction: 'horizontal',
slidesPerView: 4.3,
resistanceRatio: 0,
initialSlide: 0,
spaceBetween: '1%',
initialSlide: swiperIndex,
});
}
})
}
//切換
function dayChange(day) {
if(day > dayNum) return;
$('.swiper-slide').removeClass('day1').eq(day - 1).addClass('day1');
getBtnState(day);
userInfo(day);
}
//获取倒计时时间
function getTime() {
$.ajax({
url: _url + '/active202001/LiveGasStation/hall_1/list',
data: {
type: 'time',
},
success: function(res) {
clearInterval(interval);
var now = new Date().getTime();
var end = res.data;
var result = Math.floor(end - now) / 1000;
var seconds = Math.floor(result % 60); // 计算秒 ,取余
var minites = Math.floor((result / 60) % 60); //计算分 ,换算有多少分,取余,余出多少秒
var hours = Math.floor((result / 3600) % 24); //计算小时,换算有多少小时,取余,24小时制除以24,余出多少小时
var str = '';
str += '<span>' + add0(hours) + '</span><span>' + add0(minites) + '</span><span>' + add0(seconds) + '</span>';
$('.mTime').html(str);
interval = setInterval(function() {
if(result > 1) {
result = result - 1;
seconds = Math.floor(result % 60); // 计算秒 ,取余
minites = Math.floor((result / 60) % 60); //计算分 ,换算有多少分,取余,余出多少秒
hours = Math.floor((result / 3600) % 24); //计算小时,换算有多少小时,取余,24小时制除以24,余出多少小时
str = '';
str += '<span>' + add0(hours) + '</span><span>' + add0(minites) + '</span><span>' + add0(seconds) + '</span>';
$('.mTime').html(str);
} else {
clearInterval(interval);
window.window.location.reload();
}
}, 1000)
}
})
}
//時間加0
function add0(m) {
return m < 10 ? '0' + m + "" : m + ""
}
//用户直播信息
function userInfo(day) {
$.ajax({
url: _url + '/active202001/LiveGasStation/hall_1/list',
data: {
type: 'timeInfo',
day: day
},
success: function(res) {
getBoxScore(res);
bonds = res.get_bonds;
getExchangeStauts();
//直播螢火
var hours = Math.floor(res.time_limit / 60)+Number(((res.time_limit-Math.floor(res.time_limit / 60)*60)/60).toFixed(2));
$('.hour').html(hours+'小時');
$('.fires').html(res.bonds_limit+'螢火');
//我的直播时长
$('.myHourBox .progressText').html(res.data.dscore + '/'+hours);
$('.myBoxFires .progressText').html(res.data.dval + '/'+res.bonds_limit);
var $width1 = 0;
var dscore = res.data.dscore > hours ? hours : res.data.dscore;
$width1 = (dscore / hours) * 4.973;
$('.myHourBox .cont').css('width', $width1 + 'rem');
var $width2 = 0;
var dval = res.data.dval > res.bonds_limit ? res.bonds_limit : res.data.dval;
$width2 = (dval / res.bonds_limit) * 4.973;
$('.myBoxFires .cont').css('width', $width2 + 'rem');
//用戶頭像
var str = '';
str += '<a href="http://yazhai://_' + res.data.uid + '_zone">';
str += ' <img src="' + cdn + res.data.faceimg + '?x-oss-process=image/resize,w_72" />';
str += '</a>';
str += '<span class="myBoxName ellipsis">' + res.data.nick + '</span>'
$('.myInfo').html(str);
}
})
}
//领取积分状态
function getBtnState(day) {
$.ajax({
url: _url + '/active202001/LiveGasStation/hall_1/list',
data: {
type: 'status',
day: day
},
success: function(res) {
$('.receivePoint').removeAttr('onclick');
if(res.data == -1) {
$('.receivePoint').removeClass('check').html('不能領取');
} else if(res.data == 1) {
$('.receivePoint').addClass('check').html('領取積分').attr('onclick', 'receiveAward(' + day + ')');
} else if(res.data == -3) {
$('.receivePoint').removeClass('check').html('已經領取');
}
}
})
}
//領取積分
function receiveAward(day) {
$.ajax({
url: _url + '/active202001/LiveGasStation/hallAction_1/list',
data: {
type: 'receiveAward',
day: day
},
success: function(res) {
if(res.data == 1) {
layer.msg('領取成功');
getBtnState(day);
getBoxScore();
getExchangeStauts();
} else if(res.data == -2) {
layer.msg('不在活動時間內!');
} else if(res.data == -1) {
layer.msg('領取條件不足!');
} else if(res.data == -3) {
layer.msg('您已經領取過該獎勵了!');
} else if(res.data == -4) {
layer.msg('當前賬號無法領取!')
} else {
layer.msg(res.msg);
}
}
})
}
//獲取賬戶積分
function getBoxScore(data) {
$.ajax({
url: _url + '/active202001/LiveGasStation/hall_1/list',
data: {
type: 'timeScore'
},
success: function(res) {
$('.userInter').html('賬戶積分:<font>' + res.data + '</font>');
$('.interBoxNum p:eq(0)').html(data.value_one);
$('.interBoxDesc p:eq(0)').html('累積積分達到'+data.value_one);
$('.interBoxNum p:eq(1)').html(data.value_two);
$('.interBoxDesc p:eq(1)').html('累積積分達到'+data.value_two);
$('.interBoxNum p:eq(2)').html(data.value_three);
$('.interBoxDesc p:eq(2)').html('累積積分達到'+data.value_three);
var str = '';
var $width = 0;
if(res.data < data.value_one) {
$width = (res.data / data.value_one) * 1.1;
str += '<img src="https://app.ixiulive.com/static/liveGas/img/1h.png" class="interBox interBox1" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/2h.png" class="interBox interBox2" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/3h.png" class="interBox interBox3" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/jdt1.png" class="interBoxJdt1"/>';
str += '<div class="interBoxJdt2"></div>';
} else if(res.data < data.value_two) {
$width = 1.1 + ((res.data - data.value_one) / (data.value_two-data.value_one)) * 1.9;
str += '<img src="https://app.ixiulive.com/static/liveGas/img/1.png" class="interBox interBox1" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/2h.png" class="interBox interBox2" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/3h.png" class="interBox interBox3" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/jdt1.png" class="interBoxJdt1"/>';
str += '<div class="interBoxJdt2"></div>';
} else if(res.data < data.value_three) {
$width = 3 + ((res.data - data.value_two) / (data.value_three-data.value_two)) * 1.94;
str += '<img src="https://app.ixiulive.com/static/liveGas/img/1.png" class="interBox interBox1" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/2.png" class="interBox interBox2" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/3h.png" class="interBox interBox3" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/jdt1.png" class="interBoxJdt1"/>';
str += '<div class="interBoxJdt2"></div>';
} else {
$width = 5.24;
str += '<img src="https://app.ixiulive.com/static/liveGas/img/1.png" class="interBox interBox1" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/2.png" class="interBox interBox2" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/3.png" class="interBox interBox3" />';
str += '<img src="https://app.ixiulive.com/static/liveGas/img/jdt1.png" class="interBoxJdt1"/>';
str += '<div class="interBoxJdt2"></div>';
}
$('.interBoxTant').html(str);
$('.interBoxJdt2').css('height', $width + 'rem');
}
})
}
//獲取領取螢火按鈕狀態
function getExchangeStauts() {
$.ajax({
url: _url + '/active202001/LiveGasStation/hall_1/list',
data: {
type: 'exchangeStauts'
},
success: function(res) {
var status = res.data;
var str = '';
var boxId = [2, 4, 6];
for(var i = 0; i < status.length; i++) {
if(status[i] == 0) {
str += '<div class="interBoxBtn interBoxBtn' + (i + 1) + ' check">領取'+bonds+'螢火</div>';
} else if(status[i] == 1) {
str += '<div class="interBoxBtn interBoxBtn' + (i + 1) + '" onclick=exchangeFire(' + boxId[i] + ','+bonds+')>領取'+bonds+'螢火</div>';
} else if(status[i] == -1) {
str += '<div class="interBoxBtn interBoxBtn' + (i + 1) + ' check">已領取'+bonds+'螢火</div>';
}
$('.interBoxConBtn').html(str);
}
}
})
}
//領取螢火
function exchangeFire(num,bonds) {
if(!flag2)return;
flag2 = false;
$.ajax({
url: _url + '/active202001/LiveGasStation/hallAction_1/list',
data: {
type: 'exchangeFire',
day: num
},
success: function(res) {
if(res.data == 1) {
layer.msg('成功領取'+bonds+'螢火!');
getExchangeStauts();
} else if(res.data == -1) {
layer.msg('未到達領取要求!');
} else if(res.data == -2) {
layer.msg('您已經領取了此寶箱!');
}
flag2 = true;
},
error:function(){
flag2 = true;
}
})
}
//領取獎勵列表
function receiveList() {
$.ajax({
url: _url + '/active202001/LiveGasStation/hall_1/list',
data: {
type: 'receiveList'
},
success: function(res) {
var str = '';
var page = 5;
var rank = res.data;
if(rank.length > 0) {
if(rank.length > 5) {
$('.mListBottom .more').removeClass('hide');
} else {
$('.mListBottom .more').addClass('hide');
}
for(var i = 0; i < 5; i++) {
if(rank[i] != undefined) {
str += strList(rank[i]);
}
}
$('.mListCenter').html(str);
$('.mListBottom .more').unbind('click');
$('.mListBottom .more').on('click', function() {
if(rank.length >= page) {
var strM = '';
for(var i = page; i < page + 5; i++) {
if(rank[i]!=undefined){
strM += strList(rank[i]);
}
}
$('.mListCenter').append(strM);
page += 5;
if(page >= rank.length) {
$('.mListBottom .more').addClass('hide');
}
}
})
} else {
$('.mListCenter').html('<p class="notData">暫無記錄</p>');
}
}
})
}
function strList(data) {
var str = '';
if(data.uid!=17000){
str += '<div class="mListDetail">';
str += ' <a href="http://yazhai://_' + data.uid + '_zone">';
str += ' <img src="' + cdn + data.faceimg + '?x-oss-process=image/resize,w_72"/>';
str += ' </a>';
str += ' <span class="mListDetailName ellipsis">' + data.nick + '</span>';
str += ' <span class="mListDetailNum ellipsis">已領取積分:<font>' + data.score + '</font></span>';
str += '</div>';
}
return str;
}
//获取url参数
function url_get_params() {
var url = location.href;
var theRequest = new Object();
if(url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for(var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
\ 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 sign in to comment