From 72e189be5f73dfee913c51753f3f64278fc2c9f5 Mon Sep 17 00:00:00 2001 From: qiaofie Date: Thu, 6 Mar 2025 18:59:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=B8=B8=E6=88=8F=EF=BC=9A=E9=A2=86?= =?UTF-8?q?=E5=8F=96=E7=8A=B6=E6=80=81=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity/gameChallenge/css/index.css | 2 + .../activity/gameChallenge/css/index.scss | 2 + .../activity/gameChallenge/js/index.js | 55 ++++--------------- 3 files changed, 16 insertions(+), 43 deletions(-) diff --git a/view/molistar/activity/gameChallenge/css/index.css b/view/molistar/activity/gameChallenge/css/index.css index 080cfb1a..ffb98b88 100644 --- a/view/molistar/activity/gameChallenge/css/index.css +++ b/view/molistar/activity/gameChallenge/css/index.css @@ -54,6 +54,7 @@ body { position: absolute; bottom: 1.1733333333rem; right: 0; + display: none; } .header .receive { width: 2.5333333333rem; @@ -67,6 +68,7 @@ body { position: absolute; bottom: 0.96rem; right: 0.2rem; + display: none; } .header .done { background: url(../images/done.png) no-repeat center/100% 100%; diff --git a/view/molistar/activity/gameChallenge/css/index.scss b/view/molistar/activity/gameChallenge/css/index.scss index 0bdbf7cc..6ad13789 100644 --- a/view/molistar/activity/gameChallenge/css/index.scss +++ b/view/molistar/activity/gameChallenge/css/index.scss @@ -60,6 +60,7 @@ body { position: absolute; bottom: px2rem(88); right: 0; + display: none; } .receive { @@ -74,6 +75,7 @@ body { position: absolute; bottom: px2rem(72); right: px2rem(15); + display: none; } .done { diff --git a/view/molistar/activity/gameChallenge/js/index.js b/view/molistar/activity/gameChallenge/js/index.js index bd50ed40..3f215508 100644 --- a/view/molistar/activity/gameChallenge/js/index.js +++ b/view/molistar/activity/gameChallenge/js/index.js @@ -99,7 +99,7 @@ function translateFun() { } } -var jackpotNum = null // 可领取奖金 +var jackpotNum = null // 可领取奖金 0不能领取 大于0可领取 小于0已领取 var jackpotPool = 0 //奖池金币数 var countdownSecond = 0 //本周倒计时秒数 function getInit() { @@ -114,13 +114,17 @@ function getInit() { countTime(); // 处理奖金 jackpotNum = res.data.jackpot || 0; - $('.coins_pop .text b').html(jackpotNum.toLocaleString()); - if (jackpotNum == 0) { + $('.coins_pop .text b').html(Math.abs(jackpotNum).toLocaleString()); + if (jackpotNum <= 0) { $('.header .receive').html(langReplace(localLang.demoModule.done)); $('.header .receive').addClass('done'); $('.coins_pop .btn').html(langReplace(localLang.demoModule.done)); $('.coins_pop .btn').addClass('done'); } + if(jackpotNum !== 0) { + $('.header .coin_bg').show() + $('.header .receive').show() + } jackpotPool = res.data.jackpotPool.toLocaleString(); $(window).scroll(function () { if (($("#dataNums").offset().top - $(window).scrollTop()) < $(window).height()) { @@ -170,7 +174,7 @@ function getInit() { if (my.vipLevel == 0) { $('.page1 .my .icon').hide(); } - + } else { toastMsg(res.message) } @@ -334,44 +338,6 @@ var hisRank = [ } ]; -function render() { - hisRank.forEach(function (item) { - var historyHtml = ` -
-
- - ${item.startDate} - ${item.endDate} - -
- -
- `; - - // 添加到容器 - $(".page2 .content .box").append(historyHtml); - }); -} - // 领取金币 function getJackpot() { showLoading() @@ -380,6 +346,8 @@ function getJackpot() { url: urlPrefix + '/miniGame/weekJackpotRank/getJackpot', success(res) { if (res.code === 200) { + $('.header .receive').html(langReplace(localLang.demoModule.done)); + $('.header .receive').addClass('done'); $('.coins_pop .btn').html(langReplace(localLang.demoModule.done)); $('.coins_pop .btn').addClass('done'); $(`.coins_pop .fadein`).show() @@ -387,7 +355,7 @@ function getJackpot() { setTimeout(() => { svgaFun() }, 1000); - jackpotNum = 0 + jackpotNum = -Math.abs(jackpotNum) } else { toastMsg(res.message) } @@ -435,6 +403,7 @@ $(".coins_pop .close").click(function () { $(".header .receive").click(function () { bodyScroolFun(false); $('.coins_pop').show(); + }) $(".coins_pop .btn").click(function () { if (jackpotNum != 0) {