diff --git a/view/molistar/activity/adventureTreasureHunt/css/index.css b/view/molistar/activity/adventureTreasureHunt/css/index.css index bbb0fcc4..d75fe2ee 100644 --- a/view/molistar/activity/adventureTreasureHunt/css/index.css +++ b/view/molistar/activity/adventureTreasureHunt/css/index.css @@ -114,6 +114,7 @@ body { width: 0.5866666667rem; height: 0.5866666667rem; margin-top: 0.0293333333rem; + padding-bottom: 0.08rem; border-radius: 50%; } .header .danmu #my_container .my_container_in span { @@ -521,9 +522,25 @@ body { .adventureRanking .content .rank_list .rank_box .gift_box::-webkit-scrollbar { display: none; } +.adventureRanking .content .rank_list .rank_box .gift_box .box { + background: linear-gradient(180deg, #714A00, #221A00); + border-radius: 0.1733333333rem; + border: 0.0266666667rem solid #FFFFFF; + padding: 0.08rem; +} .adventureRanking .content .rank_list .rank_box .gift_box .box img { - width: 1.2rem; - height: 1.2rem; + width: 1.0266666667rem; + height: 1.0266666667rem; +} +.adventureRanking .content .rank_list .rank_box .gift_box .box_si { + background: linear-gradient(180deg, #8D0732, #3D0012); + border-radius: 0.1733333333rem; + border: 0.0266666667rem solid #FFBC1B; + padding: 0.08rem; +} +.adventureRanking .content .rank_list .rank_box .gift_box .box_si img { + width: 1.0266666667rem; + height: 1.0266666667rem; } .adventureRanking .bottom { background-image: url("../images/content_bottom.png"); @@ -744,6 +761,11 @@ body { font-size: 0.3733333333rem; color: #FFFCD0; } +.popup_record .popup_content .detail_list .detail_box .right .title_desc img { + width: 0.36rem; + height: 0.36rem; + margin: 0 0.08rem; +} .popup_record .popup_content .detail_list .detail_box .right .time { font-family: PingFang SC; font-weight: 400; @@ -920,6 +942,16 @@ body { color: #FFFCD0; text-align: center; margin-top: 0.2666666667rem; + width: 2.6666666667rem; + height: 0.4533333333rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.popup_treasure .popup_content .gift_list .gift_box .gift_name img { + width: 0.3733333333rem; + height: 0.3733333333rem; + margin: 0 0.08rem; } .popup_treasure .popup_content .close_btn { position: absolute; @@ -1009,9 +1041,15 @@ body { .my_Points .gift_box::-webkit-scrollbar { display: none; } +.my_Points .gift_box .box { + background: linear-gradient(180deg, #8D0732, #3D0012); + border-radius: 0.1733333333rem; + border: 0.0266666667rem solid #FFBC1B; + padding: 0.08rem; +} .my_Points .gift_box .box img { - width: 1.2rem; - height: 1.2rem; + width: 1.0266666667rem; + height: 1.0266666667rem; } .bottom_height { diff --git a/view/molistar/activity/adventureTreasureHunt/css/index.scss b/view/molistar/activity/adventureTreasureHunt/css/index.scss index 85547dee..3724074b 100644 --- a/view/molistar/activity/adventureTreasureHunt/css/index.scss +++ b/view/molistar/activity/adventureTreasureHunt/css/index.scss @@ -135,6 +135,7 @@ body { width: px2rem(44); height: px2rem(44); margin-top: px2rem(2.2); + padding-bottom: px2rem(6); // margin-right: px2rem(5); border-radius: 50%; } @@ -301,7 +302,7 @@ body { } .data_box { - margin:0 px2rem(18); + margin: 0 px2rem(18); .txt { font-family: PingFang SC; @@ -613,9 +614,23 @@ body { } .box { + background: linear-gradient(180deg, #714A00, #221A00); +border-radius: px2rem(13); +border: px2rem(2) solid #FFFFFF; +padding: px2rem(6); img { - width: px2rem(90); - height: px2rem(90); + width: px2rem(77); + height: px2rem(77); + } + } + .box_si{ + background: linear-gradient(180deg, #8D0732, #3D0012); +border-radius: px2rem(13); +border: px2rem(2) solid #FFBC1B; +padding: px2rem(6); + img { + width: px2rem(77); + height: px2rem(77); } } } @@ -865,6 +880,12 @@ body { font-weight: 400; font-size: px2rem(28); color: #FFFCD0; + + img{ + width: px2rem(27); + height: px2rem(27); + margin: 0 px2rem(6); + } } .time { @@ -1067,6 +1088,18 @@ body { color: #FFFCD0; text-align: center; margin-top: px2rem(20); + width: px2rem(200); + height: px2rem(34); + // 添加下面这三行即可 + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + img { + width: px2rem(28); + height: px2rem(28); + margin: 0 px2rem(6); + } } } } @@ -1177,9 +1210,13 @@ body { } .box { + background: linear-gradient(180deg, #8D0732, #3D0012); +border-radius: px2rem(13); +border: px2rem(2) solid #FFBC1B; +padding: px2rem(6); img { - width: px2rem(90); - height: px2rem(90); + width: px2rem(77); + height: px2rem(77); } } } @@ -1192,26 +1229,31 @@ body { display: none; } -.arabic{ - .adventureTask .content .task_list .wrap .wrap_box .right{ +.arabic { + .adventureTask .content .task_list .wrap .wrap_box .right { margin-left: 0; margin-right: px2rem(20); } - .adventureTask .content .task_list .wrap .wrap_box .left .title{ + + .adventureTask .content .task_list .wrap .wrap_box .left .title { text-align: right; } - .adventureRanking .content .rank_list .rank_box .info .points_btn{ + + .adventureRanking .content .rank_list .rank_box .info .points_btn { margin-right: auto; margin-left: 0; } - .my_Points .info .points_btn{ + + .my_Points .info .points_btn { margin-right: auto; margin-left: 0; } - .adventureTask .content .tip_box .txt img{ + + .adventureTask .content .tip_box .txt img { transform: rotate(180deg); } - .header{ + + .header { background: url(../images/header-ar.png) no-repeat; background-size: 100% 100%; } diff --git a/view/molistar/activity/adventureTreasureHunt/index.html b/view/molistar/activity/adventureTreasureHunt/index.html index bcd21f6e..5859976b 100644 --- a/view/molistar/activity/adventureTreasureHunt/index.html +++ b/view/molistar/activity/adventureTreasureHunt/index.html @@ -116,33 +116,6 @@
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
@@ -166,37 +139,10 @@
- :11.11k + :
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
diff --git a/view/molistar/activity/adventureTreasureHunt/js/index.js b/view/molistar/activity/adventureTreasureHunt/js/index.js index e46232b7..18607c5d 100644 --- a/view/molistar/activity/adventureTreasureHunt/js/index.js +++ b/view/molistar/activity/adventureTreasureHunt/js/index.js @@ -53,6 +53,11 @@ const setDanmuData = () => { timer2 = setInterval(() => { if (!danmu.length) { danmu = [...damuPool] + // // 弹幕已经播放完毕,清除定时器 + // clearInterval(timer2); + // timer2 = null; + // console.log('弹幕已播放完毕'); + // return; } let danmushoot = danmu.shift(); if (danmushoot) { @@ -69,9 +74,10 @@ const renderDM = (item) => { var $div = document.createElement('div'); $div.innerHTML = `
- - ${item.bless} - + + ${item.user.nick} + ${langReplace(localLang.demoModule.Won)} +
` return $div; @@ -109,8 +115,8 @@ $(function () { fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言 langReplace = window.lang.replace; localLang = window.lang; + initDanmu(); translateFun(); - // initDanmu(); // blessGetConfig(); // questionConfig(); getData(); @@ -196,7 +202,20 @@ function getlistRank() { if (res.code === 200) { $('.adventureRanking .content .rank_list .rank_box').remove() let str = '' - res.data.forEach((item, index) => { + res.data.rankList.forEach((item, index) => { + // 拼接礼物列表 + let giftStr = '' + if (item.recordList && item.recordList.length > 0) { + item.recordList.forEach((itemTwo, indexTwo) => { + giftStr += ` +
+ +
+ ` + }) + } + + str += `
@@ -215,10 +234,32 @@ function getlistRank() { ${langReplace(localLang.demoModule.Behind)}:${unitProcessingAr(item.beHideScore, 2)}
- +
+ ${giftStr} +
+ ` }) $('.adventureRanking .content .rank_list').append(str) + + // 我的排行 + $('.my_Points .info .rank').text(res.data.meRank.ranking) + $('.my_Points .info .user .avatar .touxiang').attr('src', res.data.meRank.avatar) + $('.my_Points .info .user .name .nick').text(res.data.meRank.nick) + $('.my_Points .info .user .name .id').text(`ID:${res.data.meRank.erbanNo}`) + $('.my_Points .info .points_btn .score').text(unitProcessingAr(res.data.meRank.score, 2)) + $('.my_Points .gift_box .box').remove() + if (res.data.meRank.recordList && res.data.meRank.recordList.length > 0) { + let my_giftstr = '' + res.data.meRank.recordList.forEach((item, index) => { + my_giftstr += ` +
+ +
+ ` + }) + $('.my_Points .gift_box').append(my_giftstr) + } } else { toastMsg(res.message) } @@ -241,16 +282,21 @@ function getData() { if (res.data.countDownSecond > 0) { countup(res.data.countDownSecond); } + if(res.data.isRechargeUser){ + $('.header .Record').hide(); + $('.header .Lottery_button').hide() + $('.tab_list').hide(); + $('.adventureTask').hide() + } $('.Today_num').text(res.data.todayChargeGoldNum) $('.Weekly_num').text(res.data.weekChargeGoldNum) $('.adventureTask .content .recharge .avatar').attr('src', res.data.user.avatar) $('.weekScore').text(res.data.weekScore) - renderingTask(res.data.taskList) + // 开启弹幕 damuPool = res.data.popUpList; - initDanmu(); - + replayDanmu() } else { toastMsg(res.message) } @@ -262,8 +308,16 @@ function getData() { } }) } +// 重新开启弹幕 +function replayDanmu() { + clearInterval(timer2); // 先清理之前的定时器 + timer2 = null; + danmu = [...damuPool]; // 重新加载弹幕池 + setDanmuData(); // 启动播放 +} // 渲染任务列表 function renderingTask(data) { + $('.task_list .wrap .wrap_box').remove(); let taskStr = '' data.forEach((item, index) => { taskStr += ` @@ -281,7 +335,6 @@ function renderingTask(data) { ` - // updateProgress(item.process,item.need) }) $('.task_list .wrap').append(taskStr) // 再次遍历,单独更新每个进度条 @@ -307,7 +360,7 @@ function renderinglistScoreRecord() {
${langReplace(localLang.demoModule.Points)}+30%
-
+
${item.desc}
${item.createTime}
${langReplace(localLang.demoModule.Points)}+${item.score}
@@ -338,9 +391,21 @@ function treasureHunt(batch) { success(res) { if (res.code === 200) { let str = '' - res.data.forEach((item,index)=>{ - + $('.popup_treasure .gift_list .gift_box').remove() + res.data.forEach((item, index) => { + str += ` +
+
+ +
+
${typeFanyi(item.type)}*${item.num} ${item.type == 8 ? '' : langReplace(localLang.demoModule.Days)}
+
+ ` }) + $('.popup_treasure .gift_list').append(str) + $('.popup_treasure').show() + getData(); + // setDanmuData(); } else { toastMsg(res.message) } @@ -352,6 +417,32 @@ function treasureHunt(batch) { } }) } +function typeFanyi(type) { + switch (type) { + case 1: + return langReplace(localLang.demoModule.Headdress) + case 2: + return langReplace(localLang.demoModule.Nameplate) + case 3: + return langReplace(localLang.demoModule.Bubble) + case 4: + return langReplace(localLang.demoModule.Infocard) + case 5: + return langReplace(localLang.demoModule.Vehicle) + case 6: + return langReplace(localLang.demoModule.Gifts) + case 8: + return langReplace(localLang.demoModule.Coin) + case 9: + return langReplace(localLang.demoModule.Diamonds) + case 10: + return 'VIP' + case 11: + return langReplace(localLang.demoModule.Medal) + case 12: + return langReplace(localLang.demoModule.HomepageBackground) + } +} // 我的中奖记录 function renderinglistDrawRecord(lastWeek) { showLoading() @@ -369,16 +460,16 @@ function renderinglistDrawRecord(lastWeek) { str += `
- +
-
First recharge per week
-
2025-01-01 00:00:00
+
${typeFanyi(item.type)}*${item.num} ${item.type == 8 ? '' : langReplace(localLang.demoModule.Days)}
+
${item.createTime}
` }) - // $('.popup_record .popup_content .detail_list').append(str) + $('.popup_record .popup_content .detail_list').append(str) } else { toastMsg(res.message) } @@ -445,11 +536,6 @@ function countup(leftTime) { s = getzf(Math.floor(leftTime % 60)); // console.log(d, h, m, s); $('.Reset_time').html(langReplace(localLang.demoModule.Reset_time(d, h + ':' + m + ':' + s))); - //將倒計時賦值到div中 - // $('.timeBox .days span').text(d); - // $('.timeBox .hours span').text(h); - // $('.timeBox .mins span').text(m); - // $('.timeBox .secs span').text(s); } else { getData(); } @@ -466,26 +552,4 @@ function getzf(num) { num = '0' + num; } return num; -} - -// 弹幕接口 -// function blessGetConfig() { -// showLoading() -// networkRequest({ -// type: 'get', -// url: urlPrefix + '/act/2025Ramadan/bless/getConfig', -// success(res) { -// if (res.code === 200) { -// damuPool = res.data.blessQueue; -// initDanmu(); -// } else { -// toastMsg(res.message) -// } -// hideLoading(layerIndex) -// }, -// error(err) { -// hideLoading(layerIndex) -// toastMsg(langReplace(localLang.demoModule.layerIndex3)) -// } -// }) -// } +} \ No newline at end of file diff --git a/view/molistar/activity/adventureTreasureHunt/local/ar.js b/view/molistar/activity/adventureTreasureHunt/local/ar.js index b418c0ff..d6d33470 100644 --- a/view/molistar/activity/adventureTreasureHunt/local/ar.js +++ b/view/molistar/activity/adventureTreasureHunt/local/ar.js @@ -44,7 +44,17 @@ langAr = { Behind:'خلف', Earn_explore:'اربح نقاطًا بالمشاركة، كنوزٌ تنتظرك لتستكشفها', Join_complete:'.انضم إلى هذه المغامرة المليئة بالمجهول وجمع نقاط المغامرة لكل مهمة تكملها', - + Days:'أيام', + Medal:'ميدالية', + Nameplate:'لوحة اسم', + Vehicle:'مركبة', + Headdress:'غطاء رأس', + Coin:'عملة معدنية', + Bubble:'فقاعة', + Diamonds:'Diamonds', + Gifts:'Gifts', + HomepageBackground:'Homepage Background', + Infocard:'Info card' } } \ No newline at end of file diff --git a/view/molistar/activity/adventureTreasureHunt/local/en.js b/view/molistar/activity/adventureTreasureHunt/local/en.js index c6698044..fcd88b4d 100644 --- a/view/molistar/activity/adventureTreasureHunt/local/en.js +++ b/view/molistar/activity/adventureTreasureHunt/local/en.js @@ -44,5 +44,16 @@ langEn = { Behind:'Behind', Earn_explore:'Earn points by participating, treasures are waiting for you to explore!', Join_complete:'Join this adventure full of unknowns, and accumulate adventure points for each task you complete! ', + Days:'Days', + Medal:'Medal', + Nameplate:'Nameplate', + Vehicle:'Vehicle', + Headdress:'Headdress', + Coin:'Coin', + Bubble:'Bubble', + Diamonds:'Diamonds', + Gifts:'Gifts', + HomepageBackground:'Homepage Background', + Infocard:'Info card' } } \ No newline at end of file