修复bug

This commit is contained in:
dragon
2024-05-27 19:46:36 +08:00
parent 9ee240c85f
commit f9acf867db
6 changed files with 56 additions and 24 deletions

View File

@@ -333,8 +333,6 @@ body {
}
.game .result .giftBoxs img {
width: 1.6rem;
height: 1.6rem;
position: absolute;
left: 50%;
top: 50%;
@@ -438,8 +436,6 @@ body {
}
.game .result2 .giftBoxs img {
width: 1.6rem;
height: 1.6rem;
position: absolute;
left: 50%;
top: 50%;
@@ -911,6 +907,7 @@ body {
width: 4.8rem;
height: 3.7rem;
margin: 0 auto;
overflow-y: scroll;
}
.records_pub .records_pub_in ul::-webkit-scrollbar {

View File

@@ -335,8 +335,8 @@ body {
background-size: 100% 100%;
img {
width: px2rem(120);
height: px2rem(120);
// width: px2rem(120);
// height: px2rem(120);
position: absolute;
left: 50%;
top: 50%;
@@ -440,8 +440,8 @@ body {
background-size: 100% 100%;
img {
width: px2rem(120);
height: px2rem(120);
// width: px2rem(120);
// height: px2rem(120);
position: absolute;
left: 50%;
top: 50%;
@@ -914,6 +914,7 @@ body {
width: px2rem(360);
height: 3.7rem;
margin: 0 auto;
overflow-y: scroll;
&::-webkit-scrollbar {
display: none;
@@ -948,9 +949,8 @@ body {
}
}
}
.null{
}
.null {}
}
}
}
@@ -1010,11 +1010,13 @@ body {
&::-webkit-scrollbar {
display: none;
}
img{
img {
display: block;
width: 100%;
}
.img2{
.img2 {
display: none;
width: 100%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -87,7 +87,7 @@
<div class="giftBoxs">
<img src="./images/logo.png" alt="" class="giftImg">
</div>
<img src="./images/view.png" alt="" class="view">
<img src="./images/view3.png" alt="" class="view">
<img src="./images/playAgain.png" alt="" class="playAgain">
</div>
</div>

View File

@@ -32,6 +32,7 @@ var page = 1;
var isLock = true;
var magnifyingGlass = 0;
var listType = 1;
var gameType = true;
// 初始化函數
$(function () {
getInfoFromClient();
@@ -151,13 +152,13 @@ function listFun(type) {
// 處理前三
listTo3.forEach((res, i) => {
if (res.score > 10000) {
res.score = ((Math.floor(res.score / 1000)) / 10).toFixed(1) + 'W'
res.score = ((Math.floor(res.totalNum / 1000)) / 10).toFixed(1) + 'W'
}
$(`.list_pub .list_pub_in .top${i + 1} .tx`).attr("src", res.avatar);
$(`.list_pub .list_pub_in .top${i + 1} .name`).text(res.nick);
$(`.list_pub .list_pub_in .top${i + 1} .score`).text('搜捕值:' + res.score);
$(`.list_pub .list_pub_in .top${i + 1} .score`).text('搜捕值:' + res.totalNum);
});
notListTo3.forEach(res => {
notListTo3.forEach((res, i) => {
if (res.score > 10000) {
res.score = ((Math.floor(res.score / 1000)) / 10).toFixed(1) + 'W'
}
@@ -166,7 +167,7 @@ function listFun(type) {
<div class="num">${i + 4 > 30 ? '30+' : i + 4}</div>
<img src="${res.avatar}" alt="" class="tx">
<div class="name">${res.nick}</div>
<div class="score">搜捕值:${res.score}</div>
<div class="score">搜捕值:${res.totalNum}</div>
</li>
`
})
@@ -258,16 +259,16 @@ function getTask() {
res.data.isLoginTask ? $('.toast_pub .toast_pub_in .toasts1 .but').text('已完成') : $('.toast_pub .toast_pub_in .toasts1 .but').text('未完成');
$('.toast_pub .toast_pub_in .toasts2 p').text(`關註一位新的好友(${res.data.userFollowCount}/3)`);
res.data.isUserFollowTask ? $('.toast_pub .toast_pub_in .toasts2 .but').addClass('act') : $('.toast_pub .toast_pub_in .toasts2 .but').removeClass('act');
res.data.isLoginTask ? $('.toast_pub .toast_pub_in .toasts2 .but').text('已完成') : $('.toast_pub .toast_pub_in .toasts2 .but').text('未完成');
$('.toast_pub .toast_pub_in .toasts3 p').text(`房間停留10mins~(${res.data.keepTimeCount}/10)`);
res.data.isUserFollowTask ? $('.toast_pub .toast_pub_in .toasts2 .but').text('已完成') : $('.toast_pub .toast_pub_in .toasts2 .but').text('未完成');
$('.toast_pub .toast_pub_in .toasts3 p').text(`房間停留10mins~(${res.data.keepTimeCount}/3)`);
res.data.isKeepTimeTask ? $('.toast_pub .toast_pub_in .toasts3 .but').addClass('act') : $('.toast_pub .toast_pub_in .toasts3 .but').removeClass('act');
res.data.isLoginTask ? $('.toast_pub .toast_pub_in .toasts3 .but').text('已完成') : $('.toast_pub .toast_pub_in .toasts3 .but').text('未完成');
res.data.isKeepTimeTask ? $('.toast_pub .toast_pub_in .toasts3 .but').text('已完成') : $('.toast_pub .toast_pub_in .toasts3 .but').text('未完成');
$('.toast_pub .toast_pub_in .toasts4 i').text(`今日已獲得:${res.data.limitGiftCount}`);
res.data.isLimitGiftFor61Task ? $('.toast_pub .toast_pub_in .toasts4 .but').addClass('act') : $('.toast_pub .toast_pub_in .toasts4 .but').removeClass('act');
res.data.isLoginTask ? $('.toast_pub .toast_pub_in .toasts4 .but').text('已完成') : $('.toast_pub .toast_pub_in .toasts4 .but').text('未完成');
res.data.isLimitGiftFor61Task ? $('.toast_pub .toast_pub_in .toasts4 .but').text('已完成') : $('.toast_pub .toast_pub_in .toasts4 .but').text('未完成');
$('.toast_pub .toast_pub_in .toasts5 i').text(`今日已獲得:${res.data.joinGreedyFor1000Count}`);
res.data.isJoinGreedyFor1000Task ? $('.toast_pub .toast_pub_in .toasts5 .but').addClass('act') : $('.toast_pub .toast_pub_in .toasts5 .but').removeClass('act');
res.data.isLoginTask ? $('.toast_pub .toast_pub_in .toasts5 .but').text('已完成') : $('.toast_pub .toast_pub_in .toasts5 .but').text('未完成');
res.data.isJoinGreedyFor1000Task ? $('.toast_pub .toast_pub_in .toasts5 .but').text('已完成') : $('.toast_pub .toast_pub_in .toasts5 .but').text('未完成');
$('.toast_pub').show();
bodyScroolFun(true);
} else {
@@ -287,7 +288,33 @@ $('.toast_pub .toast_pub_in .close').click(function () {
bodyScroolFun(false);
})
// 關閉結果彈窗
$('.game .result .view,.game .result2 .view').click(function () {
$('.game .result .view').click(function () {
$('.result,.result2').hide();
var roomUid = $(this).attr('uid');
if (gameType) {
// 跳转房间
if (browser.ios) {
window.webkit.messageHandlers.openRoom.postMessage(roomUid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openRoom(roomUid);
}
}
}
// 打开主页
if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(roomUid);
setTimeout(function () { lock = true; }, 200)
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(roomUid);
}
}
})
$('.game .result2 .view').click(function () {
$('.result,.result2').hide();
})
$('.game .result,.game .result2').click(function(){
$('.result,.result2').hide();
})
// 關閉記錄彈窗
@@ -327,7 +354,8 @@ function record(page) {
str += `<li class="null"><div>暫無</div><div>暫無</div></li>`
isLock = false;
} else {
str += `
res.data.records.forEach(res => {
str += `
<li>
<div>
<p>${dateFormat(res.createTime, 'yyyy/MM/dd')}</p>
@@ -338,6 +366,7 @@ function record(page) {
<i>${res.rewardNum}${rewardTypeFun(res.rewardType).unit}</i>
</div>
</li>`
})
if (res.data.records.length == 0) {
isLock = false;
} else {
@@ -387,6 +416,7 @@ $('.records_pub').click(function () {
})
// 逮捕按鈕
$('.game .buts,.game .but,.game .result .playAgain,.game .result2 .playAgain').click(function () {
$('.game .result2,.game .result1').hide();
draw();
})
// 活動信息接口
@@ -402,6 +432,9 @@ function draw() {
$('.game .result .tx_left').attr('src', res.data.avatar);
$('.game .result .tx_right').attr('src', res.data.anchorAvatar);
$('.game .result .tx_right').attr('uid', res.data.anchorRoomUid);
$('.game .result .view').attr('uid', res.data.anchorRoomUid);
gameType = res.data.isOnline;
gameType ? $('.game .result .view').attr('src', './images/view2.png') : $('.game .result .view').attr('src', './images/view.png');
$('.game .result .name_left').text('我');
$('.game .result .name_Right').text(res.data.anchorNick);
$('.game .result .id_right').text("ID:" + res.data.anchorErBanNo);