每日消费 - 更新用户等级小于七级展示默认榜单数据
This commit is contained in:
@@ -138,7 +138,7 @@ function getConfig() {
|
||||
// 处理是否代理人
|
||||
res.data.rechargeUser ? $('.myBox').hide() : $('.myBox').show();
|
||||
// 处理等级不足不显示榜单
|
||||
res.data.wealth <= 7 ? $('.priorityWinners,.priorityWinnersBox').hide() : $('.priorityWinners,.priorityWinnersBox').show()
|
||||
// res.data.wealth <= 7 ? $('.priorityWinners,.priorityWinnersBox').hide() : $('.priorityWinners,.priorityWinnersBox').show()
|
||||
// 处理倒计时
|
||||
countup(res.data.endTime - res.timestamp);
|
||||
// 处理顶部进度以及个人信息
|
||||
@@ -150,11 +150,11 @@ function getConfig() {
|
||||
$('.myBox .tetxBox .r strong').text(6000000);
|
||||
$('.myBox .lineBox .box1 span b').text(unitProcessingAr(300000));
|
||||
$('.myBox .lineBox .box1').css('left', `${(300000 / 6000000) * 100}%`);
|
||||
$('.myBox .lineBox .box2 span b').text(unitProcessingAr(1500000,1));
|
||||
$('.myBox .lineBox .box2 span b').text(unitProcessingAr(1500000, 1));
|
||||
$('.myBox .lineBox .box2').css('left', `${(1500000 / 6000000) * 100}%`);
|
||||
$('.myBox .lineBox .box3 span b').text(unitProcessingAr(3000000,1));
|
||||
$('.myBox .lineBox .box3 span b').text(unitProcessingAr(3000000, 1));
|
||||
$('.myBox .lineBox .box3').css('left', `${(3000000 / 6000000) * 100}%`);
|
||||
$('.myBox .lineBox .box4 span b').text(unitProcessingAr(6000000,1));
|
||||
$('.myBox .lineBox .box4 span b').text(unitProcessingAr(6000000, 1));
|
||||
$('.myBox .lineBox .box4').css('right', `0%`);
|
||||
$('.myBox .lineBox .line').css('width', `${((res.data.goldNum / 6000000) * 100) > 100 ? 100 : (res.data.goldNum / 6000000) * 100}%`);
|
||||
if (res.data.goldNum >= 300000) { $('.myBox .lineBox .box1').addClass('act') }
|
||||
@@ -190,42 +190,59 @@ function getConfig() {
|
||||
progressWidth = progressWidth > 100 ? 100 : progressWidth;
|
||||
$('.myBox .lineBox .line').css('width', `${progressWidth}%`);
|
||||
if (res.data.goldNum >= 10000000) { $('.myBox .lineBox .box1').addClass('act') }
|
||||
if (res.data.goldNum >= 20000000) { $('.myBox .lineBox .box2').addClass('act')
|
||||
if (res.data.goldNum >= 20000000) {
|
||||
$('.myBox .lineBox .box2').addClass('act')
|
||||
}
|
||||
if (res.data.goldNum >= 30000000) { $('.myBox .lineBox .box3').addClass('act')
|
||||
if (res.data.goldNum >= 30000000) {
|
||||
$('.myBox .lineBox .box3').addClass('act')
|
||||
}
|
||||
if (res.data.goldNum >= 90000000) { $('.myBox .lineBox .box4').addClass('act') }
|
||||
}
|
||||
// 处理每个档位的用户前四名
|
||||
res.data.activityLevelUserVo.forEach((res, i) => {
|
||||
res.data.activityLevelUserVo.forEach((item, i) => {
|
||||
var str = '';
|
||||
if ((res.level) <= 3) {
|
||||
$(`.content1 .level${res.level} .priorityWinnersBox div`).remove();
|
||||
} else {
|
||||
$(`.content2 .level${res.level} .priorityWinnersBox div`).remove();
|
||||
}
|
||||
if (res.userVos.length > 0) {
|
||||
res.userVos.forEach(val => {
|
||||
str += `
|
||||
<div>
|
||||
<img src="${val.avatar}" alt="">
|
||||
<span>${val.name}</span>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
} else {
|
||||
str += `
|
||||
// 等级小于七级展示默认
|
||||
if (res.data.wealth <= 7) {
|
||||
$(`.content1 .level${item.level} .priorityWinnersBox div`).remove();
|
||||
$(`.content2 .level${item.level} .priorityWinnersBox div`).remove();
|
||||
str = `
|
||||
<div>
|
||||
<img src="./images/null.png" alt="">
|
||||
<span>${localLang.demoModule.waiting}</span>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
if ((res.level) <= 3) {
|
||||
$(`.content1 .level${res.level} .priorityWinnersBox`).append(str);
|
||||
$(`.content1 .level${item.level} .priorityWinnersBox`).append(str);
|
||||
$(`.content2 .level${item.level} .priorityWinnersBox`).append(str);
|
||||
} else {
|
||||
$(`.content2 .level${res.level} .priorityWinnersBox`).append(str);
|
||||
if ((item.level) <= 4) {
|
||||
$(`.content1 .level${item.level} .priorityWinnersBox div`).remove();
|
||||
} else {
|
||||
$(`.content2 .level${item.level} .priorityWinnersBox div`).remove();
|
||||
}
|
||||
if (item.userVos.length > 0) {
|
||||
item.userVos.forEach(val => {
|
||||
str += `
|
||||
<div>
|
||||
<img src="${val.avatar}" alt="">
|
||||
<span>${val.name}</span>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
} else {
|
||||
str += `
|
||||
<div>
|
||||
<img src="./images/null.png" alt="">
|
||||
<span>${localLang.demoModule.waiting}</span>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
if ((item.level) <= 4) {
|
||||
$(`.content1 .level${item.level} .priorityWinnersBox`).append(str);
|
||||
} else {
|
||||
$(`.content2 .level${item.level} .priorityWinnersBox`).append(str);
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
|
Reference in New Issue
Block a user