修复小时榜bug

This commit is contained in:
Dragon
2023-12-29 14:07:48 +08:00
parent 2763db5bcc
commit eaacb264e2
3 changed files with 35 additions and 4 deletions

View File

@@ -2850,6 +2850,7 @@ body {
position: absolute;
left: 1.61333rem;
top: 0.09333rem;
z-index: 2;
}
.page3_pop .page3_pop_in ul li .tx {

View File

@@ -2859,6 +2859,7 @@ body {
position: absolute;
left: px2rem(121);
top: px2rem(7);
z-index: 2;
}
.tx {

View File

@@ -951,10 +951,11 @@ function getHourRank () {
hideLoading(layerIndex)
}
// 渲染上期小时榜榜首
if (res.data.nick) {
$('.page3_pop .page3_pop_in .lastTop3 .tx').attr('src', res.data.avatar);
$('.page3_pop .page3_pop_in .lastTop3 p').text(res.data.nick);
$('.page3_pop .page3_pop_in .lastTop3 .right img').attr('src', res.data.assistance.avatar);
if (res.data.lastTopOne) {
$('.page3_pop .page3_pop_in .lastTop3 .tx').attr('src', res.data.lastTopOne.avatar);
$('.page3_pop .page3_pop_in .lastTop3 .ts').attr('uid', res.data.lastTopOne.uid);
$('.page3_pop .page3_pop_in .lastTop3 p').text(res.data.lastTopOne.nick);
$('.page3_pop .page3_pop_in .lastTop3 .right img').attr('src', res.data.lastTopOne.assistance.avatar);
} else {
$('.page3_pop .page3_po p_in .lastTop3 .tx').attr('src', './images/logo.png');
$('.page3_pop .page3_pop_in .lastTop3 p').text('虚位以待');
@@ -1023,6 +1024,34 @@ function hourCountup (leftTime) {
hourCountup(leftTime)
}, 1000);
}
$('.page3_pop .page3_pop_in .lastTop3 .ts').click(function(){
var uid = $(this).attr('uid');
// 跳转个人资料页
if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(uid);
}
} else {
console.log('web');
}
return false;
})
$('.page3_pop .page3_pop_in ul').on('click', ' li .ts', function () {
var uid = $(this).attr('uid');
// 跳转个人资料页
if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(uid);
}
} else {
console.log('web');
}
return false;
})
// 关闭页面3弹窗
$('.page3_pop').click(function () {
$('.page3_pop').hide();