完善寻宝活动
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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%;
|
||||
}
|
||||
|
@@ -116,33 +116,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="gift_box">
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -166,37 +139,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="points_btn">
|
||||
<span class="Points"></span>:11.11k
|
||||
<span class="Points"></span>:<span class="score"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gift_box">
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/logo.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -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 = `
|
||||
<div class="my_container_in">
|
||||
<img src="${item.avatar}" alt="" class="tx">
|
||||
<span>${item.bless}</span>
|
||||
<img src="${item.avatar}" alt="" class="tx">
|
||||
<img src="${item.user.avatar}" alt="" class="tx">
|
||||
<span>${item.user.nick} </span>
|
||||
<span>${langReplace(localLang.demoModule.Won)}</span>
|
||||
<img src="${item.type == 8 ? './images/coins.png' : item.icon}" alt="" class="tx">
|
||||
|
||||
</div>`
|
||||
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 += `
|
||||
<div class="${index>2?'box_si':'box'}">
|
||||
<img src="${itemTwo.icon}" alt="">
|
||||
</div>
|
||||
`
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
str += `
|
||||
<div class="rank_box" style="${index > 2 ? 'background-image:url(./images/housi_bg.png)' : 'background-image:url(./images/qiansan_bg.png)'}">
|
||||
<div class="info">
|
||||
@@ -215,10 +234,32 @@ function getlistRank() {
|
||||
<span class="Points">${langReplace(localLang.demoModule.Behind)}</span>:${unitProcessingAr(item.beHideScore, 2)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gift_box">
|
||||
${giftStr}
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
$('.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 += `
|
||||
<div class="box">
|
||||
<img src="${item.icon}" alt="">
|
||||
</div>
|
||||
`
|
||||
})
|
||||
$('.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) {
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
// updateProgress(item.process,item.need)
|
||||
})
|
||||
$('.task_list .wrap').append(taskStr)
|
||||
// 再次遍历,单独更新每个进度条
|
||||
@@ -307,7 +360,7 @@ function renderinglistScoreRecord() {
|
||||
<div class="detail_box">
|
||||
<div class="Kimlik" style="display:${item.type == 2 ? 'block' : 'none'}">${langReplace(localLang.demoModule.Points)}+30%</div>
|
||||
<div class="left">
|
||||
<div class="title_desc"></div>
|
||||
<div class="title_desc">${item.desc}</div>
|
||||
<div class="time">${item.createTime}</div>
|
||||
</div>
|
||||
<div class="right"> <span class="Points">${langReplace(localLang.demoModule.Points)}</span>+${item.score}</div>
|
||||
@@ -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 += `
|
||||
<div class="gift_box">
|
||||
<div class="img_box">
|
||||
<img src="${item.type == 8 ? './images/coins.png' : item.pic}" alt="">
|
||||
</div>
|
||||
<div class="gift_name">${typeFanyi(item.type)}*${item.num} ${item.type == 8 ? '<img src="./images/coins.png" alt="">' : langReplace(localLang.demoModule.Days)} </div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
$('.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 += `
|
||||
<div class="detail_box">
|
||||
<div class="left">
|
||||
<img src="./images/logo.png" alt="">
|
||||
<img src="${item.icon}" alt="">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="title_desc">First recharge per week</div>
|
||||
<div class="time">2025-01-01 00:00:00</div>
|
||||
<div class="title_desc">${typeFanyi(item.type)}*${item.num} ${item.type == 8 ? '<img src="./images/coins.png" alt="">' : langReplace(localLang.demoModule.Days)} </div>
|
||||
<div class="time">${item.createTime}</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
// $('.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))
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
}
|
@@ -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'
|
||||
}
|
||||
|
||||
}
|
@@ -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'
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user