From 00f179e786131307d1a95700556e9c79081fd74b Mon Sep 17 00:00:00 2001 From: Dragon <13925835632@139.com> Date: Thu, 28 Mar 2024 10:58:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/peko/modules/room_rank/css/index.css | 3 ++ view/peko/modules/room_rank/css/index.scss | 3 ++ view/peko/modules/room_rank/index.html | 22 ++++----- view/peko/modules/room_rank/js/index.js | 52 ++++++++++++---------- 4 files changed, 46 insertions(+), 34 deletions(-) diff --git a/view/peko/modules/room_rank/css/index.css b/view/peko/modules/room_rank/css/index.css index e5182cd..2bb004a 100644 --- a/view/peko/modules/room_rank/css/index.css +++ b/view/peko/modules/room_rank/css/index.css @@ -173,6 +173,7 @@ body { left: 0; bottom: -0.56rem; text-align: center; + white-space: nowrap; } .largestBox .top3 .no1 .box p span { @@ -272,6 +273,7 @@ body { left: 0; bottom: -0.56rem; text-align: center; + white-space: nowrap; } .largestBox .top3 .no2 .box p span { @@ -371,6 +373,7 @@ body { left: 0; bottom: -0.56rem; text-align: center; + white-space: nowrap; } .largestBox .top3 .no3 .box p span { diff --git a/view/peko/modules/room_rank/css/index.scss b/view/peko/modules/room_rank/css/index.scss index fdb4a71..044bdd5 100644 --- a/view/peko/modules/room_rank/css/index.scss +++ b/view/peko/modules/room_rank/css/index.scss @@ -176,6 +176,7 @@ body { left: 0; bottom: px2rem(-42); text-align: center; + white-space: nowrap; span { vertical-align: middle; @@ -276,6 +277,7 @@ body { left: 0; bottom: px2rem(-42); text-align: center; + white-space: nowrap; span { vertical-align: middle; @@ -376,6 +378,7 @@ body { left: 0; bottom: px2rem(-42); text-align: center; + white-space: nowrap; span { vertical-align: middle; diff --git a/view/peko/modules/room_rank/index.html b/view/peko/modules/room_rank/index.html index 8b288da..e1c17d1 100644 --- a/view/peko/modules/room_rank/index.html +++ b/view/peko/modules/room_rank/index.html @@ -4,21 +4,21 @@ - 房间榜 + 房間榜 - +
- + - +
- 爱意榜 + 愛意榜
@@ -39,14 +39,14 @@

- 我是很长的... +

- - + +
-
10000
+
0
@@ -86,12 +86,12 @@
4
-

我是名字名字名字名字名字

+

-

1000

+

0

魅力值
diff --git a/view/peko/modules/room_rank/js/index.js b/view/peko/modules/room_rank/js/index.js index 7f20fd1..4df0347 100644 --- a/view/peko/modules/room_rank/js/index.js +++ b/view/peko/modules/room_rank/js/index.js @@ -5,9 +5,9 @@ var urlData = getQueryString(); if (env == 'test') { new VConsole(); } -// 封装layer消息提醒框 +// 封裝layer消息提醒框 let layerIndex -const showLoading = (content = '加载中...') => { +const showLoading = (content = '加載中...') => { layer.open({ type: 2, shadeClose: false, @@ -30,12 +30,12 @@ const toastMsg = (content = '操作完成', time = 2) => { var listType = 1; var experImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_exper_'; var charmImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_charm_'; -var typeWealth = 'day';//财富榜类型day 日 week 周 month 月 total 总 -// 初始化函数 +var typeWealth = 'day';//財富榜類型day 日 week 周 month 月 total 總 +// 初始化函數 $(function () { getInfoFromClient() setTimeout(function () { - // 页面全屏 + // 頁面全屏 if (browser.app) { if (browser.android) { window.androidJsObj.initShowNav(false) @@ -43,7 +43,7 @@ $(function () { window.webkit.messageHandlers.initShowNav.postMessage(0) } }; - // 顶部返回事件 + // 頂部返回事件 $('.back').click(() => { if (browser.android) { window.androidJsObj.closeWebView() @@ -54,7 +54,7 @@ $(function () { getRankingsWealth(); }, 100) }) -// 榜单切换 +// 榜單切換 $('.largestBox .tab div').click(function () { var i = $(this).index() + 1; listType = i; @@ -69,12 +69,12 @@ $('.largestBox .tab div').click(function () { getReciveRankingsWealth(); } }) -// 日榜切换 +// 日榜切換 $('.largestBox .dayTab div').click(function () { var i = $(this).index() + 1; $(this).addClass(`dayTabColor${listType}`).siblings().removeClass('dayTabColor1').removeClass('dayTabColor2'); if (i == 1) { - typeWealth = 'day';//财富榜类型day 日 week 周 month 月 total 总 + typeWealth = 'day';//財富榜類型day 日 week 周 month 月 total 總 } else if (i == 2) { typeWealth = 'week'; } else if (i == 3) { @@ -86,7 +86,7 @@ $('.largestBox .dayTab div').click(function () { getReciveRankingsWealth(); } }) -// 爱意榜接口 +// 愛意榜接口 function getRankingsWealth () { showLoading() networkRequest({ @@ -108,7 +108,7 @@ function getRankingsWealth () { }, error (err) { hideLoading(layerIndex) - toastMsg('网络错误,请退出重进') + toastMsg('網絡錯誤,請退出重進') } }) } @@ -134,19 +134,19 @@ function getReciveRankingsWealth () { }, error (err) { hideLoading(layerIndex) - toastMsg('网络错误,请退出重进') + toastMsg('網絡錯誤,請退出重進') } }) } -// 渲染样式 +// 渲染樣式 function listDomFun (res, num) { $('.largestBox ul li').remove(); - // 处理前三 + // 處理前三 var top3 = res.data.rankings.slice(0, 3); if (top3.length < 3) { let arr = new Array(3 - top3.length).fill({ avatar: './images/logo.png', - nick: '虚位以待', + nick: '虛位以待', goldAmount: '', }) top3.push(...arr); @@ -165,35 +165,40 @@ function listDomFun (res, num) { $(`.largestBox .top3 .no${i + 1} .box p .sp`).removeClass('boy').removeClass('woman') $(`.largestBox .top3 .no${i + 1} .box p .sp`).addClass(`${res.gender == 1 ? 'boy' : 'woman'}`); $(`.largestBox .top3 .no${i + 1} .box p .sp img`).attr('src', res.gender == 1 ? './images/boy.png' : './images/woman.png'); - $(`.largestBox .top3 .no${i + 1} .box .icon .icon1`).attr('src', experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`) - $(`.largestBox .top3 .no${i + 1} .box .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`) + // $(`.largestBox .top3 .no${i + 1} .box .icon .icon1`).attr('src', experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`) + // $(`.largestBox .top3 .no${i + 1} .box .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`) + $(`.largestBox .top3 .no${i + 1} .box .icon .icon1`).attr('src', res.experUrl) + $(`.largestBox .top3 .no${i + 1} .box .icon .icon2`).attr('src', res.charmUrl) $(`.largestBox .top3 .no${i + 1} .box .score`).text(unitProcessing(res.goldAmount, 10000, 1, 'W')); }) - // 处理非前三 + // 處理非前三 var notTop3 = res.data.rankings.slice(3); var str = ''; notTop3.forEach((res, i) => { + // experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png` + // charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png` str += `
  • ${i + 4}

    ${res.nick}

    - - + +

    ${unitProcessing(res.goldAmount, 10000, 1, 'W')}

    - ${num == 1 ? '爱意值' : '魅力值'} + ${num == 1 ? '愛意值' : '魅力值'}
  • ` }) $('.largestBox ul').append(str); } -// 点击前三跳转房间 +// 點擊前三跳轉房間 $('.largestBox').on('click', '.top3 .no .box .ts', function () { var uid = $(this).attr('uid'); + return; if (browser.ios) { window.webkit.messageHandlers.openPersonPage.postMessage(uid); } else if (browser.android) { @@ -202,9 +207,10 @@ $('.largestBox').on('click', '.top3 .no .box .ts', function () { } } }) -// 点击非前三跳转房间 +// 點擊非前三跳轉房間 $('.largestBox').on('click', 'ul li .tx', function () { var uid = $(this).attr('uid'); + return; if (browser.ios) { window.webkit.messageHandlers.openPersonPage.postMessage(uid); } else if (browser.android) {