修复bug

This commit is contained in:
Dragon
2023-08-15 10:08:47 +08:00
parent f00ef26431
commit b4e5279dd1
22 changed files with 110 additions and 28 deletions

View File

@@ -43,7 +43,7 @@ body {
line-height: 0.6133333333rem;
text-align: center;
position: absolute;
top: 0.8666666667rem;
top: 6rem;
right: 0;
color: #F8F3FC;
font-size: 0.3466666667rem;
@@ -213,6 +213,22 @@ body {
transform: translateX(-50%);
top: 0.2rem;
}
.page1 .magpieBridge .leftRen {
width: 1.2266666667rem;
height: 2.04rem;
position: absolute;
top: 2.0133333333rem;
left: 10%;
z-index: 2;
}
.page1 .magpieBridge .rightRen {
width: 1.2266666667rem;
height: 2.04rem;
position: absolute;
top: 2.0133333333rem;
right: 10%;
z-index: 2;
}
.page1 .magpieBridge .xiques {
width: 8.9066666667rem;
height: 6.5466666667rem;
@@ -220,6 +236,7 @@ body {
left: 50%;
transform: translateX(-50%);
top: 0.2rem;
z-index: 2;
}
.page1 .magpieBridge .xiques .xique {
width: 100%;

View File

@@ -52,7 +52,7 @@ body {
line-height: px2rem(46, );
text-align: center;
position: absolute;
top: px2rem(65, );
top: 6rem;
right: 0;
color: #F8F3FC;
font-size: px2rem(26, );
@@ -245,6 +245,24 @@ body {
top: px2rem(15, );
}
.leftRen {
width: px2rem(92, );
height: px2rem(153, );
position: absolute;
top: px2rem(151, );
left: 10%;
z-index: 2;
}
.rightRen {
width: px2rem(92, );
height: px2rem(153, );
position: absolute;
top: px2rem(151, );
right: 10%;
z-index: 2;
}
.xiques {
width: px2rem(668, );
height: px2rem(491, );
@@ -252,6 +270,7 @@ body {
left: 50%;
transform: translateX(-50%);
top: px2rem(15, );
z-index: 2;
.xique {
width: 100%;

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 KiB

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -49,54 +49,54 @@
<div class="blessingBag_in">
<ul>
<li>
<img src="./images/logo.png" alt="">
<img src="./images/11.png" alt="">
<p>飛上雲霄</p>
<b>177 鉆</b>
</li>
<li>
<img src="./images/logo.png" alt="">
<img src="./images/2.png" alt="">
<p>情意捲軸</p>
<b>377 鉆</b>
</li>
<li>
<img src="./images/logo.png" alt="">
<img src="./images/3.png" alt="">
<p>桃花灼灼</p>
<b>1777 鉆</b>
</li>
<li>
<img src="./images/logo.png" alt="">
<img src="./images/4.png" alt="">
<p>花色漫漫</p>
<b>2777 鉆</b>
</li>
<li>
<img src="./images/logo.png" alt="">
<img src="./images/5.png" alt="">
<p>相思鳥</p>
<b>13140 鉆</b>
</li>
<li>
<img src="./images/logo.png" alt="">
<img src="./images/6.png" alt="">
<p>緣定今生</p>
<b>27777 鉆</b>
</li>
<li>
<img src="./images/logo.png" alt="">
<img src="./images/11.png" alt="">
<p>飛上雲霄</p>
<b>177 鉆</b>
</li>
<li>
<img src="./images/logo.png" alt="">
<img src="./images/2.png" alt="">
<p>情意捲軸</p>
<b>377 鉆</b>
</li>
<li>
<img src="./images/logo.png" alt="">
<img src="./images/3.png" alt="">
<p>桃花灼灼</p>
<b>1777 鉆</b>
</li>
<li>
<img src="./images/logo.png" alt="">
<img src="./images/4.png" alt="">
<p>花色漫漫</p>
<b>2777 鉆</b>
</li>
@@ -105,8 +105,12 @@
</div>
<!-- 鵲橋 -->
<div class="magpieBridge">
<!-- 左边人物 -->
<img src="./images/leftRen.png" alt="" class="leftRen">
<!-- 右边人物 -->
<img src="./images/rightRen.png" alt="" class="rightRen">
<!-- 背景鵲橋圖 -->
<img src="./images/magpieBridgeBg.png" alt="" class="magpieBridgeBg">
<img src="./images/magpieBridgeBg2.png" alt="" class="magpieBridgeBg">
<!-- 喜鵲動效 -->
<div class="xiques">
<div class="xique"></div>
@@ -135,7 +139,7 @@
</div>
<!-- 頭飾框 -->
<div class="ts">
<img src="./images/logo.png" alt="" class="">
<img src="./images/sts.png" alt="" class="">
<b>鵲仙橋頭飾*3天</b>
</div>
</div>
@@ -286,7 +290,7 @@
<div class="rule">活動規則</div>
<!-- 標題 -->
<img src="./images/title.png" alt="" class="title">
<p class="titleText">贈送普通禮物1鉆石=1情緣值七夕限定禮物1鉆石=3情緣值</p>
<p class="titleText">贈送普通禮物10鉆石=1情緣值七夕限定禮物10鉆石=3情緣值</p>
<!-- 前三 -->
<div class="no no1">
<img src="./images/no1.png" alt="" class="txBg">
@@ -432,7 +436,7 @@
<div class="sweet">
<div class="sweet_in">
<div class="box">
<img src="./images/sweet_in.png" alt="">
<img src="./images/sweet_in1.png" alt="">
</div>
</div>
</div>

View File

@@ -40,6 +40,7 @@ var redLineNum = 0;//紅繩數量
var page = 1;//頁碼
var pageSizeLack = true;// 下拉更多鎖
var lack = true;// 抽獎鎖
var timeEndLock = true;
// 初始化函數
$(function () {
setTimeout(function () {
@@ -76,6 +77,11 @@ function getConfig () {
data: {},
success (res) {
if (res.code === 200) {
// 判断活动结束时间
if (res.timestamp > res.data.endTime) {
timeEndLock = false;
$('.endActivity').show();
}
// 處理活動時間
$('.header .titleHeader').text(`活動時間:${dateFormat(res.data.startTime, 'yyyy年MM月dd日')}-${dateFormat(res.data.endTime, 'yyyy年MM月dd日')}`)
// 當前用戶喜鵲
@@ -84,6 +90,28 @@ function getConfig () {
// 處理當前喜鵲進度狀態值
var curXiqueNums = res.data.serverCurXiqueNum / res.data.serverMaxXiqueNum * 100;
$('.page1 .magpieBridge .line .line_in').css('width', curXiqueNums >= 100 ? '100%' : `${curXiqueNums}%`);
if (curXiqueNums < 20) {
$('.page1 .magpieBridge .leftRen').css('left', '10%');
} else if (curXiqueNums >= 20 && curXiqueNums < 40) {
$('.page1 .magpieBridge .leftRen').css('left', '17.5%');
} else if (curXiqueNums >= 40 && curXiqueNums < 60) {
$('.page1 .magpieBridge .leftRen').css('left', '25%');
} else if (curXiqueNums >= 60 && curXiqueNums < 80) {
$('.page1 .magpieBridge .leftRen').css('left', '32.5%');
} else if (curXiqueNums >= 100) {
$('.page1 .magpieBridge .leftRen').css('left', '40%');
}
if (curXiqueNums < 20) {
$('.page1 .magpieBridge .rightRen').css('right', '10%');
} else if (curXiqueNums >= 20 && curXiqueNums < 40) {
$('.page1 .magpieBridge .rightRen').css('right', '16.75%');
} else if (curXiqueNums >= 40 && curXiqueNums < 60) {
$('.page1 .magpieBridge .rightRen').css('right', '23.5%');
} else if (curXiqueNums >= 60 && curXiqueNums < 80) {
$('.page1 .magpieBridge .rightRen').css('right', '30.25%');
} else if (curXiqueNums >= 100) {
$('.page1 .magpieBridge .rightRen').css('right', '37%');
}
// 處理領取喜鵲頭飾按鈕狀態
if (res.data.devotedBtnStatus == 0) {//投入按鈕狀態0=可投入1=可領取2=不能領取,-1=已領取)
$('.page1 .magpieBridge .buting').hide();
@@ -136,7 +164,7 @@ function getRecommendRoom () {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/tab/home/one',
url: urlPrefix + '/home/tab/home/one',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
success (res) {
if (res.code === 200) {
@@ -362,7 +390,7 @@ function swiperFun () {
direction: "vertical",
loop: true,
autoplay: {
delay: 2000,//3秒切換一次
delay: 3500,//3秒切換一次
disableOnInteraction: false
}
})
@@ -370,6 +398,9 @@ function swiperFun () {
// 總tab切換
$('.tabs div').click(function () {
var i = $(this).index() + 1;
if (i == 1 && timeEndLock == false || i == 2 && timeEndLock == false) {
return toastMsg('活動已結束')
}
$('.tabs').removeClass('tab1').removeClass('tab2').removeClass('tab3').removeClass('tab4');
$('.tabs').addClass(`tab${i}`);
$('.page1').hide();
@@ -748,12 +779,18 @@ $('.page4 .page4Tab div').click(function () {
getRank(data, rankType);
$('.page4 .page4Tab').removeClass('page4Tab2');
type = 'a';
$('.page4 .giftVal').text('收到普通禮物10鉆石=1甜蜜值七夕限定禮物10鉆石=3甜蜜值');
$('.page4 .sweet .sweet_in .box img').attr('src','./images/sweet_in1.png');
$('.page4 .sweet .sweet_in').css({'background':'url(./images/sweet.png) no-repeat',"background-size":'100% 100%'});
} else {
rankType = 3;
data = null;
getRank(data, rankType);
$('.page4 .page4Tab').addClass('page4Tab2');
type = 'b';
$('.page4 .sweet .sweet_in .box img').attr('src','./images/sweet_in2.png');
$('.page4 .giftVal').text('收到普通禮物10鉆石=1心动值七夕限定禮物10鉆石=3心动值');
$('.page4 .sweet .sweet_in').css({'background':'url(./images/sweet2.png) no-repeat',"background-size":'100% 100%'});
}
})
// 七夕榜單日榜總榜切換
@@ -783,6 +820,14 @@ $('.page4 .timeList div').click(function () {
})
// 關閉活動結束按鈕
$('.endActivity .endActivity_in .but').click(function () {
$('.tabs').removeClass('tab1').removeClass('tab2').removeClass('tab3').removeClass('tab4');
$('.tabs').addClass(`tab${3}`);
$('.page1').hide();
$('.page2').hide();
$('.page3').hide();
$('.page4').hide();
$(`.page${3}`).show();
getRoomRank();
$('.endActivity').hide();
bodyScroolFun(false);
})
@@ -827,7 +872,10 @@ function devotedXique (num) {
if (res.code === 200) {
getConfig();
toastMsg('投放成功')
svgaFun();
setTimeout(function () {
xiqueBut = true;
}, 2000)
} else {
toastMsg(res.message)
xiqueBut = true;
@@ -867,10 +915,7 @@ $('.page1 .magpieBridge .but1,.page1 .magpieBridge .but10').click(function () {
}
if (xiqueBut) {
xiqueBut = false;
svgaFun();
setTimeout(function () {
devotedXique(1);
}, 2000)
}
} else {
@@ -880,10 +925,7 @@ $('.page1 .magpieBridge .but1,.page1 .magpieBridge .but10').click(function () {
}
if (xiqueBut) {
xiqueBut = false;
svgaFun();
setTimeout(function () {
devotedXique(10);
}, 2000)
}
// devotedXique(10);
}
@@ -915,7 +957,7 @@ $('.page1 .task .box1 .task3 .but').click(function () {
}
})
// 循環任務按鈕
$('.page1 .tasks2 .box2 .task2But').click(function(){
$('.page1 .task .box2 .task2But').click(function () {
if (browser.ios) {
window.webkit.messageHandlers.openRoomForGiftId.postMessage(JSON.stringify({ uid: roomUid, giftId: giftId }))
} else if (browser.android) {