Compare commits
17 Commits
gold
...
midAutumnF
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2add7ad28d | ||
![]() |
8c25615b23 | ||
![]() |
181a2f2d8e | ||
![]() |
b9e57669de | ||
![]() |
64c0c225f2 | ||
![]() |
d3faf40e1c | ||
![]() |
9d73cc60a8 | ||
![]() |
f9683b475f | ||
![]() |
e846176ed4 | ||
![]() |
46c17a53dc | ||
![]() |
19c56fb540 | ||
![]() |
d80c61f127 | ||
![]() |
b1807e8f52 | ||
![]() |
4848b27c51 | ||
![]() |
3d544a98bb | ||
![]() |
d1e7403f22 | ||
![]() |
2eea6b930f |
After Width: | Height: | Size: 160 KiB |
@@ -87,11 +87,13 @@ function getTwelveList () {
|
||||
twelveStarMasterDescription = arr[arr.length - 1].description;
|
||||
twelveStarMasterStartDate = arr[arr.length - 1].startDate;
|
||||
twelveStarMasterEenDate = arr[arr.length - 1].endDate;
|
||||
} else if (i == arr.length - 1) {
|
||||
twelveStarMasterDescription = arr[0].description;
|
||||
twelveStarMasterStartDate = arr[0].startDate;
|
||||
twelveStarMasterEenDate = arr[0].endDate;
|
||||
} else {
|
||||
}
|
||||
// else if (i == arr.length - 1) {
|
||||
// twelveStarMasterDescription = arr[0].description;
|
||||
// twelveStarMasterStartDate = arr[0].startDate;
|
||||
// twelveStarMasterEenDate = arr[0].endDate;
|
||||
// }
|
||||
else {
|
||||
twelveStarMasterDescription = arr[i - 1].description;
|
||||
twelveStarMasterStartDate = arr[i - 1].startDate;
|
||||
twelveStarMasterEenDate = arr[i - 1].endDate;
|
||||
|
@@ -65,6 +65,7 @@ function getTwelveList () {
|
||||
var index = 0;
|
||||
res.data.forEach((res, i) => {
|
||||
if (res.twelveStarName.indexOf(urlData.twelveStarMasterDescription) != -1) {
|
||||
console.log(res.markUrl);
|
||||
if (res.nick) {
|
||||
$(`.twelveStarMasterBox .act .nick`).text(res.nick.length > 4 ? res.nick.slice(0, 4) + '...' : res.nick);
|
||||
}
|
||||
|
@@ -409,7 +409,7 @@ $('.toaks div span').click(function () {
|
||||
}
|
||||
}
|
||||
})
|
||||
// 老虎机兑换切换
|
||||
// 兑换机兑换切换
|
||||
$('.lhj .tab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$('.lhjReward img').attr('src', `./images/lhjr${i}.png`);
|
||||
@@ -514,7 +514,7 @@ $('.lhj .lhjbut2').click(function () {
|
||||
toastMsg('月饼券不足');
|
||||
}
|
||||
})
|
||||
// 老虎机滑动
|
||||
// 兑换机滑动
|
||||
function letGo (type, res) {
|
||||
$(".num-con2").css({ "top": "0rem" });
|
||||
if (type == 1) {
|
||||
@@ -548,7 +548,7 @@ function letGo (type, res) {
|
||||
});
|
||||
}
|
||||
}
|
||||
// 老虎机奖励切换
|
||||
// 兑换机奖励切换
|
||||
$('.lhjReward .tab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$('.lhjReward img').attr('src', `./images/lhjr${i}.png`);
|
||||
|
Before Width: | Height: | Size: 297 KiB After Width: | Height: | Size: 290 KiB |
1478
view/yinmeng/activity/midAutumnFestival/css/index.css
Normal file
1502
view/yinmeng/activity/midAutumnFestival/css/index.scss
Normal file
13
view/yinmeng/activity/midAutumnFestival/css/swiper-bundle.min.css
vendored
Normal file
BIN
view/yinmeng/activity/midAutumnFestival/images/1.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/10.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/bRuleBg.png
Normal file
After Width: | Height: | Size: 164 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/box.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/box1.png
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/carveUp.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/date.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/dateAct.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/day1.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/day2.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/dayTask.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/day_active1.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/day_active2.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/dhjl.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/dividerecords.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 143 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/dosBg.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/drawBg.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/drawBox.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/drawBoxBg.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/drawBoxBg1.png
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/drawBoxBg2.png
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/drawInbg.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/duihuanBg.png
Normal file
After Width: | Height: | Size: 143 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/endActivity.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.8 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/exchange.png
Normal file
After Width: | Height: | Size: 146 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/exchangeBut.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/exchangeH2.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/exchangeH3.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/exchangeliBg.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/foeTask.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/gift1.png
Normal file
After Width: | Height: | Size: 179 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/gift2.png
Normal file
After Width: | Height: | Size: 179 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/giftBox.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/giftIcon.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/goSengBut.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/guafenBut.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/guafenBut2.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/guafenBut3.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/h2Title.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/h3Title.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/header.png
Normal file
After Width: | Height: | Size: 539 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/liBg.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listBox.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listRule_icon.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listTab1.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listTab2.png
Normal file
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listText1.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listText2.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listUlBg.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listrule1.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listrule1_in.png
Normal file
After Width: | Height: | Size: 360 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listrule2.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/listrule2_in.png
Normal file
After Width: | Height: | Size: 359 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/logo.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/myBg.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/no1.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/no2.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/no3.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/noBg.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/noBgB.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/palyBg2.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/play2Text.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/playBox.png
Normal file
After Width: | Height: | Size: 486 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/rule.png
Normal file
After Width: | Height: | Size: 440 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/rule_icon.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/rule_in.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/spanIcon.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/stab1.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/stab2.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/stab3-2.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/stab3.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/tab1.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/tab2.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/tab_active2-2.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/tab_active2.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/tab_acvive1.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/task.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/taskBut.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/taskBut2.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/taskListBg.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/taskListBg2.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/travel/back.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
view/yinmeng/activity/midAutumnFestival/images/txBg.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
321
view/yinmeng/activity/midAutumnFestival/index.html
Normal file
@@ -0,0 +1,321 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>月盈中秋</title>
|
||||
<link rel="stylesheet" href="../../common/css/reset.css">
|
||||
<link rel="stylesheet" href="./css/swiper-bundle.min.css">
|
||||
<link rel="stylesheet" href="./css/index.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- 顶部返回 -->
|
||||
<div class="back">
|
||||
<img src="./images/travel/back.png" alt="">
|
||||
</div>
|
||||
<!-- header -->
|
||||
<div class="header">
|
||||
<img src="./images/rule_icon.png" alt="" class="rule_icon">
|
||||
</div>
|
||||
<!-- 限定礼物 -->
|
||||
<div class="giftBox">
|
||||
<div class="swiper">
|
||||
<div class="swiper-wrapper">
|
||||
<div class="swiper-slide">
|
||||
<img src="./images/gift1.png" alt="">
|
||||
</div>
|
||||
<div class="swiper-slide">
|
||||
<img src="./images/gift2.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- tab -->
|
||||
<div class="tab">
|
||||
<div class="tab1 tab_active1"></div>
|
||||
<div class="tab2"></div>
|
||||
</div>
|
||||
<!-- 页面1 -->
|
||||
<div class="page1">
|
||||
<!-- 玩法切换 -->
|
||||
<div class="play1">
|
||||
<!-- tab切换 -->
|
||||
<div class="playBox">
|
||||
<div class="stab">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
<img src="./images/h2Title.png" alt="" class="h2Title">
|
||||
<img src="./images/dividerecords.png" alt="" class="dividerecords">
|
||||
<div class="dosBg">
|
||||
<img src="./images/h3Title.png" alt="" class="h3Title">
|
||||
<b>0</b>
|
||||
<p><span class="span1">00</span>时<span class="span2">00</span>分<span class="span3">00</span>秒</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bRuleBg">
|
||||
<img src="./images/guafenBut2.png" alt="" class="guafenBut">
|
||||
<img src="./images/goSengBut.png" alt="" class="goSengBut">
|
||||
</div>
|
||||
</div>
|
||||
<div class="play2">
|
||||
<div class="playBox2">
|
||||
<div class="stab stab2">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
<img src="./images/play2Text.png" alt="" class="play2Text">
|
||||
<div class="task">
|
||||
<p class="moonSecurities">我的月饼劵:0</p>
|
||||
<img src="./images/dayTask.png" alt="" class="dayTask">
|
||||
<img src="./images/foeTask.png" alt="" class="foeTask">
|
||||
<div class="taksli taks1">
|
||||
<p>登录活动页(0/1)</p>
|
||||
<img src="./images/taskBut.png" alt="" class="but">
|
||||
</div>
|
||||
<div class="taksli taks2">
|
||||
<p>发布#中秋快乐#话题的动态(0/1)</p>
|
||||
<img src="./images/taskBut.png" alt="" class="but">
|
||||
</div>
|
||||
<div class="taksli taks3">
|
||||
<p>
|
||||
每送出一个魔法宝箱获得月饼劵*1<br>
|
||||
<b>今日已获得 0 张</b>
|
||||
</p>
|
||||
<img src="./images/taskBut.png" alt="" class="but">
|
||||
</div>
|
||||
<!-- <div class="taksli taks4">
|
||||
<p>
|
||||
每送出一次魔法宝箱获得月饼劵*3<br>
|
||||
<b>今日已获得 0 张</b>
|
||||
</p>
|
||||
<img src="./images/taskBut.png" alt="" class="but">
|
||||
</div> -->
|
||||
<div class="taksli taks5">
|
||||
<p>
|
||||
活动期间每送出100钻中秋限定礼物可获得月饼券*1<br>
|
||||
<b>今日已获得 0 张</b>
|
||||
</p>
|
||||
<img src="./images/taskBut.png" alt="" class="but">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="play3">
|
||||
<div class="draw">
|
||||
<!-- 切换 -->
|
||||
<div class="stab stab3">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
<!-- 我的月饼券 -->
|
||||
<div class="moom">我的月饼券:00</div>
|
||||
<!-- 兑换记录 -->
|
||||
<img src="./images/dhjl.png" alt="" class="dhjl">
|
||||
<!-- 兑换机 -->
|
||||
<div class="drawBg">
|
||||
<div class="drawBox">
|
||||
<div class="drawBoxAll">
|
||||
<img src="./images/box1.png" alt="" class="box1">
|
||||
<img src="./images/box1.png" alt="" class="box1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 抽一次 -->
|
||||
<img src="./images/1.png" alt="" class="but1">
|
||||
<!-- 抽十次 -->
|
||||
<img src="./images/10.png" alt="" class="but10">
|
||||
</div>
|
||||
<!-- 兑换奖池 -->
|
||||
<div class="drawBoxBg">
|
||||
<div class="swiper">
|
||||
<div class="swiper-wrapper">
|
||||
<div class="swiper-slide">
|
||||
<img src="./images/drawBoxBg1.png" alt="">
|
||||
</div>
|
||||
<div class="swiper-slide">
|
||||
<img src="./images/drawBoxBg2.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 页面2 -->
|
||||
<div class="page2">
|
||||
<div class="listBox">
|
||||
<!-- 规则 -->
|
||||
<img src="./images/listRule_icon.png" alt="" class="listRule_icon">
|
||||
<!-- 榜单切换 -->
|
||||
<div class="listTab">
|
||||
<div class="listTab1 listTab_active1"></div>
|
||||
<div class="listTab2"></div>
|
||||
</div>
|
||||
<!-- 日榜总榜切换 -->
|
||||
<div class="dayTab">
|
||||
<div class="day1 day_active1"></div>
|
||||
<div class="day2"></div>
|
||||
</div>
|
||||
<!-- 文案介绍 -->
|
||||
<img src="./images/listText1.png" alt="" class="listText">
|
||||
<!-- 日期 -->
|
||||
<div class="time">
|
||||
<div class="active"></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
<!-- 前三 -->
|
||||
<div class="noBg">
|
||||
<div class="no1">
|
||||
<img src="./images/no1.png" alt="" class="txBg">
|
||||
<img src="./images/logo.png" alt="" class="tx">
|
||||
<p>虚位以待</p>
|
||||
<b>思慕值:0</b>
|
||||
</div>
|
||||
<div class="no2">
|
||||
<img src="./images/no2.png" alt="" class="txBg">
|
||||
<img src="./images/logo.png" alt="" class="tx">
|
||||
<p>虚位以待</p>
|
||||
<b>思慕值:0</b>
|
||||
</div>
|
||||
<div class="no3">
|
||||
<img src="./images/no3.png" alt="" class="txBg">
|
||||
<img src="./images/logo.png" alt="" class="tx">
|
||||
<p>虚位以待</p>
|
||||
<b>思慕值:0</b>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 前三底座 -->
|
||||
<img src="./images/noBgB.png" alt="" class="noBgB">
|
||||
<!-- 非前三 -->
|
||||
<div class="ul">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="num">12</div>
|
||||
<img src="./images/txBg.png" alt="" class="txBg">
|
||||
<img src="./images/logo.png" alt="" class="tx">
|
||||
<div class="name">虚位以待</div>
|
||||
<div class="sore">思慕值:0</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 自己榜单 -->
|
||||
<div class="my">
|
||||
<div class="num">未上榜</div>
|
||||
<img src="./images/txBg.png" alt="" class="txBg">
|
||||
<img src="./images/logo.png" alt="" class="tx">
|
||||
<div class="name">虚位以待</div>
|
||||
<div class="sore">思慕值:0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 规则弹窗 -->
|
||||
<div class="rule">
|
||||
<div class="rule_in">
|
||||
<div>
|
||||
<img src="./images/rule.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 瓜分记录 -->
|
||||
<div class="dividerecordsBg">
|
||||
<div class="dividerecordsBg_in">
|
||||
<div class="title">
|
||||
<div>瓜分时间</div>
|
||||
<div>获得奖励</div>
|
||||
</div>
|
||||
<div class="ul">
|
||||
<div class="list">
|
||||
<span>
|
||||
2023/09/09<br>
|
||||
23:23:23
|
||||
</span>
|
||||
<p>666钻</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 兑换记录 -->
|
||||
<div class="duihuanBg">
|
||||
<div class="dividerecordsBg_in">
|
||||
<div class="title">
|
||||
<div>兑换时间</div>
|
||||
<div>获得奖励</div>
|
||||
</div>
|
||||
<div class="ul">
|
||||
<div class="list">
|
||||
<span>
|
||||
2023/09/09<br>
|
||||
23:23:23
|
||||
</span>
|
||||
<p>礼物名称X1</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 瓜分弹窗 -->
|
||||
<div class="carveup">
|
||||
<div class="carveup_in">
|
||||
<img src="./images/box.png" alt="" class="box">
|
||||
<p>钻石0个</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 思慕规则弹窗 -->
|
||||
<div class="listrule1">
|
||||
<div class="listrule1_in">
|
||||
<div class="box">
|
||||
<img src="./images/listrule1_in.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 寄情规则弹窗 -->
|
||||
<div class="listrule2">
|
||||
<div class="listrule2_in">
|
||||
<div class="box">
|
||||
<img src="./images/listrule2_in.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 兑换机弹窗 -->
|
||||
<div class="exchange">
|
||||
<div class="box">
|
||||
<div class="h2">恭喜你获得</div>
|
||||
<div class="h3">领取后自动获取奖励</div>
|
||||
<img src="./images/exchangeBut.png" alt="" class="but">
|
||||
<ul>
|
||||
<li>
|
||||
<img class="type3" src="http://image.dev.nnbc123.cn/Fuf1v1Z4usigj82HvlyCfG2sAGWw?imageslim" alt="">
|
||||
<b>x1</b>
|
||||
<p>礼物昵称1天</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 活动结束弹窗 -->
|
||||
<div class="endActivity">
|
||||
<div class="endActivity_in">
|
||||
<img src="./images/endActivitybut.png" alt="" class="but">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<script src="../../common/js/flexible.js"></script>
|
||||
<script src="../../common/js/jquery-3.2.1.min.js"></script>
|
||||
<script src="../../common/js/common2.js"></script>
|
||||
<script src="../../common/js/layer.js"></script>
|
||||
<script src="../../common/js/vconsole.min.js"></script>
|
||||
<script src="../../common/js/svga.min.js"></script>
|
||||
<script src="./js/swiper-bundle.min.js"></script>
|
||||
<script src="../../common/js/route-constant.js"></script>
|
||||
<script src="./js/wow.js"></script>
|
||||
<script src="./js/index.js"></script>
|
698
view/yinmeng/activity/midAutumnFestival/js/index.js
Normal file
@@ -0,0 +1,698 @@
|
||||
let urlPrefix = getUrlPrefix()
|
||||
let browser = checkVersion()
|
||||
let env = EnvCheck();
|
||||
if (env == 'test') {
|
||||
new VConsole();
|
||||
}
|
||||
// 封装layer消息提醒框
|
||||
let layerIndex
|
||||
const showLoading = (content = '加载中...') => {
|
||||
layer.open({
|
||||
type: 2,
|
||||
shadeClose: false,
|
||||
content,
|
||||
success (e) {
|
||||
layerIndex = $(e).attr('index')
|
||||
}
|
||||
})
|
||||
}
|
||||
const hideLoading = (index) => {
|
||||
layer.close(index)
|
||||
}
|
||||
const toastMsg = (content = '操作完成', time = 2) => {
|
||||
layer.open({
|
||||
content,
|
||||
time,
|
||||
skin: 'msg'
|
||||
})
|
||||
}
|
||||
var curDate; //当天日期;
|
||||
var rankType = 1; //排行榜类型(1=送礼日榜,2=送礼总榜,3=收礼日榜,4=收礼总榜);
|
||||
var type = 'a';//a:送礼b:收礼;
|
||||
var type2 = 'a';//a:日榜b:总榜;
|
||||
var data = null;//默认日榜;
|
||||
var roomUid = null;//房间uid;
|
||||
var isEndTime = false;
|
||||
var moonCakeNum = 0;//我的
|
||||
var page = 1;//抽奖页码
|
||||
var drawPageSizeLack = true;//抽奖锁
|
||||
var drawLock = true;//控制抽奖锁
|
||||
var dynamicWorldId;//话题id
|
||||
var timeOut2;//时间戳存储器
|
||||
var leftTime;//倒计时暂存
|
||||
// 初始化函数
|
||||
$(function () {
|
||||
getInfoFromClient()
|
||||
setTimeout(function () {
|
||||
// 页面全屏
|
||||
if (browser.app) {
|
||||
if (browser.android) {
|
||||
window.androidJsObj.initShowNav(false)
|
||||
} else {
|
||||
window.webkit.messageHandlers.initShowNav.postMessage(0)
|
||||
}
|
||||
};
|
||||
// 顶部返回事件
|
||||
$('.back').click(() => {
|
||||
if (browser.android) {
|
||||
window.androidJsObj.closeWebView()
|
||||
} else {
|
||||
window.webkit.messageHandlers.closeWebView.postMessage(null)
|
||||
}
|
||||
})
|
||||
swiperFun();
|
||||
getConfig();
|
||||
getRecommendRoom();
|
||||
jackpotConfig();
|
||||
}, 100)
|
||||
})
|
||||
// 获取月饼券接口
|
||||
function getDrawConfig () {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GEt',
|
||||
url: urlPrefix + '/act/2023MidAutumn/draw/getConfig',
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
moonCakeNum = res.data.moonCakeNum;
|
||||
$('.page1 .play2 .playBox2 .task .moonSecurities').text(`我的月饼劵:${moonCakeNum}`);
|
||||
$('.page1 .play3 .draw .moom').text(`我的月饼券:${moonCakeNum}`);
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error (err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('网络错误,请退出重进')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取房间Uid接口
|
||||
function getRecommendRoom () {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GEt',
|
||||
url: urlPrefix + '/home/tab/home/one',
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
roomUid = res.data;
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error (err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('网络错误,请退出重进')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取瓜分接口
|
||||
function jackpotConfig () {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GEt',
|
||||
url: urlPrefix + '/act/2023MidAutumn/jackpot/getConfig',
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
// 处理瓜分按钮状态
|
||||
$('.page1 .play1 .bRuleBg .guafenBut').attr('src', res.data.allotStatus == 0 ? './images/guafenBut2.png' : res.data.allotStatus == 1 ? './images/guafenBut.png' : './images/guafenBut3.png')
|
||||
if (res.data.allotStatus == 1) {
|
||||
$('.page1 .play1 .bRuleBg .guafenBut').attr('click', 1);
|
||||
}
|
||||
// 设置当前奖池数量
|
||||
$('.page1 .play1 .playBox .dosBg b').text(res.data.jackpotDiamonds);
|
||||
// 设置倒计时
|
||||
leftTime = res.data.jackpotEndTime - res.timestamp;
|
||||
if (leftTime >= 0) {
|
||||
countup();
|
||||
}else{
|
||||
$('.page1 .play1 .playBox .dosBg p').html(`<span class="span1">00</span>时<span class="span2">00</span>分<span class="span3">00</span>秒`)
|
||||
}
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error (err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('网络错误,请退出重进')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 倒计时
|
||||
function countup () {
|
||||
clearTimeout(timeOut2)
|
||||
//获取当前时间
|
||||
var d = 0;
|
||||
var h = 0;
|
||||
var m = 0;
|
||||
var s = 0;
|
||||
//定义变量 d,h,m,s保存倒计时的时间
|
||||
var d, h, m, s;
|
||||
if (leftTime >= 0) {
|
||||
d = getzf(Math.floor(leftTime / 1000 / 60 / 60 / 24));
|
||||
h = getzf(Math.floor(leftTime / 1000 / 60 / 60 % 24));
|
||||
m = getzf(Math.floor(leftTime / 1000 / 60 % 60));
|
||||
s = getzf(Math.floor(leftTime / 1000 % 60));
|
||||
//将倒计时赋值到div中
|
||||
$('.page1 .play1 .playBox .dosBg p .span1').text(h)
|
||||
$('.page1 .play1 .playBox .dosBg p .span2').text(m)
|
||||
$('.page1 .play1 .playBox .dosBg p .span3').text(s)
|
||||
leftTime = leftTime - 1000;
|
||||
//递归每秒调⽤countTime⽅法,显⽰动态时间效果
|
||||
} else {
|
||||
location.reload();
|
||||
return
|
||||
}
|
||||
timeOut2 = setTimeout(countup, 1000);
|
||||
}
|
||||
//补0操作
|
||||
function getzf (num) {
|
||||
if (parseInt(num) < 10) {
|
||||
num = '0' + num;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
// 获取首页任务接口
|
||||
function getConfig () {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GEt',
|
||||
url: urlPrefix + '/act/2023MidAutumn/task/getConfig',
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
// 设置话题id
|
||||
dynamicWorldId = res.data.worldId;
|
||||
// 判断活动结束时间
|
||||
if (res.timestamp > res.data.endTime) {
|
||||
isEndTime = true;
|
||||
$('.endActivity').show();
|
||||
}
|
||||
// 我的月饼券
|
||||
moonCakeNum = res.data.moonCakeNum;
|
||||
$('.page1 .play2 .playBox2 .task .moonSecurities').text(`我的月饼劵:${moonCakeNum}`);
|
||||
$('.page1 .play3 .draw .moom').text(`我的月饼券:${moonCakeNum}`);
|
||||
// 处理每日任务状态
|
||||
res.data.dailyTaskList.forEach((res, i) => {
|
||||
$(`.page1 .play2 .playBox2 .task .taks${i + 1} .but`).attr('src', res.btnStatus == 1 ? './images/taskBut2.png' : './images/taskBut.png');
|
||||
$(`.page1 .play2 .playBox2 .task .taks${i + 1} .but`).attr('click', res.btnStatus == 0 ? '0' : '1');
|
||||
if (i == 0) {
|
||||
$(`.page1 .play2 .playBox2 .task .taks${i + 1} p`).text(`登录活动页(${res.cur}/${res.need})`);
|
||||
}
|
||||
if (i == 1) {
|
||||
$(`.page1 .play2 .playBox2 .task .taks${i + 1} p`).text(`发布#中秋快乐#话题的动态(${res.cur}/${res.need})`);
|
||||
}
|
||||
})
|
||||
// 处理循环任务状态
|
||||
res.data.loopTaskList.forEach((res, i) => {
|
||||
$(`.page1 .play2 .playBox2 .task .taks${i + 3} .but`).attr('src', res.btnStatus == 1 ? './images/taskBut2.png' : './images/taskBut.png');
|
||||
$(`.page1 .play2 .playBox2 .task .taks${i + 3} p b`).text(`今日已获得 ${res.loop} 张`)
|
||||
})
|
||||
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error (err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('网络错误,请退出重进')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取榜单接口
|
||||
function getRank (rankType, date) {
|
||||
$('.page2 .listBox .ul ul li').remove();
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GEt',
|
||||
url: urlPrefix + '/act/2023MidAutumn/rank/getRank',
|
||||
data: { rankType, date },
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
// 设置当天日期
|
||||
curDate = res.data.curDate;
|
||||
// 处理日期
|
||||
if (res.data.dateList) {
|
||||
res.data.dateList.forEach((res, i) => {
|
||||
$('.page2 .listBox .time div').eq(i).text(`${res[5]}${res[6]}.${res[8]}${res[9]}`);
|
||||
$('.page2 .listBox .time div').eq(i).attr('data', res);
|
||||
if (res == curDate && date == null) {
|
||||
$('.page2 .listBox .time div').removeClass('active')
|
||||
$('.page2 .listBox .time div').eq(i).addClass('active');
|
||||
}
|
||||
})
|
||||
}
|
||||
// 处理自己榜单
|
||||
$('.page2 .listBox .my .tx').attr('src', res.data.meRank.avatar);
|
||||
$('.page2 .listBox .my .num').text(res.data.meRank.ranking == 0 ? '未上榜' : res.data.meRank.ranking);
|
||||
$('.page2 .listBox .my .name').text(res.data.meRank.nick);
|
||||
$('.page2 .listBox .my .sore').text(`${rankType == 1 || rankType == 2 ? "思慕值:" : "寄情值:"}${unitProcessing(res.data.meRank.score, 10000, 1, 'w')}`);
|
||||
// 处理前三
|
||||
var top3 = res.data.rankList.slice(0, 3);
|
||||
var notTop3 = res.data.rankList.slice(3);
|
||||
// 处理前伞三
|
||||
if (top3.length < 3) {
|
||||
let arr = new Array(3 - top3.length).fill({
|
||||
avatar: './images/logo.png',
|
||||
nick: '虚位以待',
|
||||
score: "0"
|
||||
})
|
||||
top3.push(...arr)
|
||||
}
|
||||
top3.forEach((res, index) => {
|
||||
$(`.page2 .listBox .noBg .no${index + 1} .tx`).attr('src', res.avatar);
|
||||
$(`.page2 .listBox .noBg .no${index + 1} p`).text(res.nick);
|
||||
$(`.page2 .listBox .noBg .no${index + 1} b`).text(`${rankType == 1 || rankType == 2 ? "思慕值:" : "寄情值:"}${unitProcessing(res.score, 10000, 1, 'w')}`);
|
||||
})
|
||||
// 非前三
|
||||
var str = '';
|
||||
notTop3.forEach((res, i) => {
|
||||
str += `
|
||||
<li>
|
||||
<div class="num">${res.ranking}</div>
|
||||
<img src="./images/txBg.png" alt="" class="txBg">
|
||||
<img src="${res.avatar}" alt="" class="tx">
|
||||
<div class="name">${res.nick}</div>
|
||||
<div class="sore">${rankType == 1 || rankType == 2 ? "思慕值:" : "寄情值:"}${unitProcessing(res.score, 10000, 1, 'w')}</div>
|
||||
</li>
|
||||
`
|
||||
})
|
||||
$('.page2 .listBox .ul ul').append(str);
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error (err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('网络错误,请退出重进')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 送礼和收礼榜单切换
|
||||
$('.page2 .listBox .listTab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$('.page2 .listBox .listTab div').removeClass('listTab_active1').removeClass('listTab_active2');
|
||||
$(this).addClass(`listTab_active${i}`);
|
||||
$('.page2 .listBox .listText').attr('src', `./images/listText${i}.png`)
|
||||
if (i == 1) {
|
||||
type = 'a';
|
||||
rankType = type2 == "a" ? 1 : 2;
|
||||
getRank(rankType);
|
||||
} else {
|
||||
type = 'b';
|
||||
rankType = type2 == "a" ? 3 : 4;
|
||||
getRank(rankType);
|
||||
}
|
||||
})
|
||||
// 日榜总榜切换
|
||||
$('.page2 .listBox .dayTab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$('.page2 .listBox .dayTab div').removeClass('day_active1').removeClass('day_active2');
|
||||
$(this).addClass(`day_active${i}`);
|
||||
if (i == 1) {
|
||||
$('.page2 .listBox .time').show()
|
||||
type2 = 'a';
|
||||
rankType = type == "a" ? 1 : 3;
|
||||
getRank(rankType);
|
||||
} else {
|
||||
$('.page2 .listBox .time').hide()
|
||||
type2 = 'b';
|
||||
rankType = type == "a" ? 2 : 4;
|
||||
getRank(rankType);
|
||||
}
|
||||
})
|
||||
// 日榜切换日期
|
||||
$('.page2 .listBox .time div').click(function () {
|
||||
var datas = $(this).attr('data');
|
||||
$(this).addClass('active').siblings().removeClass('active');
|
||||
rankType = type == "a" ? 1 : 3;//排行榜类型(1=甜蜜日榜,2=甜蜜总榜,3=爱意日榜,4=爱意总榜)
|
||||
data = datas;
|
||||
getRank(rankType, data);
|
||||
})
|
||||
// 查看规则逻辑
|
||||
$('.page2 .listBox .listRule_icon').click(function () {
|
||||
if (rankType == 1 || rankType == 2) {
|
||||
$('.listrule1 .listrule1_in .box img').attr('src', './images/listrule1_in.png');
|
||||
$('.listrule1').show();
|
||||
bodyScroolFun(true);
|
||||
} else {
|
||||
$('.listrule2 .listrule2_in .box img').attr('src', './images/listrule2_in.png');
|
||||
$('.listrule2').show();
|
||||
bodyScroolFun(true);
|
||||
}
|
||||
})
|
||||
// TAB玩法&榜单tab切换
|
||||
$('.tab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
if (i == 2) {
|
||||
getRank(rankType, data);
|
||||
} else {
|
||||
if (isEndTime) {
|
||||
toastMsg('活动已结束~')
|
||||
return
|
||||
}
|
||||
}
|
||||
$(this).addClass(`tab_active${i}`).siblings().removeClass('tab_active1').removeClass('tab_active2')
|
||||
$('.page1').hide();
|
||||
$('.page2').hide();
|
||||
$(`.page${i}`).show();
|
||||
|
||||
})
|
||||
// 礼物轮播
|
||||
function swiperFun () {
|
||||
var mySwiper = new Swiper('.swiper', {
|
||||
// direction: "vertical",
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 3500,//
|
||||
disableOnInteraction: false
|
||||
}
|
||||
})
|
||||
}
|
||||
// 月饼玩法切换
|
||||
$('.stab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$('.play1').hide();
|
||||
$('.play2').hide();
|
||||
$('.play3').hide();
|
||||
$(`.play${i}`).show();
|
||||
if (i == 1) {
|
||||
jackpotConfig();
|
||||
}
|
||||
if (i == 3) {
|
||||
getDrawConfig();
|
||||
}
|
||||
})
|
||||
// 抽一次兑换机
|
||||
$('.page1 .play3 .draw .but1').click(function () {
|
||||
if (moonCakeNum <= 0) {
|
||||
toastMsg('月饼券不足,请参加任务获取~');
|
||||
return
|
||||
}
|
||||
if (drawLock) {
|
||||
drawLock = false;
|
||||
draw(1);
|
||||
}
|
||||
})
|
||||
// 抽全部兑换机
|
||||
$('.page1 .play3 .draw .but10').click(function () {
|
||||
if (moonCakeNum <= 0) {
|
||||
toastMsg('月饼券不足,请参加任务获取~');
|
||||
return
|
||||
}
|
||||
if (drawLock) {
|
||||
drawLock = false;
|
||||
draw(null);
|
||||
}
|
||||
})
|
||||
// 抽奖接口
|
||||
function draw (num) {
|
||||
$('.exchange .box ul li').remove();
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GEt',
|
||||
url: urlPrefix + '/act/2023MidAutumn/draw/draw',
|
||||
data: { num },
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
var str = '';
|
||||
// 1头饰;2铭牌;3气泡;4座驾;5礼物;
|
||||
res.data.forEach(res => {
|
||||
str += `
|
||||
<li>
|
||||
<img class="${res.type == 1 ? 'type1' : res.type == 2 ? 'type2' : res.type == 3 ? 'type3' : res.type == 4 ? 'type4' : res.type == 5 ? 'type5' : ''}" src="${res.pic}" alt="">
|
||||
<b>x${res.num}</b>
|
||||
<p>${res.name}</p>
|
||||
</li>
|
||||
`})
|
||||
$('.exchange .box ul').append(str);
|
||||
letGo(res.data[0].seq - 1);
|
||||
getDrawConfig();
|
||||
} else {
|
||||
drawLock = true;
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error (err) {
|
||||
drawLock = true;
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('网络错误,请退出重进')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 兑换机滑动初始化
|
||||
var valRem = [];
|
||||
for (let index = 0; index < 11; index++) {
|
||||
valRem[index] = `-${2.2666666667 * (index)}rem`
|
||||
}
|
||||
// 兑换机滑动
|
||||
function letGo (res) {
|
||||
$(".page1 .play3 .draw .drawBg .drawBox .drawBoxAll").css({ "top": "0rem" });
|
||||
var val = valRem[res];
|
||||
$(".page1 .play3 .draw .drawBg .drawBox .drawBoxAll").animate({ "top": "0rem" }, 0, "linear", function () {
|
||||
$(this).animate({ "top": valRem[valRem.length - 1] }, 1300, "linear", function () {
|
||||
$(this).animate({ "top": val }, 0, "linear", function () {
|
||||
$('.exchange').show();
|
||||
bodyScroolFun(true);
|
||||
drawLock = true;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
// 打开规则弹窗
|
||||
$('.header .rule_icon').click(function () {
|
||||
$('.rule').show();
|
||||
bodyScroolFun(true);
|
||||
})
|
||||
// 关闭规则弹窗
|
||||
$('.rule').click(function () {
|
||||
$('.rule').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 关闭瓜分记录弹窗
|
||||
$('.dividerecordsBg').click(function () {
|
||||
$('.dividerecordsBg').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 打开兑换记录弹窗
|
||||
$('.page1 .play3 .draw .dhjl').click(function () {
|
||||
page = 1;
|
||||
$('.duihuanBg .dividerecordsBg_in .ul .list').remove();
|
||||
drawPageRecord(page)
|
||||
})
|
||||
// 获取抽奖记录
|
||||
function drawPageRecord (page) {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GEt',
|
||||
url: urlPrefix + '/act/2023MidAutumn/draw/pageRecord',
|
||||
data: { page, size: 20 },
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
if (res.data.length == 0) {
|
||||
drawPageSizeLack = false;
|
||||
hideLoading(layerIndex)
|
||||
$('.duihuanBg .dividerecordsBg_in .ul').append(str);
|
||||
$('.duihuanBg').show();
|
||||
return;
|
||||
}
|
||||
var str = '';
|
||||
res.data.forEach((res, i) => {
|
||||
str += `
|
||||
<div class="list">
|
||||
<span>
|
||||
${dateFormat(res.createTime, 'yyyy/MM/dd')}<br>
|
||||
${dateFormat(res.createTime, 'hh:mm:ss')}
|
||||
</span>
|
||||
<p>${res.rewardDesc}</p>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
$('.duihuanBg .dividerecordsBg_in .ul').append(str);
|
||||
drawPageSizeLack = true;
|
||||
$('.duihuanBg').show();
|
||||
bodyScroolFun(true);
|
||||
} else {
|
||||
drawPageSizeLack = true;
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error (err) {
|
||||
drawPageSizeLack = true;
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('网络错误,请退出重进')
|
||||
}
|
||||
})
|
||||
}
|
||||
//检测抽奖记录是否到达底部
|
||||
$(".duihuanBg .dividerecordsBg_in .ul").scroll(function () {
|
||||
var divHeight = $(this).height();
|
||||
var nScrollHeight = $(this)[0].scrollHeight;
|
||||
var nScrollTop = $(this)[0].scrollTop;
|
||||
if (nScrollTop + divHeight + 50 >= nScrollHeight) {
|
||||
console.log("到达底部了");
|
||||
if (drawPageSizeLack) {
|
||||
drawPageSizeLack = false;
|
||||
page++;
|
||||
drawPageRecord(page)
|
||||
}
|
||||
}
|
||||
});
|
||||
// 打开瓜分记录弹窗
|
||||
$('.page1 .play1 .playBox .dividerecords').click(function () {
|
||||
jackpotListRecord();
|
||||
})
|
||||
// 获取抽奖记录
|
||||
function jackpotListRecord (page) {
|
||||
$('.dividerecordsBg .dividerecordsBg_in .ul .list').remove();
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GEt',
|
||||
url: urlPrefix + '/act/2023MidAutumn/jackpot/listRecord',
|
||||
data: { page, size: 20 },
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
var str = '';
|
||||
res.data.forEach((res, i) => {
|
||||
str += `
|
||||
<div class="list">
|
||||
<span>
|
||||
${dateFormat(res.time, 'yyyy/MM/dd')}<br>
|
||||
${dateFormat(res.time, 'hh:mm:ss')}
|
||||
</span>
|
||||
<p>${res.diamonds}钻</p>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
$('.dividerecordsBg .dividerecordsBg_in .ul').append(str);
|
||||
$('.dividerecordsBg').show();
|
||||
bodyScroolFun(true);
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error (err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('网络错误,请退出重进')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 关闭兑换记录弹窗
|
||||
$('.duihuanBg').click(function () {
|
||||
$('.duihuanBg').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 打开瓜分弹窗
|
||||
$('.page1 .play1 .bRuleBg .guafenBut').click(function () {
|
||||
var bool = $(this).attr('click');
|
||||
if (bool == 1) {
|
||||
jackpotAllotJackpot();
|
||||
}
|
||||
|
||||
})
|
||||
// 瓜分钻石接口
|
||||
function jackpotAllotJackpot () {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GEt',
|
||||
url: urlPrefix + '/act/2023MidAutumn/jackpot/allotJackpot',
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
$('.carveup .carveup_in p').text(`钻石${res.data}个`);
|
||||
$('.carveup').show();
|
||||
bodyScroolFun(true);
|
||||
jackpotConfig();
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error (err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('网络错误,请退出重进')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 关闭瓜分弹窗
|
||||
$('.carveup').click(function () {
|
||||
$('.carveup').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 关闭榜单规则弹窗
|
||||
$('.listrule1,.listrule2').click(function () {
|
||||
$('.listrule1,.listrule2').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 关闭兑换机弹窗
|
||||
$('.exchange .box .but').click(function () {
|
||||
$('.exchange').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 活动结束弹窗
|
||||
$('.endActivity .endActivity_in .but').click(function () {
|
||||
$('.tab div').removeClass('tab_active1');
|
||||
$('.tab div').eq(1).addClass('tab_active2');
|
||||
$('.page1').hide();
|
||||
$(`.page2`).show();
|
||||
$('.endActivity').hide();
|
||||
bodyScroolFun(false);
|
||||
getRank(rankType, data);
|
||||
})
|
||||
// 去赠送福袋按钮
|
||||
$('.page1 .play1 .bRuleBg .goSengBut').click(function () {
|
||||
if (browser.ios) {
|
||||
window.webkit.messageHandlers.openRoomForGiftId.postMessage(JSON.stringify({ uid: roomUid, giftId: 0 }))
|
||||
} else if (browser.android) {
|
||||
if (androidJsObj && typeof androidJsObj === 'object') {
|
||||
window.androidJsObj.openRoomForGiftId(roomUid, 0);
|
||||
}
|
||||
}
|
||||
})
|
||||
// 完成首页任务按钮2
|
||||
$('.page1 .play2 .playBox2 .task .taks2 .but').click(function () {
|
||||
var bool = $(this).attr('click');
|
||||
if (bool == 1) {
|
||||
return;
|
||||
}
|
||||
if (browser.app) {
|
||||
if (browser.ios) {
|
||||
window.webkit.messageHandlers.jumpAppointPage.postMessage(JSON.stringify({ routerType: 75, routerVal: dynamicWorldId }))
|
||||
} else if (browser.android) {
|
||||
if (androidJsObj && typeof androidJsObj === 'object') {
|
||||
tools.nativeUtils.jumpAppointPage('DONG_TAI', dynamicWorldId);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
toastMsg('请在app内打开')
|
||||
}
|
||||
})
|
||||
// 完成首页循环任务按钮
|
||||
$('.page1 .play2 .playBox2 .task .taks3 .but,.page1 .play2 .playBox2 .task .taks4 .but,.page1 .play2 .playBox2 .task .taks5 .but').click(function () {
|
||||
if (browser.ios) {
|
||||
window.webkit.messageHandlers.openRoomForGiftId.postMessage(JSON.stringify({ uid: roomUid, giftId: 0 }))
|
||||
} else if (browser.android) {
|
||||
if (androidJsObj && typeof androidJsObj === 'object') {
|
||||
window.androidJsObj.openRoomForGiftId(roomUid, 0);
|
||||
}
|
||||
}
|
||||
})
|
||||
//返回页面 重新请求接口
|
||||
var hiddenProperty = 'hidden' in document ? 'hidden' :
|
||||
'webkitHidden' in document ? 'webkitHidden' :
|
||||
'mozHidden' in document ? 'mozHidden' : null;
|
||||
|
||||
var visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange');
|
||||
var onVisibilityChange = function () {
|
||||
if (!document[hiddenProperty]) {
|
||||
location.reload()
|
||||
}
|
||||
}
|
||||
document.addEventListener(visibilityChangeEvent, onVisibilityChange);
|
14
view/yinmeng/activity/midAutumnFestival/js/swiper-bundle.min.js
vendored
Normal file
46
view/yinmeng/activity/midAutumnFestival/js/wow.js
Normal file
@@ -0,0 +1,46 @@
|
||||
var baba = document.querySelector('body');
|
||||
baba.addEventListener('click', function (e) {
|
||||
$('body,html').css({"width":"100%","position": "relative", "overflow": "hidden" });
|
||||
tianJia(e);
|
||||
})
|
||||
|
||||
var erZi = [];
|
||||
function tianJia (e) {
|
||||
var sunZi = document.createElement('div');
|
||||
sunZi.className = 'rabbit';
|
||||
sunZi.innerHTML = '<i class="iconfont icon-tuzi"></i>';
|
||||
// sunZi.innerHTML = '<img src="./images/giftIcon.png" alt="" srcset="">';
|
||||
baba.appendChild(sunZi);
|
||||
erZi.push({
|
||||
el: sunZi,
|
||||
top: e.pageY - 10,
|
||||
left: e.pageX - 20,
|
||||
opacity: 1,
|
||||
scale: 1,
|
||||
color: `rgb(${255 * Math.random()},${255 * Math.random()},${255 * Math.random()})`
|
||||
});
|
||||
move();
|
||||
};
|
||||
function move () {
|
||||
for (var i = 0; i < erZi.length; i++) {
|
||||
if (erZi[i].opacity <= 0) {
|
||||
baba.removeChild(erZi[i].el);
|
||||
erZi.splice(i, 1);
|
||||
return;
|
||||
}
|
||||
erZi[i].top--;
|
||||
erZi[i].opacity = erZi[i].opacity - 0.04;
|
||||
// erZi[i].scale = erZi[i].scale + 0.0001;
|
||||
erZi[i].el.style.cssText = `
|
||||
top: ${erZi[i].top}px;
|
||||
left: ${erZi[i].left+10}px;
|
||||
color: ${erZi[i].color};
|
||||
opacity: ${erZi[i].opacity};
|
||||
transform: scale(${erZi[i].scale});
|
||||
position: absolute;
|
||||
`
|
||||
|
||||
}
|
||||
$('body,html').css({"width":"100%","position": "relative", "overflow": "auto" });
|
||||
window.requestAnimationFrame(move);
|
||||
}
|
@@ -52,7 +52,8 @@ $(function () {
|
||||
let androidUrl = null;
|
||||
channelDict.hasOwnProperty(channelData) ? androidUrl = channelDict[channelData] : androidUrl = 'https://image.nnbc123.cn/yinmeng_official.apk';
|
||||
// let iosUrl = 'http://doudouyue.com/8axv' //ios企业包
|
||||
let iosUrl = 'http://fir.gzmangguo.cn/sbz6' //ios商店包
|
||||
let iosUrl = 'http://doudouyue.com/e8hdlr' //ios企业包
|
||||
// let iosUrl = 'http://fir.gzmangguo.cn/sbz6' //ios商店包
|
||||
|
||||
$(document).ready(function () {
|
||||
var deviceWidth = document.documentElement.clientWidth;
|
||||
|