调整倒计时
@@ -590,6 +590,14 @@ body {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.page1 .my .myBox .NotUser {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 1.76rem;
|
||||
color: #fff;
|
||||
transform: translateX(8%);
|
||||
}
|
||||
|
||||
.page1 .act {
|
||||
background: url(../images/page1myBg2.png) no-repeat bottom;
|
||||
background-size: 100% 10.4rem;
|
||||
@@ -3172,6 +3180,7 @@ body {
|
||||
box-sizing: border-box;
|
||||
padding: 0.13333rem 0;
|
||||
border-radius: 0.26667rem;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.rule .rule_in .content2 img {
|
||||
|
@@ -595,6 +595,14 @@ body {
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.NotUser {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 1.76rem;
|
||||
color: #fff;
|
||||
transform: translateX(8%)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3184,6 +3192,7 @@ body {
|
||||
box-sizing: border-box;
|
||||
padding: px2rem(10) 0;
|
||||
border-radius: px2rem(20);
|
||||
display: none;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 179 KiB After Width: | Height: | Size: 47 KiB |
@@ -268,7 +268,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="timeBox">
|
||||
<p>当前赛季倒计时 <span>0</span> 天 <span>0</span> 时 <span>0</span> 分 <span>0</span> 秒 </p>
|
||||
<p>当前赛季倒计时 <span class="sp1">0</span> 天 <span class="sp2">0</span> 时 <span class="sp3">0</span> 分 <span class="sp4">0</span> 秒 </p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 标题2 -->
|
||||
@@ -472,7 +472,7 @@
|
||||
</div>
|
||||
<div class="but">领取</div>
|
||||
<div class="butNot">未满足条件</div>
|
||||
<i>0/8</i>
|
||||
<i>1/8</i>
|
||||
<img src="./images/celebrationTaskLeft.png" alt="" class="left">
|
||||
<img src="./images/celebrationTaskRight.png" alt="" class="right">
|
||||
</div>
|
||||
|
@@ -373,8 +373,12 @@ function cpRank () {
|
||||
// 处理自己榜单组合
|
||||
var myStr = '';
|
||||
$('.page1 .my .myBox .myBox_in').remove();
|
||||
res.data.meRankList.forEach((res, i) => {
|
||||
myStr += `
|
||||
$('.page1 .my .myBox .NotUser').remove();
|
||||
if (res.data.meRankList.length == 0) {
|
||||
myStr += `<div class="NotUser">暂无组合~</div>`
|
||||
} else {
|
||||
res.data.meRankList.forEach((res, i) => {
|
||||
myStr += `
|
||||
<div class="myBox_in">
|
||||
<img src="./images/page1notTop3ts.png" alt="" class="ts">
|
||||
<img src="${res.leftAvatar}" alt="" class="ltx">
|
||||
@@ -384,7 +388,8 @@ function cpRank () {
|
||||
<div class="score">${unitProcessing(res.score, 10000, 1, 'w')}友谊值</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
})
|
||||
}
|
||||
$('.page1 .my .myBox').append(myStr);
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
@@ -781,14 +786,19 @@ function popularGetRank () {
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
// 人气倒计时
|
||||
popularGetRankCountup(res.data.endTime);
|
||||
if (popularGetRankRound == null || popularGetRankRound == undefined) {
|
||||
console.log(res.data.roundList[res.data.curRound - 1].endTime - res.timestamp);
|
||||
popularGetRankCountup(res.data.roundList[res.data.curRound - 1].endTime - res.timestamp);
|
||||
}
|
||||
// 渲染赛事时间
|
||||
roundList = res.data.roundList ? res.data.roundList : roundList;
|
||||
roundList.forEach((val, i) => {
|
||||
$(`.page3 .page3tabBox .tabBox .tab`).eq(i).attr('round', val.round);
|
||||
$(`.page3 .page3tabBox .tabBox .tab`).eq(i).children('span').text(`${dateFormat(val.startTime, 'MM.dd')}-${dateFormat(val.endTime, 'MM.dd')}`);
|
||||
if (res.data.curRound == val.round) {
|
||||
$(`.page3 .page3tabBox .tabBox .tab`).eq(i).addClass('act').siblings().removeClass('act');
|
||||
if (popularGetRankRound == null || popularGetRankRound == undefined) {
|
||||
if (res.data.curRound == val.round) {
|
||||
$(`.page3 .page3tabBox .tabBox .tab`).eq(i).addClass('act').siblings().removeClass('act');
|
||||
}
|
||||
}
|
||||
});
|
||||
// 前三
|
||||
@@ -890,11 +900,14 @@ function popularGetRankCountup (leftTime) {
|
||||
$('.page3 .page3tabBox .timeBox p .sp4').text(s);
|
||||
} else {
|
||||
popularGetRank();
|
||||
|
||||
}
|
||||
if (leftTime > 0) {
|
||||
leftTime = leftTime - 1000;
|
||||
}
|
||||
popularGetRankTime = setTimeout(popularGetRankCountup(), 1000);
|
||||
popularGetRankTime = setTimeout(function () {
|
||||
popularGetRankCountup(leftTime);
|
||||
}, 1000);
|
||||
}
|
||||
// 打开页面3小时榜弹窗
|
||||
$('.page3 .page3RuleIcon').click(function () {
|
||||
@@ -924,7 +937,12 @@ function getHourRank () {
|
||||
if (res.code === 200) {
|
||||
// 渲染小时榜时间
|
||||
$('.page3_pop .page3_pop_in .timeBox .div1').text(`${res.data.curHour}点小时榜`);
|
||||
hourCountup(res.data.curHourRemain);
|
||||
if (res.data.curHourEndTime) {
|
||||
hourCountup(res.data.curHourEndTime - res.timestamp);
|
||||
} else {
|
||||
toastMsg('小时榜仅在每晚19:00-23:59开启')
|
||||
hideLoading(layerIndex)
|
||||
}
|
||||
// 渲染上期小时榜榜首
|
||||
if (res.data.nick) {
|
||||
$('.page3_pop .page3_pop_in .lastTop3 .tx').attr('src', res.data.avatar);
|
||||
@@ -994,7 +1012,9 @@ function hourCountup (leftTime) {
|
||||
if (leftTime > 0) {
|
||||
leftTime = leftTime - 1000;
|
||||
}
|
||||
hourCountupTime = setTimeout(hourCountup(), 1000);
|
||||
hourCountupTime = setTimeout(function () {
|
||||
hourCountup(leftTime)
|
||||
}, 1000);
|
||||
}
|
||||
// 关闭页面3弹窗
|
||||
$('.page3_pop').click(function () {
|
||||
@@ -1023,14 +1043,19 @@ function roomGetRank () {
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
// 人气倒计时
|
||||
// roomGetRankCountup(res.data.endTime);
|
||||
if (roomGetRankRound == null || roomGetRankRound == undefined) {
|
||||
console.log(res.data.roundList[res.data.curRound - 1].endTime - res.timestamp);
|
||||
roomGetRankCountup(res.data.roundList[res.data.curRound - 1].endTime - res.timestamp);
|
||||
}
|
||||
// 渲染赛事时间
|
||||
roundList = res.data.roundList ? res.data.roundList : roundList;
|
||||
roundList.forEach((val, i) => {
|
||||
$(`.page4 .page3tabBox .tabBox .tab`).eq(i).attr('round', val.round);
|
||||
$(`.page4 .page3tabBox .tabBox .tab`).eq(i).children('span').text(`${dateFormat(val.startTime, 'MM.dd')}-${dateFormat(val.endTime, 'MM.dd')}`);
|
||||
if (res.data.curRound == val.round) {
|
||||
$(`.page4 .page3tabBox .tabBox .tab`).eq(i).addClass('act').siblings().removeClass('act');
|
||||
if (roomGetRankRound == null || roomGetRankRound == undefined) {
|
||||
if (res.data.curRound == val.round) {
|
||||
$(`.page4 .page3tabBox .tabBox .tab`).eq(i).addClass('act').siblings().removeClass('act');
|
||||
}
|
||||
}
|
||||
});
|
||||
// 前三
|
||||
@@ -1122,17 +1147,19 @@ function roomGetRankCountup (leftTime) {
|
||||
m = getzf(Math.floor(leftTime / 1000 / 60 % 60));
|
||||
s = getzf(Math.floor(leftTime / 1000 % 60));
|
||||
//将倒计时赋值到div中
|
||||
$('.page3 .page3tabBox .timeBox p .sp1').text(d);
|
||||
$('.page3 .page3tabBox .timeBox p .sp2').text(h);
|
||||
$('.page3 .page3tabBox .timeBox p .sp3').text(m);
|
||||
$('.page3 .page3tabBox .timeBox p .sp4').text(s);
|
||||
$('.page4 .page3tabBox .timeBox p .sp1').text(d);
|
||||
$('.page4 .page3tabBox .timeBox p .sp2').text(h);
|
||||
$('.page4 .page3tabBox .timeBox p .sp3').text(m);
|
||||
$('.page4 .page3tabBox .timeBox p .sp4').text(s);
|
||||
} else {
|
||||
popularGetRank();
|
||||
}
|
||||
if (leftTime > 0) {
|
||||
leftTime = leftTime - 1000;
|
||||
}
|
||||
roomGetRankTime = setTimeout(roomGetRankCountup(), 1000);
|
||||
roomGetRankTime = setTimeout(function () {
|
||||
roomGetRankCountup(leftTime)
|
||||
}, 1000);
|
||||
}
|
||||
// 打开页面4弹窗
|
||||
$('.page4 .page4Title2').click(function () {
|
||||
@@ -1223,6 +1250,8 @@ $('.rule .rule_in .TabBox div').click(function () {
|
||||
return false;
|
||||
})
|
||||
// 规则弹窗小切换
|
||||
var arr1 = ['01.05-01.08', '01.09-01.11', '01.12-01.14', '01.15-01.17', '1.18-01.19'];
|
||||
var arr2 = ['01.05-01.07', '01.08-01.10', '01.11-01.13', '01.14-01.16', '1.17-01.19'];
|
||||
$('.rule .rule_in .tabs div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$(this).addClass('act').siblings().removeClass('act');
|
||||
@@ -1250,6 +1279,15 @@ $('.rule .rule_in .tabs div').click(function () {
|
||||
$('.rule .rule_in .content2 img').attr('src', `./images/rule2${i}.png`);
|
||||
}
|
||||
}
|
||||
if (i == 3) {
|
||||
arr1.forEach((res, i) => {
|
||||
$('.rule .rule_in .content_tabBox .tab span').eq(i).text(res);
|
||||
})
|
||||
} else if (i == 4) {
|
||||
arr2.forEach((res, i) => {
|
||||
$('.rule .rule_in .content_tabBox .tab span').eq(i).text(res);
|
||||
})
|
||||
}
|
||||
return false;
|
||||
})
|
||||
// 规则弹窗晋级赛切换
|
||||
|