diff --git a/view/molistar/modules/newRank/js/monthlyIndex.js b/view/molistar/modules/newRank/js/monthlyIndex.js
index 18b4c9ff..012c09f3 100644
--- a/view/molistar/modules/newRank/js/monthlyIndex.js
+++ b/view/molistar/modules/newRank/js/monthlyIndex.js
@@ -55,7 +55,8 @@ $(function () {
localLang = window.lang;
translateFun();
showLoading()
- geth5()
+ geth5(1);
+ geth5(2);
userInfo()
}, 100)
})
@@ -76,10 +77,11 @@ function translateFun() {
$('.newText5').html(langReplace(localLang.demoModule.newText5));
$('.newText6').html(langReplace(localLang.demoModule.newText6));
$('.Ranking').html(langReplace(localLang.demoModule.Ranking));
-
+
}
+var partitionId;
// 榜单接口
-function geth5() {
+function geth5(periodType) {
$('ul li').remove();
$('.header .sTab').show();
$('.my').show()
@@ -94,11 +96,12 @@ function geth5() {
data: {
type: listType,
datetype: 5,
- periodType: 1,
+ periodType,
uid: pubInfo.uid
},
success(res) {
if (res.code === 200) {
+ partitionId = res.data.partitionId;
var my = res.data.me;
var listTo3 = res.data.rankVoList.slice(0, 3);
var notListTo3 = res.data.rankVoList.slice(3);
@@ -112,24 +115,18 @@ function geth5() {
})
listTo3.push(...arr)
}
- listTo3.forEach((res, i) => {
- $(`.header .top .top${i + 1} .ts`).attr('uid', res.uid);
- $(`.header .top .top${i + 1} .tx`).attr('src', res.avatar);
- $(`.header .top .top${i + 1} .nick`).text(res.nick);
- // if (i > 0) {
- $(`.rank_top .top${i + 1} .score span`).text(unitProcessingAr(res.diffNum, 1));
-
- $(`.rank_top .top${i + 1} .ts`).attr('uid', res.uid);
- $(`.rank_top .top${i + 1} .tx`).attr('src', res.avatar);
- $(`.rank_top .top${i + 1} .nick`).text(res.nick);
- // if (i > 0) {
- $(`.rank_top .top${i + 1} .score span`).text(unitProcessingAr(res.diffNum, 1));
- // }
- });
- // 非前三
- var str = '';
- notListTo3.forEach((res, i) => {
- str += `
+ // 本月
+ if (periodType == 1) {
+ listTo3.forEach((res, i) => {
+ $(`.rank_top .top${i + 1} .ts`).attr('uid', res.uid);
+ $(`.rank_top .top${i + 1} .tx`).attr('src', res.avatar);
+ $(`.rank_top .top${i + 1} .nick`).text(res.nick);
+ $(`.rank_top .top${i + 1} .score span`).text(unitProcessingAr(res.diffNum, 1));
+ });
+ // 非前三
+ var str = '';
+ notListTo3.forEach((res, i) => {
+ str += `
${res.seqNo}
@@ -141,16 +138,27 @@ function geth5() {
-->
`
- })
- $('ul').append(str);
- // 处理自己
- $('.my .box .tx').attr('src', my.avatar);
- $('.my .box .nick').text(my.nick);
- $('.my .box .seqNo').text(my.seqNo <= 0 ? '-' : my.seqNo);
- $('.my .box .score span').text(my.diffNum <= 0 ? '-' : unitProcessingAr(my.diffNum, 1));
- if (my.diffNum <= 0) {
- $('.my .box .score b').hide();
+ })
+ $('ul').append(str);
+ // 处理自己
+ $('.my .box .tx').attr('src', my.avatar);
+ $('.my .box .nick').text(my.nick);
+ $('.my .box .seqNo').text(my.seqNo <= 0 ? '-' : my.seqNo);
+ $('.my .box .score span').text(my.diffNum <= 0 ? '-' : unitProcessingAr(my.diffNum, 1));
+ if (my.diffNum <= 0) {
+ $('.my .box .score b').hide();
+ }
+ }else{
+ if(partitionId == 32) return;
+ // 上月
+ listTo3.forEach((res, i) => {
+ $(`.header .top .top${i + 1} .ts`).attr('uid', res.uid);
+ $(`.header .top .top${i + 1} .tx`).attr('src', res.avatar);
+ $(`.header .top .top${i + 1} .nick`).text(res.nick);
+ $(`.header .top .top${i + 1} .score span`).text(unitProcessingAr(res.diffNum, 1));
+ });
}
+
} else {
toastMsg(res.message)
}
@@ -163,7 +171,7 @@ function geth5() {
})
}
// 公会接口
-function listRank(type) {
+function listRank(periodType) {
$('ul li').remove();
$('.my').hide()
// $('.header .top .top2 .score,.header .top .top3 .score').hide();
@@ -174,7 +182,7 @@ function listRank(type) {
type: 'get',
url: urlPrefix + '/clan/listRank',
data: {
- periodType: 1,
+ periodType,
},
success(res) {
if (res.code === 200) {
@@ -192,13 +200,10 @@ function listRank(type) {
})
listTo3.push(...arr)
}
- listTo3.forEach((res, i) => {
- $(`.header .top .top${i + 1} .ts`).attr('uid', res.clanElderUid);
- $(`.header .top .top${i + 1} .tx`).attr('src', res.avatar);
- $(`.header .top .top${i + 1} .nick`).text(res.name);
- $(`.header .top .top${i + 1} .score span`).text(unitProcessingAr(res.diffNum, 1));
-
- $(`.rank_top .top${i + 1} .ts`).attr('uid', res.clanElderUid);
+ // 这个月榜单
+ if(periodType == 1){
+ listTo3.forEach((res, i) => {
+ $(`.rank_top .top${i + 1} .ts`).attr('uid', res.clanElderUid);
$(`.rank_top .top${i + 1} .tx`).attr('src', res.avatar);
$(`.rank_top .top${i + 1} .nick`).text(res.name);
// if (i > 0) {
@@ -221,6 +226,17 @@ function listRank(type) {
`
})
$('ul').append(str);
+ }else{
+ if(partitionId == 32) return
+ // 上月榜单
+ listTo3.forEach((res, i) => {
+ $(`.header .top .top${i + 1} .ts`).attr('uid', res.clanElderUid);
+ $(`.header .top .top${i + 1} .tx`).attr('src', res.avatar);
+ $(`.header .top .top${i + 1} .nick`).text(res.name);
+ $(`.header .top .top${i + 1} .score span`).text(unitProcessingAr(res.diffNum, 1));
+ });
+ }
+
} else {
toastMsg(res.message)
}
@@ -243,9 +259,9 @@ $('.tabBox div').click(function () {
$('.rank_top').removeClass('top_bg_1').removeClass('top_bg_2').removeClass('top_bg_3')
$(`.rank_top`).addClass(`top_bg_${i}`);
// 奖励图
- $('.reward_img div').removeClass('rewardImg_1').removeClass('rewardImg_2').removeClass('rewardImg_3')
+ $('.reward_img div').removeClass('rewardImg_1').removeClass('rewardImg_2').removeClass('rewardImg_3')
$(`.reward_img div`).addClass(`rewardImg_${i}`);
-
+
$('ul li .tx').removeClass('actTx');
$(`.header .top .top1 .ts`).attr('src', './images/no1.png')
$(`.header .top .top2 .ts`).attr('src', './images/no2.png')
@@ -257,12 +273,15 @@ $('.tabBox div').click(function () {
$('.my .box .score img').attr('src', `./images/${type}.png`);
if (i == 1) {
listType = 2;
- geth5();
+ geth5(1);
+ geth5(2);
} else if (i == 2) {
listType = 1;
- geth5();
+ geth5(1);
+ geth5(2);
} else if (i == 3) {
- listRank(4);
+ listRank(1);
+ listRank(2);
$('ul li .tx').addClass('actTx');
}
})
@@ -270,10 +289,10 @@ $('.tabBox div').click(function () {
$('.sTab div').click(function () {
$(this).addClass('act').siblings().removeClass('act');
timeType = $(this).attr('type');
- if(timeType == 1){
+ if (timeType == 1) {
$('.rank_list').show();
$('.reward_img').hide();
- }else{
+ } else {
$('.reward_img').show();
$('.rank_list').hide();
}
diff --git a/view/molistar/modules/newRank/js/monthlyRewards.js b/view/molistar/modules/newRank/js/monthlyRewards.js
index 04b0a80c..ced53d97 100644
--- a/view/molistar/modules/newRank/js/monthlyRewards.js
+++ b/view/molistar/modules/newRank/js/monthlyRewards.js
@@ -93,10 +93,11 @@ function geth5() {
},
success(res) {
if (res.code === 200) {
+ partitionId = res.data.partitionId;
+ if(res.data.partitionId !=32){
var my = res.data.me;
var listTo3 = res.data.rankVoList.slice(0, 3);
var notListTo3 = res.data.rankVoList.slice(3);
- partitionId = res.data.partitionId;
var currentTabIndex = $('.header .tabBox div.act').index() + 1;
// if (partitionId == 16 && currentTabIndex == 1) {
// $('.rewards').removeClass('reward1');
@@ -120,6 +121,7 @@ function geth5() {
$(`.header .top .top${i + 1} .score span`).text(unitProcessingAr(res.diffNum, 1));
// }
});
+ }
} else {
toastMsg(res.message)
}
@@ -149,7 +151,7 @@ function listRank(type) {
success(res) {
if (res.code === 200) {
var my = res.data.me;
- // if(partitionId == 16) return
+ if(partitionId == 32) return
var listTo3 = res.data.slice(0, 3);
var notListTo3 = res.data.slice(3);
notListTo3 = notListTo3.slice(0, 27)