房间榜单跳转信息页
This commit is contained in:
@@ -160,7 +160,7 @@ function listDomFun (res, num) {
|
||||
$(`.largestBox .top3 .no${i + 1} .box .icon`).show();
|
||||
}
|
||||
$(`.largestBox .top3 .no${i + 1} .box .tx`).attr('src', res.avatar);
|
||||
$(`.largestBox .top3 .no${i + 1} .box .ts`).attr('roomUid', res.roomUid);
|
||||
$(`.largestBox .top3 .no${i + 1} .box .ts`).attr('uid', res.uid);
|
||||
$(`.largestBox .top3 .no${i + 1} .box p .sp1`).text(res.nick.length > 6 ? res.nick.slice(0, 6) + '...' : res.nick);
|
||||
$(`.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'}`);
|
||||
@@ -176,7 +176,7 @@ function listDomFun (res, num) {
|
||||
str += `
|
||||
<li>
|
||||
<div class="num">${i + 4}</div>
|
||||
<img src="${res.avatar}" roomUid=${res.roomUid} alt="" class="tx">
|
||||
<img src="${res.avatar}" uid=${res.uid} alt="" class="tx">
|
||||
<div class="userInfo">
|
||||
<p>${res.nick}</p>
|
||||
<img src="${experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`}" alt="" class="icon1">
|
||||
@@ -193,23 +193,23 @@ function listDomFun (res, num) {
|
||||
}
|
||||
// 点击前三跳转房间
|
||||
$('.largestBox').on('click', '.top3 .no .box .ts', function () {
|
||||
var roomUid = $(this).attr('roomUid');
|
||||
var uid = $(this).attr('uid');
|
||||
if (browser.ios) {
|
||||
window.webkit.messageHandlers.openRoom.postMessage(roomUid);
|
||||
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
|
||||
} else if (browser.android) {
|
||||
if (androidJsObj && typeof androidJsObj === 'object') {
|
||||
window.androidJsObj.openRoom(roomUid);
|
||||
window.androidJsObj.openPersonPage(uid);
|
||||
}
|
||||
}
|
||||
})
|
||||
// 点击非前三跳转房间
|
||||
$('.largestBox').on('click', 'ul li .tx', function () {
|
||||
var roomUid = $(this).attr('roomUid');
|
||||
var uid = $(this).attr('uid');
|
||||
if (browser.ios) {
|
||||
window.webkit.messageHandlers.openRoom.postMessage(roomUid);
|
||||
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
|
||||
} else if (browser.android) {
|
||||
if (androidJsObj && typeof androidJsObj === 'object') {
|
||||
window.androidJsObj.openRoom(roomUid);
|
||||
window.androidJsObj.openPersonPage(uid);
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user