diff --git a/view/molistar/activity/2024-childrenDay/css/index.css b/view/molistar/activity/2024-childrenDay/css/index.css index 1ca3039..33bd628 100644 --- a/view/molistar/activity/2024-childrenDay/css/index.css +++ b/view/molistar/activity/2024-childrenDay/css/index.css @@ -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 { diff --git a/view/molistar/activity/2024-childrenDay/css/index.scss b/view/molistar/activity/2024-childrenDay/css/index.scss index 1cfa628..260966f 100644 --- a/view/molistar/activity/2024-childrenDay/css/index.scss +++ b/view/molistar/activity/2024-childrenDay/css/index.scss @@ -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%; } diff --git a/view/molistar/activity/2024-childrenDay/images/view2.png b/view/molistar/activity/2024-childrenDay/images/view2.png new file mode 100644 index 0000000..3dcd986 Binary files /dev/null and b/view/molistar/activity/2024-childrenDay/images/view2.png differ diff --git a/view/molistar/activity/2024-childrenDay/images/view3.png b/view/molistar/activity/2024-childrenDay/images/view3.png new file mode 100644 index 0000000..5706f14 Binary files /dev/null and b/view/molistar/activity/2024-childrenDay/images/view3.png differ diff --git a/view/molistar/activity/2024-childrenDay/index.html b/view/molistar/activity/2024-childrenDay/index.html index 0af6657..31ca8d8 100644 --- a/view/molistar/activity/2024-childrenDay/index.html +++ b/view/molistar/activity/2024-childrenDay/index.html @@ -87,7 +87,7 @@
- + diff --git a/view/molistar/activity/2024-childrenDay/js/index.js b/view/molistar/activity/2024-childrenDay/js/index.js index 9023ebc..ee531b4 100644 --- a/view/molistar/activity/2024-childrenDay/js/index.js +++ b/view/molistar/activity/2024-childrenDay/js/index.js @@ -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) {
${i + 4 > 30 ? '30+' : i + 4}
${res.nick}
-
搜捕值:${res.score}
+
搜捕值:${res.totalNum}
` }) @@ -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 += `
  • 暫無
    暫無
  • ` isLock = false; } else { - str += ` + res.data.records.forEach(res => { + str += `
  • ${dateFormat(res.createTime, 'yyyy/MM/dd')}

    @@ -338,6 +366,7 @@ function record(page) { ${res.rewardNum}${rewardTypeFun(res.rewardType).unit}
  • ` + }) 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);