From 7e76f15a039f91b1492e3a3694b33235b98257d0 Mon Sep 17 00:00:00 2001 From: dragon <3013557874@qq.com> Date: Thu, 16 Jan 2025 18:28:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5=E6=A6=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/molistar/modules/newRank/css/index.css | 1 + view/molistar/modules/newRank/css/index.scss | 2 +- view/molistar/modules/newRank/js/index.js | 42 ++++++++++++++++--- .../modules/newRank/js/monthlyRewards.js | 8 ---- 4 files changed, 38 insertions(+), 15 deletions(-) diff --git a/view/molistar/modules/newRank/css/index.css b/view/molistar/modules/newRank/css/index.css index 457cd6b5..57470121 100644 --- a/view/molistar/modules/newRank/css/index.css +++ b/view/molistar/modules/newRank/css/index.css @@ -171,6 +171,7 @@ body { color: #000; font-size: 0.34667rem; font-weight: 500; + display: none; } .header .monthlyRewards p { diff --git a/view/molistar/modules/newRank/css/index.scss b/view/molistar/modules/newRank/css/index.scss index 7de488ef..5b6c9479 100644 --- a/view/molistar/modules/newRank/css/index.scss +++ b/view/molistar/modules/newRank/css/index.scss @@ -179,7 +179,7 @@ body { color: #000; font-size: px2rem(26); font-weight: 500; - // display: none; + display: none; p { position: absolute; diff --git a/view/molistar/modules/newRank/js/index.js b/view/molistar/modules/newRank/js/index.js index c119a291..36fd8ebf 100644 --- a/view/molistar/modules/newRank/js/index.js +++ b/view/molistar/modules/newRank/js/index.js @@ -29,6 +29,7 @@ const toastMsg = (content = langReplace(localLang.demoModule.layerIndex2), time var listType = 2;//2爱意榜 1魅力榜 3房间榜 var timeType = 1;//1日 2周 var type = 1; +var partitionId; // 初始化函數 $(function () { getInfoFromClient(); @@ -55,6 +56,7 @@ $(function () { translateFun(); showLoading() geth5() + userInfo() }, 100) }) function translateFun() { @@ -75,6 +77,29 @@ function translateFun() { } // 榜单接口 +function userInfo() { + networkRequest({ + type: 'get', + url: urlPrefix + '/web-user', + success(res) { + if (res.code === 200) { + partitionId = res.data.partitionId; + if (partitionId == 4) { + $('.header .sTab .newText2').hide(); + $(`.header .monthlyRewards`).hide(); + } + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error(err) { + hideLoading(layerIndex) + toastMsg(langReplace(localLang.demoModule.layerIndex3)) + } + }) +} +// 榜单接口 function geth5() { $('ul li').remove(); $('.header .sTab').show(); @@ -231,7 +256,7 @@ $('.header .tabBox div').click(function () { $('.top').removeClass('tops1').removeClass('tops2').removeClass('tops3').removeClass('tops4'); $(`.top`).addClass(`tops${i}`); $('ul li .tx').removeClass('actTx'); - // $('.header .monthlyRewards').hide(); + $('.header .monthlyRewards').hide(); $(`.header .top .top1 .ts`).attr('src', './images/no1.png') $(`.header .top .top2 .ts`).attr('src', './images/no2.png') $(`.header .top .top3 .ts`).attr('src', './images/no3.png') @@ -260,17 +285,22 @@ $('.header .tabBox div').click(function () { listRank(4); $('ul li .tx').addClass('actTx'); } + + if (partitionId == 4) { + $('.header .sTab .newText2').hide(); + $(`.header .monthlyRewards`).hide(); + } }) // 日榜周榜切换tab $('.header .sTab div').click(function () { var i = $(this).index() + 1; $(this).addClass('act').siblings().removeClass('act'); timeType = $(this).attr('type'); - // if (timeType == 5) { - // $('.header .monthlyRewards').show(); - // } else { - // $('.header .monthlyRewards').hide(); - // } + if (timeType == 5) { + $('.header .monthlyRewards').show(); + } else { + $('.header .monthlyRewards').hide(); + } geth5(); }) // 前三跳转个人页 diff --git a/view/molistar/modules/newRank/js/monthlyRewards.js b/view/molistar/modules/newRank/js/monthlyRewards.js index 4970c7a7..1f74d821 100644 --- a/view/molistar/modules/newRank/js/monthlyRewards.js +++ b/view/molistar/modules/newRank/js/monthlyRewards.js @@ -113,14 +113,6 @@ function geth5() { $(`.header .top .top${i + 1} .score span`).text(unitProcessingAr(res.diffNum, 1)); // } }); - // 处理自己 - $('.my .box .tx').attr('src', my.avatar); - $('.my .box .nick').text(my.nick); - $('.my .box .seqNo').text(my.diffNum <= 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 { toastMsg(res.message) }