修复bug

This commit is contained in:
Dragon
2023-11-13 15:20:01 +08:00
parent 1421103a4f
commit e856a0a6c5
4 changed files with 100 additions and 33 deletions

View File

@@ -75,6 +75,7 @@ body {
color: rgba(43, 45, 51, 0.5); color: rgba(43, 45, 51, 0.5);
font-size: 0.42667rem; font-size: 0.42667rem;
font-weight: 600; font-weight: 600;
white-space: nowrap;
} }
.header .tab div span { .header .tab div span {

View File

@@ -77,6 +77,7 @@ body {
color: rgba(43, 45, 51, 0.5); color: rgba(43, 45, 51, 0.5);
font-size: px2rem(32); font-size: px2rem(32);
font-weight: 600; font-weight: 600;
white-space: nowrap;
span { span {
width: px2rem(26); width: px2rem(26);

View File

@@ -46,28 +46,13 @@
<span class="girl"><img src="./images/girl.png" alt=""></span> <span class="girl"><img src="./images/girl.png" alt=""></span>
</p> </p>
<div class="icon"> <div class="icon">
<img class="icon1" src="./images/icon1.png" alt=""> <img class="icon1" src="" alt="">
<img class="icon2" src="./images/icon2.png" alt=""> <img class="icon2" src="" alt="">
</div> </div>
<!-- <i>距上一名111.5W</i> --> <!-- <i>距上一名111.5W</i> -->
<img src="" alt="" class="icon_gh"> <img src="" alt="" class="icon_gh">
</div> </div>
<div class="no no2"> <div class="no no2">
<img src="./images/no3.png" alt="" class="ts">
<img src="./images/logo.png" alt="" class="tx">
<img src="./images/logo.png" alt="" class="zl">
<div src="./images/live.svga" loops="0" clearsAfterStop="true" class="svga"></div>
<p>
<span class="girl"><img src="./images/girl.png" alt=""></span>
</p>
<div class="icon">
<img class="icon1" src="./images/icon1.png" alt="">
<img class="icon2" src="./images/icon2.png" alt="">
</div>
<i></i>
<img src="" alt="" class="icon_gh">
</div>
<div class="no no3">
<img src="./images/no2.png" alt="" class="ts"> <img src="./images/no2.png" alt="" class="ts">
<img src="./images/logo.png" alt="" class="tx"> <img src="./images/logo.png" alt="" class="tx">
<img src="./images/logo.png" alt="" class="zl"> <img src="./images/logo.png" alt="" class="zl">
@@ -76,8 +61,23 @@
<span class="girl"><img src="./images/girl.png" alt=""></span> <span class="girl"><img src="./images/girl.png" alt=""></span>
</p> </p>
<div class="icon"> <div class="icon">
<img class="icon1" src="./images/icon1.png" alt=""> <img class="icon1" src="" alt="">
<img class="icon2" src="./images/icon2.png" alt=""> <img class="icon2" src="" alt="">
</div>
<i></i>
<img src="" alt="" class="icon_gh">
</div>
<div class="no no3">
<img src="./images/no3.png" alt="" class="ts">
<img src="./images/logo.png" alt="" class="tx">
<img src="./images/logo.png" alt="" class="zl">
<div src="./images/live.svga" loops="0" clearsAfterStop="true" class="svga"></div>
<p>
<span class="girl"><img src="./images/girl.png" alt=""></span>
</p>
<div class="icon">
<img class="icon1" src="" alt="">
<img class="icon2" src="" alt="">
</div> </div>
<i></i> <i></i>
<img src="" alt="" class="icon_gh"> <img src="" alt="" class="icon_gh">
@@ -149,7 +149,7 @@
<img src="" alt="" class="icon_gh"> <img src="" alt="" class="icon_gh">
</div> </div>
<div class="no no3"> <div class="no no3">
<img src="./images/no2.png" alt="" class="ts"> <img src="./images/no3.png" alt="" class="ts">
<img src="./images/logo.png" alt="" class="tx"> <img src="./images/logo.png" alt="" class="tx">
<div src="./images/live.svga" loops="0" clearsAfterStop="true" class="svga"></div> <div src="./images/live.svga" loops="0" clearsAfterStop="true" class="svga"></div>
<p> <p>

View File

@@ -29,6 +29,8 @@ const toastMsg = (content = '操作完成', time = 2) => {
var listType = 1;//榜单类型 var listType = 1;//榜单类型
var datetype = 1;//时间类型 1 日 2 周 3 总 4 半小时 5 月 6 小时 var datetype = 1;//时间类型 1 日 2 周 3 总 4 半小时 5 月 6 小时
var type = 2;//榜单类型 1 收礼榜 2 送礼榜 3 房间榜 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 () { $(function () {
getInfoFromClient() getInfoFromClient()
@@ -72,6 +74,9 @@ function getRank (type, datetype) {
nick: '虚位以待', nick: '虚位以待',
totalNum: "", totalNum: "",
gender: '', gender: '',
uid: '',
inMic: '',
inRoomUid: '',
}) })
top3.push(...arr) top3.push(...arr)
} }
@@ -87,13 +92,19 @@ function getRank (type, datetype) {
$(`.header .topBox .no${i + 1} i`).show(); $(`.header .topBox .no${i + 1} i`).show();
$(`.header .topBox .no${i + 1} .zl`).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('uid', res.uid);
$(`.header .topBox .no${i + 1} .ts`).attr('inRoomUid', res.inRoomUid); $(`.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} .ts`).attr('inMic', res.inMic);
$(`.header .topBox .no${i + 1} .tx`).attr('src', res.avatar); $(`.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}<span class="${res.gender == 1 ? 'boy' : 'girl'}"><img src="./images/${res.gender == 1 ? 'boy' : 'girl'}.png" alt=""></span>`); $(`.header .topBox .no${i + 1} p`).html(`${res.nick.length > 6 ? `${res.nick.slice(0, 6)}...` : res.nick}<span class="${res.gender == 1 ? 'boy' : 'girl'}"><img src="./images/${res.gender == 1 ? 'boy' : 'girl'}.png" alt=""></span>`);
$(`.header .topBox .no${i + 1} .icon .icon1`).attr('src', res.experUrl); $(`.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', res.charmUrl); $(`.header .topBox .no${i + 1} .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`);
if (i >= 1) { if (i >= 1) {
$(`.header .topBox .no${i + 1} i`).text(`距上一名${unitProcessing((top3[i - 1].totalNum - res.totalNum), 10000, 1, 'W')}`); $(`.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) {
<span class="${res.gender == 1 ? 'boy' : 'girl'}"><img src="./images/${res.gender == 1 ? 'boy' : 'girl'}.png" alt=""></span> <span class="${res.gender == 1 ? 'boy' : 'girl'}"><img src="./images/${res.gender == 1 ? 'boy' : 'girl'}.png" alt=""></span>
</p> </p>
<div class="icon"> <div class="icon">
<img src="${res.experUrl}" alt=""> <img src="${experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`}" alt="">
<img src="${res.charmUrl}" alt=""> <img src="${charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`}" alt="">
</div> </div>
</div> </div>
<div class="right" style=display:${res.assist ? 'block' : 'none'}>
<img src="${res.assist ? res.assist.avatar : './images/logo.png'}" alt="">
<div class="nick">${res.assist ? res.assist.nick : ''}</div>
<p>最佳助力</p>
</div>
<div class="score"> <div class="score">
<b>${unitProcessing((arrAll[0 + 2].totalNum - res.totalNum), 10000, 1, 'W')}</b><br> <b>${unitProcessing((arrAll[0 + 2].totalNum - res.totalNum), 10000, 1, 'W')}</b><br>
<i>距上一名</i> <i>距上一名</i>
@@ -171,23 +187,23 @@ function getlastTop (type, datetype) {
if (res.nick == '虚位以待') { if (res.nick == '虚位以待') {
$(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon`).hide(); $(`.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} 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(); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} p span`).hide();
console.log('123'); console.log('123');
} else { } else {
$(`.lastTopThree .lastTopThree_in .box .no${i + 1} p span img`).show(); $(`.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} .icon`).show();
$(`.lastTopThree .lastTopThree_in .box .no${i + 1} i`).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('uid', res.uid);
$(`.lastTopThree .lastTopThree_in .box .no${i + 1} .ts`).attr('inRoomUid', res.inRoomUid); $(`.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} .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}<span class="${res.gender == 1 ? 'boy' : 'girl'}" style="display:${res.nick == '虚位以待' ? 'none' : 'inline-block'};"><img src="./images/${res.gender == 1 ? 'boy' : 'girl'}.png" alt=""></span>`); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} p`).html(`${res.nick.length > 6 ? `${res.nick.slice(0, 6)}...` : res.nick}<span class="${res.gender == 1 ? 'boy' : 'girl'}" style="display:${res.nick == '虚位以待' ? 'none' : 'inline-block'};"><img src="./images/${res.gender == 1 ? 'boy' : 'girl'}.png" alt=""></span>`);
$(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon .icon1`).attr('src', res.experUrl); $(`.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', res.charmUrl); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`);
if (res.inMic) { if (res.inMic) {
$(`.lastTopThree .lastTopThree_in .box .no${i + 1} .svga`).show(); $(`.lastTopThree .lastTopThree_in .box .no${i + 1} .svga`).show();
} else { } else {
@@ -231,8 +247,8 @@ function clanListRank () {
$(`.header .topBox .no${i + 1} .tx`).attr('src', res.avatar); $(`.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} .icon_gh`).attr('src', res.levelIcon);
$(`.header .topBox .no${i + 1} p`).html(`${res.name.length > 6 ? `${res.name.slice(0, 6)}...` : res.name}<span class="${res.gender == 1 ? 'boy' : 'girl'}"><img src="./images/${res.gender == 1 ? 'boy' : 'girl'}.png" alt=""></span>`); $(`.header .topBox .no${i + 1} p`).html(`${res.name.length > 6 ? `${res.name.slice(0, 6)}...` : res.name}<span class="${res.gender == 1 ? 'boy' : 'girl'}"><img src="./images/${res.gender == 1 ? 'boy' : 'girl'}.png" alt=""></span>`);
$(`.header .topBox .no${i + 1} .icon .icon1`).attr('src', res.experUrl); $(`.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', res.charmUrl); $(`.header .topBox .no${i + 1} .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`);
if (i >= 1) { if (i >= 1) {
$(`.header .topBox .no${i + 1} i`).text(`距上一名${unitProcessing((top3[i - 1].totalNum - res.totalNum), 10000, 1, 'W')}`); $(`.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 inRoomUid = $(this).attr('inRoomUid');
var inMic = $(this).attr('inMic'); var inMic = $(this).attr('inMic');
if (listType == 4) { if (listType == 4) {
console.log('工会');
return 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) { if (browser.ios) {
window.webkit.messageHandlers.openRoom.postMessage(inRoomUid); window.webkit.messageHandlers.openRoom.postMessage(inRoomUid);
} else if (browser.android) { } else if (browser.android) {