diff --git a/view/yinmeng/modules/ranks/css/index.css b/view/yinmeng/modules/ranks/css/index.css index 14ab13c..fdb9aa6 100644 --- a/view/yinmeng/modules/ranks/css/index.css +++ b/view/yinmeng/modules/ranks/css/index.css @@ -75,6 +75,7 @@ body { color: rgba(43, 45, 51, 0.5); font-size: 0.42667rem; font-weight: 600; + white-space: nowrap; } .header .tab div span { diff --git a/view/yinmeng/modules/ranks/css/index.scss b/view/yinmeng/modules/ranks/css/index.scss index 41cdeaf..c371b3f 100644 --- a/view/yinmeng/modules/ranks/css/index.scss +++ b/view/yinmeng/modules/ranks/css/index.scss @@ -77,6 +77,7 @@ body { color: rgba(43, 45, 51, 0.5); font-size: px2rem(32); font-weight: 600; + white-space: nowrap; span { width: px2rem(26); diff --git a/view/yinmeng/modules/ranks/index.html b/view/yinmeng/modules/ranks/index.html index 323b000..14821e3 100644 --- a/view/yinmeng/modules/ranks/index.html +++ b/view/yinmeng/modules/ranks/index.html @@ -46,28 +46,13 @@

- - + +
- - - -
-

- -

-
- - -
- - -
-
@@ -76,8 +61,23 @@

- - + + +
+ + +
+
+ + + +
+

+ +

+
+ +
@@ -149,7 +149,7 @@
- +

diff --git a/view/yinmeng/modules/ranks/js/index.js b/view/yinmeng/modules/ranks/js/index.js index efb183f..a3e7695 100644 --- a/view/yinmeng/modules/ranks/js/index.js +++ b/view/yinmeng/modules/ranks/js/index.js @@ -29,6 +29,8 @@ const toastMsg = (content = '操作完成', time = 2) => { var listType = 1;//榜单类型 var datetype = 1;//时间类型 1 日 2 周 3 总 4 半小时 5 月 6 小时 var type = 2;//榜单类型 1 收礼榜 2 送礼榜 3 房间榜 +var charmImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_charm_'; +var experImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_exper_'; // 初始化函数 $(function () { getInfoFromClient() @@ -72,6 +74,9 @@ function getRank (type, datetype) { nick: '虚位以待', totalNum: "", gender: '', + uid: '', + inMic: '', + inRoomUid: '', }) top3.push(...arr) } @@ -87,13 +92,19 @@ function getRank (type, datetype) { $(`.header .topBox .no${i + 1} i`).show(); $(`.header .topBox .no${i + 1} .zl`).show(); } + if (type == 2) { + $(`.header .topBox .no${i + 1} .zl`).hide(); + } else { + $(`.header .topBox .no${i + 1} .zl`).show(); + } $(`.header .topBox .no${i + 1} .ts`).attr('uid', res.uid); $(`.header .topBox .no${i + 1} .ts`).attr('inRoomUid', res.inRoomUid); $(`.header .topBox .no${i + 1} .ts`).attr('inMic', res.inMic); $(`.header .topBox .no${i + 1} .tx`).attr('src', res.avatar); + $(`.header .topBox .no${i + 1} .zl`).attr('src', res.assist ? res.assist.avatar : './images/logo.png'); $(`.header .topBox .no${i + 1} p`).html(`${res.nick.length > 6 ? `${res.nick.slice(0, 6)}...` : res.nick}`); - $(`.header .topBox .no${i + 1} .icon .icon1`).attr('src', res.experUrl); - $(`.header .topBox .no${i + 1} .icon .icon2`).attr('src', res.charmUrl); + $(`.header .topBox .no${i + 1} .icon .icon1`).attr('src', experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`); + $(`.header .topBox .no${i + 1} .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`); if (i >= 1) { $(`.header .topBox .no${i + 1} i`).text(`距上一名${unitProcessing((top3[i - 1].totalNum - res.totalNum), 10000, 1, 'W')}`); } @@ -116,10 +127,15 @@ function getRank (type, datetype) {

- - + +
+
+ +
${res.assist ? res.assist.nick : ''}
+

最佳助力

+
${unitProcessing((arrAll[0 + 2].totalNum - res.totalNum), 10000, 1, 'W')}
距上一名 @@ -171,23 +187,23 @@ function getlastTop (type, datetype) { if (res.nick == '虚位以待') { $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon`).hide(); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} i`).hide(); - $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .zl`).hide(); + $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon_gh`).hide(); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} p span`).hide(); console.log('123'); } else { $(`.lastTopThree .lastTopThree_in .box .no${i + 1} p span img`).show(); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon`).show(); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} i`).show(); - $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .zl`).show(); + $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon_gh`).show(); } + $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon_gh`).attr('src', res.assist ? res.assist.avatar : './images/logo.png') $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .ts`).attr('uid', res.uid); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .ts`).attr('inRoomUid', res.inRoomUid); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .tx`).attr('src', res.avatar); - $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon_gh`).attr('src', res.assist.avatar); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} p`).html(`${res.nick.length > 6 ? `${res.nick.slice(0, 6)}...` : res.nick}`); - $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon .icon1`).attr('src', res.experUrl); - $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon .icon2`).attr('src', res.charmUrl); - + $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon .icon1`).attr('src', experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`); + $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`); + if (res.inMic) { $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .svga`).show(); } else { @@ -231,8 +247,8 @@ function clanListRank () { $(`.header .topBox .no${i + 1} .tx`).attr('src', res.avatar); $(`.header .topBox .no${i + 1} .icon_gh`).attr('src', res.levelIcon); $(`.header .topBox .no${i + 1} p`).html(`${res.name.length > 6 ? `${res.name.slice(0, 6)}...` : res.name}`); - $(`.header .topBox .no${i + 1} .icon .icon1`).attr('src', res.experUrl); - $(`.header .topBox .no${i + 1} .icon .icon2`).attr('src', res.charmUrl); + $(`.header .topBox .no${i + 1} .icon .icon1`).attr('src', experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`); + $(`.header .topBox .no${i + 1} .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`); if (i >= 1) { $(`.header .topBox .no${i + 1} i`).text(`距上一名${unitProcessing((top3[i - 1].totalNum - res.totalNum), 10000, 1, 'W')}`); } @@ -385,9 +401,58 @@ $('.header .topBox .no .ts').on('click', function () { var inRoomUid = $(this).attr('inRoomUid'); var inMic = $(this).attr('inMic'); if (listType == 4) { + console.log('工会'); return } - if (inMic == true) { + if (listType == 3) { + if (browser.ios) { + window.webkit.messageHandlers.openRoom.postMessage(uid); + } else if (browser.android) { + if (androidJsObj && typeof androidJsObj === 'object') { + window.androidJsObj.openRoom(uid); + } + } + console.log('房间3', uid, inRoomUid, inMic); + } else if (inMic == "true") { + if (browser.ios) { + window.webkit.messageHandlers.openRoom.postMessage(inRoomUid); + } else if (browser.android) { + if (androidJsObj && typeof androidJsObj === 'object') { + window.androidJsObj.openRoom(inRoomUid); + } + } + console.log('房间', uid, inRoomUid, inMic); + } else { + if (browser.ios) { + window.webkit.messageHandlers.openPersonPage.postMessage(uid); + } else if (browser.android) { + if (androidJsObj && typeof androidJsObj === 'object') { + window.androidJsObj.openPersonPage(uid); + } + } + console.log('信息页', uid, inRoomUid, inMic); + } + +}) +// 点击非前三按钮 +$('.list').on('click', 'li .tx', function () { + var uid = $(this).attr('uid'); + var inRoomUid = $(this).attr('inRoomUid'); + var inMic = $(this).attr('inMic'); + if (listType == 4) { + console.log('工会'); + return + } + if (listType == 3) { + if (browser.ios) { + window.webkit.messageHandlers.openRoom.postMessage(uid); + } else if (browser.android) { + if (androidJsObj && typeof androidJsObj === 'object') { + window.androidJsObj.openRoom(uid); + } + } + console.log('房间3', uid, inRoomUid, inMic); + } else if (inMic == "true") { if (browser.ios) { window.webkit.messageHandlers.openRoom.postMessage(inRoomUid); } else if (browser.android) {