繁体化活动

This commit is contained in:
Dragon
2023-10-24 12:02:46 +08:00
parent 7021a6c155
commit 3573a4c0cf
34 changed files with 208 additions and 200 deletions

View File

@@ -917,7 +917,7 @@ body::-webkit-scrollbar {
background-size: 100% 100%;
position: absolute;
right: 0.34667rem;
top: 0.22667rem;
top: 0.72667rem;
}
.page2 .task4 .butActive {

View File

@@ -913,7 +913,7 @@ body {
background-size: 100% 100%;
position: absolute;
right: px2rem(26);
top: px2rem(17);
top:0.72667rem;
}
.butActive {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 KiB

After

Width:  |  Height:  |  Size: 437 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -4,22 +4,22 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>万圣节嘉年</title>
<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>
<!--视觉 -->
<!--視覺 -->
<div class="header">
<div class="rule_icon">动规则></div>
<div class="rule_icon">動規則></div>
</div>
<!-- 万圣节活动礼-->
<!-- 萬聖節活動禮-->
<div class="giftBox">
<div class="swiper">
<div class="swiper-wrapper">
@@ -34,49 +34,49 @@
</div>
<!-- pages1 -->
<div class="page1">
<!---->
<!---->
<div class="mc">
<div class="mc_in">
<p>送出/收到万圣福袋</p>
<p class="p2">可解玩法</p>
<p>送出/收到萬聖福袋</p>
<p class="p2">可解玩法</p>
<div class="but">去完成</div>
</div>
</div>
<!-- 面主切 -->
<!-- 面主切 -->
<div class="tab">
<div class="tab tab1 active1"></div>
<div class="tab tab2"></div>
</div>
<!--玩法切 -->
<!--玩法切 -->
<div class="switch">
<div class="active">万圣地图</div>
<div>糖果任</div>
<div class="active">萬聖地圖</div>
<div>糖果任</div>
</div>
<!-- 我的糖果 -->
<div class="myCandy">我的糖果券0</div>
<!-- -->
<!-- -->
<div class="qp">
<p>级宝</p>
<p>限定</p>
<p>級寶</p>
<p>限定</p>
</div>
<!-- 糖果标题 -->
<!-- 糖果標題 -->
<img src="./images/candyTitle.png" alt="" class="candytitle">
<!-- 展示-->
<!-- 展示-->
<img src="./images/box3.png" alt="" class="showBox">
<!-- 箱三 -->
<div class="boxs boxs1"><b>级宝</b></div>
<div class="boxs boxs2"><b>级宝</b></div>
<div class="boxs boxs3"><b>级宝</b></div>
<!-- 箱文案 -->
<!-- 箱三 -->
<div class="boxs boxs1"><b>級寶</b></div>
<div class="boxs boxs2"><b>級寶</b></div>
<div class="boxs boxs3"><b>級寶</b></div>
<!-- 箱文案 -->
<img src="./images/boxText.png" alt="" class="boxText">
<!-- 两条线 -->
<!-- 兩條線 -->
<div class="candyLine1"></div>
<div class="candyLine2"></div>
<!--图路线 -->
<!--圖路線 -->
<div class="road">
<!---->
<img src="./images/gui.png" alt="" class="gui">
<!-- 静态宝-->
<!-- 靜態寶-->
<img src="./images/box1.png" alt="" class="boxImg boxImg1 boxImgs4">
<img src="./images/box1.png" alt="" class="boxImg boxImg2 boxImgs8">
<img src="./images/box1.png" alt="" class="boxImg boxImg3 boxImgs13">
@@ -84,7 +84,7 @@
<img src="./images/box1.png" alt="" class="boxImg boxImg5 boxImgs22">
<img src="./images/box1.png" alt="" class="boxImg boxImg6 boxImgs26">
<img src="./images/box1.png" alt="" class="boxImg boxImg7 boxImgs30">
<!-- 宝箱动-->
<!-- 寶箱動-->
<div class="boxImgSvgaA boxImgSvga1">
<div class="boxImgSvga_in1"></div>
</div>
@@ -97,46 +97,46 @@
</div>
<!-- 骰子 -->
<div class="diceBox">
<!-- -->
<!-- -->
<img src="./images/diceQP.png" alt="" class="diceQP">
<!-- 效骰子 -->
<!-- 效骰子 -->
<div class="diceSvga"></div>
<!-- 骰子 -->
<img src="./images/dice1.png" alt="" class="dice">
<div class="diceLeftBut">宝箱开启记录</div>
<div class="diceRightBut">亮全部</div>
<p>消耗糖果券*1</p>
<div class="diceLeftBut">寶箱開啟記錄</div>
<div class="diceRightBut">亮全部</div>
<p>單次消耗糖果券*1</p>
</div>
</div>
<!-- pages2 -->
<div class="page2">
<!-- 面主切 -->
<!-- 面主切 -->
<div class="tab">
<div class="tab tab1 active1"></div>
<div class="tab tab2"></div>
</div>
<!--玩法切 -->
<!--玩法切 -->
<div class="switch">
<div>万圣地图</div>
<div class="active">糖果任</div>
<div>萬聖地圖</div>
<div class="active">糖果任</div>
</div>
<!-- 文案 -->
<img src="./images/taskText.png" alt="" class="taskText">
<!--务标题 -->
<!--務標題 -->
<img src="./images/taskTitle.png" alt="" class="taskTitle">
<!-- 我的糖果 -->
<div class="myCandy">我的糖果券0</div>
<!-- 每日任 -->
<!-- 每日任 -->
<img src="./images/dayTask.png" alt="" class="dayTask">
<!--环任务 -->
<!--環任務 -->
<img src="./images/alltask.png" alt="" class="alltask">
<!--务列表 -->
<!--務列錶 -->
<div class="task task1">
<p>录活动页(0/1)</p>
<p>錄活動頁(0/1)</p>
<div class="but">去完成</div>
</div>
<div class="task task2">
<p>在任意直播停留</p>
<p>在任意直播停留</p>
<div class="lineBox">
<div class="line">0/90</div>
@@ -146,43 +146,43 @@
<b class="b1">+1糖果券</b>
<b class="b2">+1糖果券</b>
<b class="b3">+1糖果券</b>
<b class="b4">30分</b>
<b class="b5">60分</b>
<b class="b6">90分</b>
<b class="b4">30分</b>
<b class="b5">60分</b>
<b class="b6">90分</b>
</div>
<div class="but">去完成</div>
</div>
<div class="task task3">
<p>每送出一个魔法宝箱获得 <i>糖果券*1</i></p>
<b>今日已<i>0</i></b>
<p>累计投入满1000钻石获得<i>糖果券*1</i></p>
<b>今日已<i>0</i></b>
<div class="but">去完成</div>
</div>
<div class="task task4">
<p>每送出万圣礼物100钻获得 <i>糖果券*1</i></p>
<b>今日已<i>0</i></b>
<p>每送出万圣限定礼物满1000钻获得 <i>糖果券*1</i></p>
<b>今日已<i>0</i></b>
<div class="but">去完成</div>
</div>
</div>
<!-- page3 -->
<div class="page3">
<!-- 面主切 -->
<!-- 面主切 -->
<div class="tab">
<div class="tab tab1 "></div>
<div class="tab tab2 active2"></div>
</div>
<!--玩法切 -->
<!--玩法切 -->
<div class="listTab">
<div class="active">尖叫榜</div>
<div>喜榜</div>
<div>喜榜</div>
</div>
<!-- 规则icon -->
<div class="rule_icon">单奖励></div>
<!-- 日榜榜切 -->
<!-- 規則icon -->
<div class="rule_icon">單獎勵></div>
<!-- 日榜榜切 -->
<div class="dayTab">
<div class="active">日榜</div>
<div></div>
<div></div>
</div>
<!--单标题 -->
<!--單標題 -->
<img src="./images/listTitle1.png" alt="" class="listTitle">
<!-- 日期 -->
<div class="time">
@@ -199,21 +199,21 @@
<img src="./images/noBg1.png" alt="" class="noBg">
<img src="./images/no1.png" alt="" class="noImg">
<img src="./images/logo.png" alt="" class="tx">
<p>名字</p>
<p>名字</p>
<b>尖叫值xxx</b>
</div>
<div class="no2">
<img src="./images/noBg2.png" alt="" class="noBg">
<img src="./images/no2.png" alt="" class="noImg">
<img src="./images/logo.png" alt="" class="tx">
<p>名字</p>
<p>名字</p>
<b>尖叫值xxx</b>
</div>
<div class="no3">
<img src="./images/noBg3.png" alt="" class="noBg">
<img src="./images/no3.png" alt="" class="noImg">
<img src="./images/logo.png" alt="" class="tx">
<p>名字</p>
<p>名字</p>
<b>尖叫值xxx</b>
</div>
</div>
@@ -226,7 +226,7 @@
<div class="score">尖叫值:0</div>
</li>
</ul>
<!-- 自己榜 -->
<!-- 自己榜 -->
<div class="my">
<div class="li">
<div class="num">4</div>
@@ -236,43 +236,43 @@
</div>
</div>
</div>
<!--动规则 -->
<!--動規則 -->
<div class="rule">
<div class="rule_in">
<div class="cen">
<p>
一、活动时间<br>
一、活動時間<br>
2023年10月28日12:00:00-2023年11月2日23:59:59
</p>
<p>二、物上新:<br>
动期间将限时上架5款万圣新限定1款万圣限定福袋</p>
<p>三、活攻略<br>
万圣地图<br>
1.送出≥1的万圣限定福袋解锁万圣地图<br>
2.收到≥5的万圣限定福袋解锁万圣地图<br>
3.地图升级详情查看升级条件和奖励内<br>
4.行走到箱位置可获得奖励,非箱位置无奖励,若好走到起也可以获得奖励<br>
糖果任<br>
1.活动期间完成每日任和循环任务领取糖果券;<br>
2.每日任务0点刷新,完成后进入活动页领取奖励<br>
3.任完成,任务奖励自动发放;</p>
<p>二、物上新:<br>
動期間將限時上架5款萬聖新限定1款萬聖限定福袋</p>
<p>三、活攻略<br>
萬聖地圖<br>
1.送出≥1的萬聖限定福袋解鎖萬聖地圖<br>
2.收到≥5的萬聖限定福袋解鎖萬聖地圖<br>
3.地圖升級詳情查看升級條件和獎勵內<br>
4.行走到箱位置可獲得獎勵,非箱位置無獎勵,若好走到起也可獲得獎勵<br>
糖果任<br>
1.活動期間完成每日任和循環任務領取糖果券;<br>
2.每日任務0點刷新,完成後進入活動頁領取獎勵<br>
3.任完成,任務獎勵自動發放;</p>
<p>四、万圣榜单<br>
喜榜:<br>
1.活动期间内,收到普通物可增加喜值1鑽=1喜值,收到万圣限定物1鑽=3喜值;<br>
2.普通物包含物面和背包物;<br>
3.大头号不参与榜单活动排名;<br>
4.靓号奖励A≠B≠C≠0不可转赠,请联系客服取;<br>
<p>四、萬聖榜單<br>
喜榜:<br>
1.活動期間內,收到普通物可增加喜值1鑽=1喜值,收到萬聖限定物1鑽=3喜值;<br>
2.普通物包含物面和背包物;<br>
3.大頭號不參與榜單活動排名;<br>
4.靚號獎勵A≠B≠C≠0不可轉贈,請聯繫客服取;<br>
尖叫榜<br>
1.活动期间内,赠送普通物可增加尖叫值1鑽=1尖叫值赠送万圣限定物1鑽=3尖叫值<br>
2.普通物包含物面和背包物;<br>
3.大头号不参与榜单活动排名;<br>
4.靓号奖励A≠B≠C≠0不可转赠,请联系客服取;<br></p>
<p>本活动最终解释权归音萌所有,本活以及奖励与苹果公司无关;</p>
1.活動期間內,贈送普通物可增加尖叫值1鑽=1尖叫值贈送萬聖限定物1鑽=3尖叫值<br>
2.普通物包含物面和背包物;<br>
3.大頭號不參與榜單活動排名;<br>
4.靚號獎勵A≠B≠C≠0不可轉贈,請聯繫客服取;<br></p>
<p>五、本活動最終解釋權歸Piko所有,本活以及獎勵與Google/蘋果公司無關</p>
</div>
</div>
</div>
<!--单规则 -->
<!--單規則 -->
<div class="listRule">
<div class="listRule_in">
<img src="./images/listRuletitle1.png" alt="" class="listRuletitle">
@@ -281,47 +281,47 @@
</div>
</div>
</div>
<!--级中级高级宝箱弹-->
<!--級中級高級寶箱彈-->
<div class="box_pub">
<div class="box_pub_in">
<img src="./images/box_pub_Title1.png" alt="" class="box_pub_Title">
<p class="p1">动期间送出万圣福袋*1</p>
<p class="p1">動期間送出萬聖福袋*1</p>
<p class="p2"></p>
<p class="p3">动期间收到万圣福袋*5</p>
<p class="p3">動期間收到萬聖福袋*5</p>
<ul class="box_pub_ul">
<!-- <li>
<img src="./images/logo.png" alt="" class="gift">
<p>黑猫恋人头饰</p>
<p>黑貓戀人頭飾</p>
<b>(30天)</b>
</li> -->
<li class="li1"></li>
</ul>
</div>
</div>
<!-- 恭喜获得弹-->
<!-- 恭喜獲得彈-->
<div class="gx">
<div class="gx_in">
<ul class="gxBox">
<li>
<img src="./images/logo.png" alt="" class="gift">
<p>xxx头饰*1天</p>
<p>xxx頭飾*1天</p>
</li>
</ul>
<div class="but">收下</div>
</div>
</div>
<!--动规则 -->
<!--動结束 -->
<div class="endActivity">
<div class="endActivity_in">
<p>该活动已结</p>
<div class="but">查看榜</div>
<p>該活動已結</p>
<div class="but">查看榜</div>
</div>
</div>
<!-- 糟糕未获得奖励 -->
<!-- 糟糕未獲得獎勵 -->
<div class="zg">
<img src="./images/zg.png" alt="" class="zg_in">
</div>
<!-- 宝箱记录 -->
<!-- 寶箱記錄 -->
<div class="record_box">
<div class="record_box_in">
<ul>
@@ -330,7 +330,7 @@
<p>2023/10/23</p>
<b>23:45:05</b>
</div>
<div class="right">xxxx物*1</div>
<div class="right">xxxx物*1</div>
</li>
</ul>
</div>

View File

@@ -4,9 +4,11 @@ let env = EnvCheck();
if (env == 'test') {
new VConsole();
}
// 封装layer消息提醒框
var formalUrl = 'https://api.hfighting.com'; // 正式环境
var testUrls = 'http://beta.api.pekolive.com'; // 测试环境
// 封裝layer消息提醒框
let layerIndex
const showLoading = (content = '加中...') => {
const showLoading = (content = '加中...') => {
layer.open({
type: 2,
shadeClose: false,
@@ -28,24 +30,24 @@ const toastMsg = (content = '操作完成', time = 2) => {
}
var leftArr = ['3.6rem', '2.5rem', '1.4rem', '0.3rem', '0.3rem', '0.3rem', '1.4rem', '2.5rem', '2.5rem', '2.5rem', '1.4rem', '0.3rem', '0.3rem', '0.3rem', '0.3rem', '1.4rem', '2.5rem', '2.5rem', '3.6rem', '4.7rem', '4.7rem', '5.8rem', '6.9rem', '6.9rem', '6.9rem', '5.8rem', '5.8rem', '5.8rem', '6.9rem', '6.9rem', '6.9rem', '5.8rem', '4.7rem', '3.6rem'];
var bottArr = ['0.9rem', '0.9rem', '0.9rem', '0.9rem', '2.0rem', '3.1rem', '3.1rem', '3.1rem', '4.3rem', '5.6rem', '5.6rem', '5.6rem', '6.7rem', '7.8rem', '9.1rem', '9.1rem', '9.1rem', '7.8rem', '7.8rem', '7.8rem', '9.1rem', '9.1rem', '9.1rem', '7.8rem', '6.7rem', '6.7rem', '5.6rem', '4.3rem', '4.3rem', '3.1rem', '2.0rem', '2.0rem', '2.0rem', '2.0rem'];
var curDate; //天日期;
var rankType = 1; //排行榜1=送日榜2=送礼总3=收日榜4=收礼总榜);
var data = null;//默日榜;
var isEndTime = null;//判是否活动结束;
var roomUid = null;//房uid;
var type = 'a';//a:送b:收;
var type2 = 'a';//a:日榜b:榜;
var page = 1;//页码
var drawPageSizeLack = true;//记录滑动锁
var poolType = null;//箱等
var mapPos = null;//前格子下
var drawLock = true;//抽奖的锁
var curDate; //天日期;
var rankType = 1; //排行榜1=送日榜2=送禮總3=收日榜4=收禮總榜);
var data = null;//默日榜;
var isEndTime = null;//判是否活動結束;
var roomUid = null;//房uid;
var type = 'a';//a:送b:收;
var type2 = 'a';//a:日榜b:榜;
var page = 1;//頁碼
var drawPageSizeLack = true;//記錄滑動鎖
var poolType = null;//箱等
var mapPos = null;//前格子下
var drawLock = true;//抽獎的鎖
var candyNum = 0;//糖果卷
// 初始化函
// 初始化函
$(function () {
getInfoFromClient()
setTimeout(function () {
// 面全屏
// 面全屏
if (browser.app) {
if (browser.android) {
window.androidJsObj.initShowNav(false)
@@ -53,7 +55,7 @@ $(function () {
window.webkit.messageHandlers.initShowNav.postMessage(0)
}
};
// 部返回事件
// 部返回事件
$('.back').click(() => {
if (browser.android) {
window.androidJsObj.closeWebView()
@@ -61,7 +63,7 @@ $(function () {
window.webkit.messageHandlers.closeWebView.postMessage(null)
}
})
// 礼物轮
// 禮物輪
var mySwiper = new Swiper('.swiper', {
// direction: "vertical",
loop: true,
@@ -75,7 +77,7 @@ $(function () {
getConfig();
}, 100)
})
// 取房Uid接口
// 取房Uid接口
function getRecommendRoom () {
showLoading()
networkRequest({
@@ -91,11 +93,11 @@ function getRecommendRoom () {
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重')
toastMsg('網絡錯誤,請退出重')
}
})
}
// 抽配置接口
// 抽配置接口
function getConfig () {
// showLoading()
networkRequest({
@@ -103,21 +105,21 @@ function getConfig () {
url: urlPrefix + '/act/2023Halloween/draw/getConfig',
success (res) {
if (res.code === 200) {
// 理糖果
// 理糖果
$('.myCandy').text('我的糖果券:' + res.data.candyNum);
candyNum = res.data.candyNum;
// 前格子下
// 前格子下
mapPos = res.data.mapPos;
$('.page1 .road .gui').css({
left: leftArr[res.data.mapPos],
bottom: bottArr[res.data.mapPos],
})
// 判断活动结束时间
// 判斷活動結束時間
if (res.timestamp > res.data.endTime) {
isEndTime = true;
$('.endActivity').show();
}
// 判断等级处
// 判斷等級處
poolType = res.data.boxLevel;
if (res.data.boxLevel == 0) {
$('.page1 .mc').show();
@@ -134,12 +136,12 @@ function getConfig () {
$('.page1 .boxs3').addClass('boxOpen3');
$('.page1 .road .boxImg').attr('src', './images/box3.png');
}
// 特效移
// 特效移
$('.page1 .road .gui').css({
left: leftArr[mapPos],
bottom: bottArr[mapPos],
})
// 判断当前位置是否处于宝箱点
// 判斷當前位置是否處於寶箱點
if (mapPos == 4 || mapPos == 8 || mapPos == 13 || mapPos == 18 || mapPos == 22 || mapPos == 26 || mapPos == 30) {
$(`.page1 .road .boxImgs${mapPos}`).attr('src', `./images/boxOpen${poolType}.png`)
} else {
@@ -152,11 +154,11 @@ function getConfig () {
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重')
toastMsg('網絡錯誤,請退出重')
}
})
}
// 任配置接口
// 任配置接口
function getTaskConfig () {
showLoading()
networkRequest({
@@ -164,22 +166,22 @@ function getTaskConfig () {
url: urlPrefix + '/act/2023Halloween/task/getConfig',
success (res) {
if (res.code === 200) {
// 理每日任
// 理每日任
res.data.dailyTaskList.forEach((res, i) => {
$(`.page2 .task${i + 1} .but`).attr('click', res.status);
$(`.page2 .task${i + 1} .but`).text(res.status == 0 ? '去完成' : '已完成');
res.status == 1 ? $(`.page2 .task${i + 1} .but`).addClass('butActive') : $(`.page2 .task${i + 1} .but`).removeClass('butActive');
if (i == 0) {
$('.page2 .task1 p').text(`录活动页(${res.cur}/${res.need})`);
$('.page2 .task1 p').text(`錄活動頁(${res.cur}/${res.need})`);
}
if (i == 1) {
$('.page2 .task2 .line').css('width', `${(res.cur / res.need * 100) >= 100 ? 100 : (res.cur / res.need * 100)}%`);
$('.page2 .task2 .line').text(`${res.cur}/${res.need}`);
}
});
// 理循环任务
// 理循環任務
res.data.loopTaskList.forEach((res, i) => {
$(`.page2 .task${i + 3} b i`).text(`${res.loop}`);
$(`.page2 .task${i + 3} b i`).text(`${res.loop}`);
$(`.page2 .task${i + 3} .but`).attr('click', res.status);
$(`.page2 .task${i + 3} .but`).text(res.status == 0 ? '去完成' : '已完成');
res.status == 1 ? $(`.page2 .task${i + 3} .but`).addClass(`butActive`) : $(`.page2 .task${i + 3} .but`).removeClass(`butActive`);
@@ -191,11 +193,11 @@ function getTaskConfig () {
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重')
toastMsg('網絡錯誤,請退出重')
}
})
}
// 任务按钮2
// 任務按鈕2
$('.page2 .task2 .but').click(function () {
var bool = $(this).attr('click') == 0 ? false : true;
console.log(bool);
@@ -210,22 +212,28 @@ $('.page2 .task2 .but').click(function () {
}
}
})
// 任务按钮3
// 任務按鈕3
$('.page2 .task3 .but').click(function () {
var bool = $(this).attr('click') == 0 ? false : true;
console.log(bool);
if (bool) {
return
}
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);
}
// 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);
// }
// }
if (env == 'test') {
window.location.href = `${testUrls}/peko/activity/act-ocean/index.html`
} else {
window.location.href = `${formalUrl}/peko/activity/act-ocean/index.html`
}
})
// 任务按钮4
// 任務按鈕4
$('.page2 .task4 .but').click(function () {
var bool = $(this).attr('click') == 0 ? false : true;
console.log(bool);
@@ -240,18 +248,18 @@ $('.page2 .task4 .but').click(function () {
}
}
})
// 点击宝箱按
// 點擊寶箱按
$('.page1 .boxs').click(function () {
var i = $(this).index() - 6;
if (i == 1) {
$('.box_pub .box_pub_in .p1').text('活动期间送出万圣福袋*1');
$('.box_pub .box_pub_in .p3').text('活动期间收到万圣福袋*5');
$('.box_pub .box_pub_in .p1').text('活動期間送出萬聖福袋*1');
$('.box_pub .box_pub_in .p3').text('活動期間收到萬聖福袋*5');
} else if (i == 2) {
$('.box_pub .box_pub_in .p1').text('活动期间送出万圣福袋*10');
$('.box_pub .box_pub_in .p3').text('活动期间收到万圣福袋*20');
$('.box_pub .box_pub_in .p1').text('活動期間送出萬聖福袋*10');
$('.box_pub .box_pub_in .p3').text('活動期間收到萬聖福袋*20');
} else {
$('.box_pub .box_pub_in .p1').text('活动期间送出万圣福袋*20');
$('.box_pub .box_pub_in .p3').text('活动期间收到万圣福袋*30');
$('.box_pub .box_pub_in .p1').text('活動期間送出萬聖福袋*20');
$('.box_pub .box_pub_in .p3').text('活動期間收到萬聖福袋*30');
}
$('.box_pub .box_pub_in .box_pub_ul li').removeClass('li1').removeClass('li2').removeClass('li3');
$('.box_pub .box_pub_in .box_pub_ul li').addClass(`li${i}`);
@@ -259,7 +267,7 @@ $('.page1 .boxs').click(function () {
$('.box_pub').show();
bodyScroolFun(true);
})
// 去完成箱解锁任务按钮
// 去完成箱解鎖任務按鈕
$('.page1 .mc .mc_in .but').click(function () {
if (browser.ios) {
window.webkit.messageHandlers.openRoomForGiftId.postMessage(JSON.stringify({ uid: roomUid, giftId: 0 }))
@@ -269,7 +277,7 @@ $('.page1 .mc .mc_in .but').click(function () {
}
}
})
// tab切
// tab切
$('.tab div').click(function () {
var i = $(this).index() + 1;
$('.page1,.page2,.page3').hide();
@@ -281,7 +289,7 @@ $('.tab div').click(function () {
$('.page3').show();
}
})
// 地图任务tab切
// 地圖任務tab切
$('.switch div').click(function () {
var i = $(this).index() + 1;
$('.page1,.page2,.page3').hide();
@@ -294,7 +302,7 @@ $('.switch div').click(function () {
getTaskConfig();
}
})
// 尖叫喜榜单切换
// 尖叫喜榜單切換
$('.page3 .listTab div').click(function () {
var i = $(this).index() + 1;
$('.page3 .listTitle').attr('src', `./images/listTitle${i}.png`);
@@ -310,7 +318,7 @@ $('.page3 .listTab div').click(function () {
}
getRank(rankType, data);
})
// 日榜榜切
// 日榜榜切
$('.page3 .dayTab div').click(function () {
var i = $(this).index() + 1;
$(this).addClass('active').siblings().removeClass('active');
@@ -325,16 +333,16 @@ $('.page3 .dayTab div').click(function () {
}
getRank(rankType, data);
})
// 日榜切日期
// 日榜切日期
$('.page3 .time div').click(function () {
var datas = $(this).attr('data');
$(this).addClass('active').siblings().removeClass('active');
rankType = type == "a" ? 1 : 3;//排行榜1=甜蜜日榜2=甜蜜3=意日榜4=爱意总榜)
rankType = type == "a" ? 1 : 3;//排行榜1=甜蜜日榜2=甜蜜3=意日榜4=愛意總榜)
data = datas;
getRank(rankType, data);
})
// 榜接口
function getRank (rankType, date) {//排行榜型rankType1=送日榜2=送礼总3=收日榜4=收礼总榜)
// 榜接口
function getRank (rankType, date) {//排行榜型rankType1=送日榜2=送禮總3=收日榜4=收禮總榜)
$('.page3 .lists li').remove();
showLoading()
networkRequest({
@@ -343,9 +351,9 @@ function getRank (rankType, date) {//排行榜类型rankType1=送礼日榜,
data: { rankType, date },
success (res) {
if (res.code === 200) {
// 设置当天日期
// 設置當天日期
curDate = res.data.curDate;
// 理日期
// 理日期
if (res.data.dateList) {
res.data.dateList.forEach((res, i) => {
$('.page3 .time div').eq(i).text(`${res[5]}${res[6]}.${res[8]}${res[9]}`);
@@ -356,18 +364,18 @@ function getRank (rankType, date) {//排行榜类型rankType1=送礼日榜,
}
})
}
// 理自己榜
// 理自己榜
$('.page3 .my .li .tx').attr('src', res.data.meRank.avatar);
$('.page3 .my .li .num').text(res.data.meRank.ranking == 0 ? '未上榜' : res.data.meRank.ranking);
$('.page3 .my .li .nick').text(res.data.meRank.nick);
$('.page3 .my .li .score').text(`${rankType == 1 || rankType == 2 ? "尖叫值:" : "喜值:"}${unitProcessing(res.data.meRank.score, 10000, 1, 'w')}`);
// 理前三
$('.page3 .my .li .score').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: '位以待',
nick: '位以待',
score: "0"
})
top3.push(...arr)
@@ -375,7 +383,7 @@ function getRank (rankType, date) {//排行榜类型rankType1=送礼日榜,
top3.forEach((res, index) => {
$(`.page3 .topBox .no${index + 1} .tx`).attr('src', res.avatar);
$(`.page3 .topBox .no${index + 1} p`).text(res.nick);
$(`.page3 .topBox .no${index + 1} b`).text(`${rankType == 1 || rankType == 2 ? "尖叫值:" : "喜值:"}${unitProcessing(res.score, 10000, 1, 'w')}`);
$(`.page3 .topBox .no${index + 1} b`).text(`${rankType == 1 || rankType == 2 ? "尖叫值:" : "喜值:"}${unitProcessing(res.score, 10000, 1, 'w')}`);
})
// 非前三
var str = '';
@@ -385,7 +393,7 @@ function getRank (rankType, date) {//排行榜类型rankType1=送礼日榜,
<div class="num">${res.ranking}</div>
<img src="${res.avatar}" alt="" class="tx">
<div class="nick">${res.nick}</div>
<div class="score">${rankType == 1 || rankType == 2 ? "尖叫值:" : "喜值:"}${unitProcessing(res.score, 10000, 1, 'w')}</div>
<div class="score">${rankType == 1 || rankType == 2 ? "尖叫值:" : "喜值:"}${unitProcessing(res.score, 10000, 1, 'w')}</div>
</li>
`
})
@@ -397,59 +405,59 @@ function getRank (rankType, date) {//排行榜类型rankType1=送礼日榜,
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重')
toastMsg('網絡錯誤,請退出重')
}
})
}
// 打开活动规则
// 打開活動規則
$('.header .rule_icon').click(function () {
$('.rule').show();
bodyScroolFun(true);
})
// 关闭活动规则
// 關閉活動規則
$('.rule').click(function () {
$('.rule').hide();
bodyScroolFun(false);
})
// 打开榜单规则
// 打開榜單規則
$('.page3 .rule_icon').click(function () {
$('.listRule').show();
bodyScroolFun(true);
})
// 关闭榜单规则
// 關閉榜單規則
$('.listRule').click(function () {
$('.listRule').hide();
bodyScroolFun(false);
})
// 关闭初中高宝箱弹
// 關閉初中高寶箱彈
$('.box_pub').click(function () {
$('.box_pub').hide();
bodyScroolFun(false);
})
// 关闭恭喜获得弹
// 關閉恭喜獲得彈
$('.gx .gx_in .but').click(function () {
drawLock = true;
$('.gx').hide();
bodyScroolFun(false);
})
// 关闭糟糕
// 關閉糟糕
$('.zg').click(function () {
drawLock = true;
$('.zg').hide();
bodyScroolFun(false);
})
// 关闭宝箱记录弹
// 關閉寶箱記錄彈
$('.record_box').click(function () {
$('.record_box').hide();
bodyScroolFun(false);
})
// 打开宝箱记录
// 打開寶箱記錄
$('.page1 .diceBox .diceLeftBut').click(function () {
page = 1;
$('.record_box .record_box_in ul li').remove();
pageRecord(page);
})
// 取房Uid接口
// 取房Uid接口
function pageRecord (page) {
showLoading()
networkRequest({
@@ -489,17 +497,17 @@ function pageRecord (page) {
error (err) {
drawPageSizeLack = true;
hideLoading(layerIndex)
toastMsg('网络错误,请退出重')
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("到底部了");
console.log("到底部了");
if (drawPageSizeLack) {
drawPageSizeLack = false;
page++;
@@ -507,7 +515,7 @@ $(".duihuanBg .dividerecordsBg_in .ul").scroll(function () {
}
}
});
// 骰子动画定义
// 骰子動畫定義
let player = new SVGA.Player('.diceSvga');
let parser = new SVGA.Parser('.diceSvga');
parser.load(`./images/sz.svga`, function (videoItem) {
@@ -517,7 +525,7 @@ parser.load(`./images/sz.svga`, function (videoItem) {
player.startAnimation();
player.setContentMode('AspectFill');
})
// 骰子动画函数
// 骰子動畫函數
function diceSvga () {
$('.page1 .diceBox .diceSvga').show();
$('.page1 .diceBox .dice').hide();
@@ -533,7 +541,7 @@ function diceSvga () {
})
})
}
// 骰子按
// 骰子按
$('.page1 .diceBox .dice').click(function () {
if (drawLock) {
if (candyNum < 1) {
@@ -553,7 +561,7 @@ $('.page1 .diceBox .diceRightBut').click(function () {
draw(poolType, null);
}
})
// 活动结束按
// 活動結束按
$('.endActivity .endActivity_in .but').click(function () {
$('.endActivity').hide();
bodyScroolFun(false);
@@ -561,7 +569,7 @@ $('.endActivity .endActivity_in .but').click(function () {
getRank(rankType, data);
$('.page3').show();
})
// 宝箱开奖动画定义
// 寶箱開獎動畫定義
let boxBig1 = new SVGA.Player('.boxImgSvga_in1');
let boxBigParser1 = new SVGA.Parser('.boxImgSvga_in1');
boxBigParser1.load(`./images/boxBig1.svga`, function (videoItem) {
@@ -571,7 +579,7 @@ boxBigParser1.load(`./images/boxBig1.svga`, function (videoItem) {
boxBig1.startAnimation();
boxBig1.setContentMode('AspectFill');
})
// 宝箱开奖动画函数
// 寶箱開獎動畫函數
function boxBigSvga1 () {
$('.boxImgSvgaA').show();
boxBigParser1.load(`./images/boxBig1.svga`, function (videoItem) {
@@ -586,7 +594,7 @@ function boxBigSvga1 () {
})
})
}
// 宝箱开奖动画定义
// 寶箱開獎動畫定義
let boxBig2 = new SVGA.Player('.boxImgSvga_in2');
let boxBigParser2 = new SVGA.Parser('.boxImgSvga_in2');
boxBigParser2.load(`./images/boxBig2.svga`, function (videoItem) {
@@ -596,7 +604,7 @@ boxBigParser2.load(`./images/boxBig2.svga`, function (videoItem) {
boxBig2.startAnimation();
boxBig2.setContentMode('AspectFill');
})
// 宝箱开奖动画函数
// 寶箱開獎動畫函數
function boxBigSvga2 () {
$('.boxImgSvgaB').show();
boxBigParser2.load(`./images/boxBig2.svga`, function (videoItem) {
@@ -611,7 +619,7 @@ function boxBigSvga2 () {
})
})
}
// 宝箱开奖动画定义
// 寶箱開獎動畫定義
let boxBig3 = new SVGA.Player('.boxImgSvga_in3');
let boxBigParser3 = new SVGA.Parser('.boxImgSvga_in3');
boxBigParser2.load(`./images/boxBig3.svga`, function (videoItem) {
@@ -621,7 +629,7 @@ boxBigParser2.load(`./images/boxBig3.svga`, function (videoItem) {
boxBig3.startAnimation();
boxBig3.setContentMode('AspectFill');
})
// 宝箱开奖动画函数
// 寶箱開獎動畫函數
function boxBigSvga3 () {
$('.boxImgSvgaC').show();
boxBigParser2.load(`./images/boxBig3.svga`, function (videoItem) {
@@ -636,7 +644,7 @@ function boxBigSvga3 () {
})
})
}
// 抽接口
// 抽接口
function draw (poolType, num) {
drawLock = false;
showLoading()
@@ -646,7 +654,7 @@ function draw (poolType, num) {
data: { poolType, num },
success (res) {
if (res.code === 200) {
// 判是否全部投入或次投入
// 判是否全部投入或次投入
if (num != null) {
diceSvga();
setTimeout(function () {
@@ -664,7 +672,7 @@ function draw (poolType, num) {
} else {
drawOut(res, 0, poolType);
}
// 置步
// 置步
$('.page1 .diceBox .dice').attr('src', `./images/dice${res.data.step.length}.png`);
} else if (res.code == 4000) {
toastMsg(res.message);
@@ -679,19 +687,19 @@ function draw (poolType, num) {
error (err) {
drawLock = true;
hideLoading(layerIndex)
toastMsg('网络错误,请退出重')
toastMsg('網絡錯誤,請退出重')
}
})
}
// 中或未中渲染
// 中或未中渲染
function drawOut (res, time, poolType) {
//判是否中
//判是否中
if (res.data.hasReward) {
// 渲染中奖列表<p>xxx头饰*1天</p>
// 渲染中獎列錶<p>xxx頭飾*1天</p>
var str = '';
$('.gx .gx_in .gxBox li').remove();
res.data.rewardList.forEach((res, i) => {
// 1头饰234座5物;
// 1頭飾234座5物;
str += `
<li>
<img src="${res.pic}" alt="" class="gift ${res.type == 1 ? 'ts' : res.type == 2 ? 'mp' : res.type == 3 ? 'qp' : res.type == 4 ? 'zj' : 'lw'}">
@@ -715,7 +723,7 @@ function drawOut (res, time, poolType) {
}
bodyScroolFun(true);
}
//返回面 重新求接口
//返回面 重新求接口
var hiddenProperty = 'hidden' in document ? 'hidden' :
'webkitHidden' in document ? 'webkitHidden' :
'mozHidden' in document ? 'mozHidden' : null;