Compare commits

...

31 Commits

Author SHA1 Message Date
Dragon
5c042369fc 修复榜单 2023-08-19 00:17:33 +08:00
Dragon
269415685d 替换规则 2023-08-18 23:57:46 +08:00
Dragon
abd8deec4c 修改榜单奖励 2023-08-18 23:43:56 +08:00
Dragon
95416c0ef0 修复榜单溢出问题 2023-08-18 19:38:02 +08:00
Dragon
b4fdf87984 修改万单位判断条件 2023-08-18 19:37:59 +08:00
Dragon
b03374eddb 修改小时榜单 2023-08-18 19:37:57 +08:00
Dragon
b650b04101 修复时间格式 2023-08-18 19:37:55 +08:00
Dragon
6619db011d 替换榜单规则 2023-08-18 19:37:53 +08:00
Dragon
5c9597188f 替换图片 2023-08-18 19:37:51 +08:00
Dragon
4d49228ea6 取消限制连点抽奖 2023-08-18 19:37:46 +08:00
Dragon
7c0ec3a053 修复动效和榜单bug 2023-08-18 19:37:43 +08:00
Dragon
4f5a4bd2f1 修复bug 2023-08-18 19:37:40 +08:00
Dragon
b4e5279dd1 修复bug 2023-08-18 19:37:36 +08:00
Dragon
f00ef26431 替换为繁体 2023-08-18 19:37:30 +08:00
Dragon
660cbde145 完成所有接口联调 2023-08-18 19:37:27 +08:00
Dragon
bdf9d34ea7 暂存,仅剩第一个tab接口 2023-08-18 19:37:23 +08:00
Dragon
5a695caac4 暂存情缘榜 2023-08-18 19:37:19 +08:00
Dragon
f26364ffef 联调鹊桥接口动效以及房间榜接口 2023-08-18 19:37:17 +08:00
Dragon
9c3a66300e 完成七夕所有静态页面 2023-08-18 19:37:13 +08:00
Dragon
b6fe002a9f 暂存 2023-08-18 19:36:54 +08:00
Dragon
a41ff15608 暂存七夕 2023-08-18 19:36:51 +08:00
Dragon
579a25a047 暂存 2023-08-18 19:36:46 +08:00
Dragon
b13763b0b3 暂存 2023-08-18 19:36:42 +08:00
Dragon
9e82ab9cfc 暂存 2023-08-18 19:36:39 +08:00
Dragon
779dddffc8 暂存 2023-08-18 19:36:34 +08:00
Dragon
ac7a7b51d3 转存 2023-08-18 19:36:31 +08:00
Dragon
e2595fbb11 暂存 2023-08-18 19:36:25 +08:00
Dragon
edd003ceb4 暂存七夕互动 2023-08-18 19:36:21 +08:00
Dragon
06d2f79d49 修改未登入code 2023-08-18 19:27:54 +08:00
Dragon
b2b2cbe10d 替换代充图 2023-08-17 18:21:06 +08:00
Dragon
bb48955bc6 更新代充静态图 2023-08-17 16:56:21 +08:00
96 changed files with 5570 additions and 46 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

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.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

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: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

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: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,468 @@
<!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">
<div class="rule">活動規則</div>
<!-- 時間 -->
<div class="titleHeader"></div>
</div>
<!-- 定情信物 -->
<div class="betrothal">
<div class="swiper">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="./images/betrothalbg1.png" alt="">
</div>
<div class="swiper-slide">
<img src="./images/betrothalbg2.png" alt="">
</div>
</div>
</div>
</div>
<!-- tab切換 -->
<div class="tab tabs tab1">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<!-- page1 -->
<div class="page1">
<!-- 福袋展示 -->
<div class="blessingBag">
<div class="blessingBag_in">
<ul>
<li>
<img src="./images/11.png" alt="">
<p>飛上雲霄</p>
<b>177 鉆</b>
</li>
<li>
<img src="./images/2.png" alt="">
<p>情意捲軸</p>
<b>377 鉆</b>
</li>
<li>
<img src="./images/3.png" alt="">
<p>桃花灼灼</p>
<b>1777 鉆</b>
</li>
<li>
<img src="./images/4.png" alt="">
<p>花色漫漫</p>
<b>2777 鉆</b>
</li>
<li>
<img src="./images/5.png" alt="">
<p>相思鳥</p>
<b>13140 鉆</b>
</li>
<li>
<img src="./images/6.png" alt="">
<p>煙火愛戀</p>
<b>27777 鉆</b>
</li>
<li>
<img src="./images/11.png" alt="">
<p>飛上雲霄</p>
<b>177 鉆</b>
</li>
<li>
<img src="./images/2.png" alt="">
<p>情意捲軸</p>
<b>377 鉆</b>
</li>
<li>
<img src="./images/3.png" alt="">
<p>桃花灼灼</p>
<b>1777 鉆</b>
</li>
<li>
<img src="./images/4.png" alt="">
<p>花色漫漫</p>
<b>2777 鉆</b>
</li>
</ul>
</div>
</div>
<!-- 鵲橋 -->
<div class="magpieBridge">
<!-- 左边人物 -->
<img src="./images/leftRen.png" alt="" class="leftRen">
<!-- 右边人物 -->
<img src="./images/rightRen.png" alt="" class="rightRen">
<!-- 背景鵲橋圖 -->
<img src="./images/magpieBridgeBg2.png" alt="" class="magpieBridgeBg">
<!-- 喜鵲動效 -->
<div class="xiques">
<div class="xique"></div>
</div>
<!-- 我的喜鵲 -->
<p class="birdNum">
<img src="./images/bird.png" alt="" class="bird">
<b>我的喜鵲: 0</b>
</p>
<!-- 投放喜鵲*1 -->
<div class="but1">投放喜鵲*1</div>
<!-- 投放喜鵲*10 -->
<div class="but10">投放喜鵲*10</div>
<!-- 領取獎勵 -->
<div class="buting">領取獎勵</div>
<!-- 領取失敗 -->
<div class="buterr">領取獎勵</div>
<!-- 已領取 -->
<div class="butout">已領取</div>
<!-- 文案展示 -->
<p class="text">將喜鵲投入鵲橋,拉近牛郎和織女的距離<br>
鵲橋相會後,參與搭建鵲橋的用戶可領取活動獎勵</p>
<!-- 進度條 -->
<div class="line">
<div class="line_in"></div>
</div>
<!-- 頭飾框 -->
<div class="ts">
<img src="./images/sts.png" alt="" class="">
<b>鵲仙橋頭飾*3天</b>
</div>
</div>
<!-- 每日任務 tasks2-->
<div class="task ">
<div class="tab">
<div></div>
<div></div>
</div>
<div class="box1">
<p class="title">完成每日任務可獲得喜鵲任務每日0點刷新<br>
任務獎勵自動發放</p>
<div class="task1">
<img src="./images/taskIcon.png" alt="">
<div class="but">去完成</div>
<b class="p1">訪問活動頁</b>
<b class="p2">獎勵:喜鵲*5</b>
</div>
<div class="task2">
<img src="./images/taskIcon.png" alt="">
<div class="but">去完成</div>
<b class="p1">任意房間發送彈幕0/3)</b>
<b class="p2">獎勵:喜鵲*5</b>
</div>
<div class="task3">
<img src="./images/taskIcon.png" alt="">
<div class="but">去完成</div>
<b class="p1">在任意直播間停留</b>
<div class="line">
<div class="line_in"></div>
<img src="./images/drop.png" alt="" class="drop1">
<img src="./images/drop.png" alt="" class="drop2">
<span class="sp1">+2喜鵲</span>
<span class="sp2">+3喜鵲</span>
<span class="sp3">+5喜鵲</span>
<span class="sp4">10分鐘</span>
<span class="sp5">20分鐘</span>
<span class="sp6">30分鐘</span>
</div>
</div>
</div>
<div class="box2">
<img src="./images/task2But.png" alt="" class="task2But">
</div>
</div>
</div>
<!-- page2 -->
<div class="page2">
<!-- 祈願樹 -->
<div class="blessingTree">
<!-- 剩余紅繩 -->
<div class="redRope">
<img src="./images/redRopeIcon.png" alt="" class="redRopeIcon">
我的祈願紅繩:<b>0</b>
</div>
<!-- 祈願按鈕 -->
<div class="but"></div>
<p class="introduction">每獲得10隻喜鵲即可自動獲得祈願紅繩*1</p>
<!-- 刷新 -->
<div class="refresh">
<img src="./images/refresh.png" alt="" class="refreshIcon">
換一批
</div>
<!-- 打開燈籠 openLantern-->
<div class="lantern lantern1">
<div class="box">
<img src="" alt="">
<p></p>
<b></b>
</div>
</div>
<div class="lantern lantern2">
<div class="box">
<img src="" alt="">
<p></p>
<b></b>
</div>
</div>
<div class="lantern lantern3">
<div class="box">
<img src="" alt="">
<p></p>
<b></b>
</div>
</div>
<div class="lantern lantern4">
<div class="box">
<img src="" alt="">
<p></p>
<b></b>
</div>
</div>
<!-- 動效 -->
<div class="blessingTreeSvga blessingTreeSvga1">
<div class="blessingTreeSvgaActive blessingTreeSvgaActive1"></div>
</div>
<div class="blessingTreeSvga blessingTreeSvga2">
<div class="blessingTreeSvgaActive blessingTreeSvgaActive2"></div>
</div>
<div class="blessingTreeSvga blessingTreeSvga3">
<div class="blessingTreeSvgaActive blessingTreeSvgaActive3"></div>
</div>
<div class="blessingTreeSvga blessingTreeSvga4">
<div class="blessingTreeSvgaActive blessingTreeSvgaActive4"></div>
</div>
</div>
<!-- 獎池&記錄 blessingTreeBoomt2-->
<div class="blessingTreeBoomt">
<div class="tab">
<div></div>
<div></div>
</div>
<div class="box2">
<div class="title">
<div>獲取時間</div>
<div>獲得獎勵</div>
</div>
<ul>
<li>
<div>
<p>2023/01/18</p>
<i>23:45:234</i>
</div>
<div class="b">
蓮花燈777鉆
</div>
</li>
<li class="active">
<div>
<p>2023/01/18</p>
<i>23:45:234</i>
</div>
<div>
<p>蓮花燈</p>
<b>777鉆</b>
</div>
</li>
</ul>
</div>
</div>
</div>
<!-- page3 -->
<div class="page3">
<!-- 活動規則 -->
<div class="rule">活動規則</div>
<!-- 標題 -->
<img src="./images/title.png" alt="" class="title">
<p class="titleText">贈送普通禮物10鉆石=1情緣值七夕限定禮物10鉆石=3情緣值</p>
<!-- 前三 -->
<div class="no no1">
<img src="./images/no1.png" alt="" class="txBg">
<img src="./images/logo.png" alt="" class="tx">
<p>用戶昵稱</p>
<div>
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值XXX</b>
</div>
</div>
<div class="no no2">
<img src="./images/no2.png" alt="" class="txBg">
<img src="./images/logo.png" alt="" class="tx">
<p>用戶昵稱</p>
<div>
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值XXX</b>
</div>
</div>
<div class="no no3">
<img src="./images/no3.png" alt="" class="txBg">
<img src="./images/logo.png" alt="" class="tx">
<p>用戶昵稱</p>
<div>
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值XXX</b>
</div>
</div>
<!-- 非前三 -->
<ul>
<li>
<div class="num">4</div>
<img src="./images/logo.png" alt="" class="tx">
<div class="name"></div>
<div class="score">
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值XXX</b>
</div>
</li>
</ul>
<!-- 自己榜單 -->
<div class="my">
<div class="num">4</div>
<img src="./images/logo.png" alt="" class="tx">
<div class="name">虛位以待</div>
<div class="score">
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值XXX</b>
</div>
</div>
<!-- 規則彈窗 -->
<div class="roomRule">
<img src="./images/roomRule.png" alt="" class="roomRule_in">
</div>
</div>
<!-- page4 -->
<div class="page4">
<!-- 活動規則 -->
<div class="rule">榜單獎勵</div>
<!-- 相會鵲橋 -->
<div class="loveList">
<img src="./images/left.png" alt="" class="left">
<img src="./images/center.png" alt="" class="center">
<img src="./images/right.png" alt="" class="right">
<img src="./images/logo.png" alt="" class="txL">
<img src="./images/logo.png" alt="" class="txR">
<div class="leftName">虛位以待</div>
<div class="rightName">虛位以待</div>
<p>活動期間每小時甜蜜值第一的主播和最佳助力的用戶</p>
<div class="times">距下一小時一起上榜結果<span>00</span>:<span>00</span></div>
</div>
<!-- tab切換 -->
<div class="page4Tab">
<div></div>
<div></div>
</div>
<!-- 日榜總榜 -->
<div class="dayAll">
<div></div>
<div></div>
</div>
<!-- 禮物值說明 -->
<div class="giftVal">收到普通禮物10鉆石=1甜蜜值七夕限定禮物10鉆石=3甜蜜值</div>
<!-- 日榜時間選擇 -->
<div class="timeList">
<div class=""></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<!-- 前三 -->
<div class="no no1">
<img src="./images/no1.png" alt="" class="txBg">
<img src="./images/logo.png" alt="" class="tx">
<p>用戶昵稱</p>
<div>
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值XXX</b>
</div>
</div>
<div class="no no2">
<img src="./images/no2.png" alt="" class="txBg">
<img src="./images/logo.png" alt="" class="tx">
<p>用戶昵稱</p>
<div>
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值XXX</b>
</div>
</div>
<div class="no no3">
<img src="./images/no3.png" alt="" class="txBg">
<img src="./images/logo.png" alt="" class="tx">
<p>用戶昵稱</p>
<div>
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值XXX</b>
</div>
</div>
<!-- 非前三 -->
<ul>
<li>
<div class="num">4</div>
<img src="./images/logo.png" alt="" class="tx">
<div class="name"></div>
<div class="score">
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值XXX</b>
</div>
</li>
</ul>
<!-- 自己榜單 -->
<div class="my">
<div class="num">4</div>
<img src="./images/logo.png" alt="" class="tx">
<div class="name">虛位以待</div>
<div class="score">
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值XXX</b>
</div>
</div>
<!-- 甜蜜榜單 -->
<div class="sweet">
<div class="sweet_in">
<div class="box">
<img src="./images/sweet_in1.png" alt="">
</div>
</div>
</div>
</div>
<!-- 活動規則彈窗 -->
<div class="rule_pub">
<div class="rule_pub_in">
<div class="box">
<img src="./images/rule_pub_in.png" alt="">
</div>
</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="./js/index.js"></script>

View File

@@ -0,0 +1,942 @@
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 xiqueNum = 0;//當前剩余喜鵲數量
var roomUid = 0;//房間uid
var giftId = 0;//默認禮物id
var xiqueBut = true;//投放喜鵲鎖
var data = null;//默認日榜
var rankType = 1;//排行榜類型1=甜蜜日榜2=甜蜜總榜3=愛意日榜4=愛意總榜)
var curDate;//當天日期
var nextHourTimeStamp;//下一輪結束時間戳
var leftTime;//倒計時暫存
var timeOut2;//儲存定時器
var redLineNum = 0;//紅繩數量
var page = 1;//頁碼
var pageSizeLack = true;// 下拉更多鎖
var lack = true;// 抽獎鎖
var timeEndLock = true;
var lock = true;
// 初始化函數
$(function () {
setTimeout(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();
}, 100)
})
})
// 初始化接口
function getConfig () {
showLoading()
networkRequest({
type: 'GET',
url: urlPrefix + '/act/2023Qixi/xique/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日')}`)
// 當前用戶喜鵲
xiqueNum = res.data.xiqueNum
$('.page1 .magpieBridge .birdNum b').text(`我的喜鵲: ${res.data.xiqueNum}`)
// 處理當前喜鵲進度狀態值
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', '13.75%');
} else if (curXiqueNums >= 40 && curXiqueNums < 60) {
$('.page1 .magpieBridge .rightRen').css('right', '20.5%');
} else if (curXiqueNums >= 60 && curXiqueNums < 80) {
$('.page1 .magpieBridge .rightRen').css('right', '27.25%');
} else if (curXiqueNums >= 100) {
$('.page1 .magpieBridge .rightRen').css('right', '34%');
}
// 處理領取喜鵲頭飾按鈕狀態
if (res.data.devotedBtnStatus == 0) {//投入按鈕狀態0=可投入1=可領取2=不能領取,-1=已領取)
$('.page1 .magpieBridge .buting').hide();
$('.page1 .magpieBridge .buterr').hide();
$('.page1 .magpieBridge .butout').hide();
$('.page1 .magpieBridge .but1').show();
$('.page1 .magpieBridge .but10').show();
} else if (res.data.devotedBtnStatus == 1) {//投入按鈕狀態0=可投入1=可領取2=不能領取,-1=已領取)
$('.page1 .magpieBridge .buting').show();
$('.page1 .magpieBridge .but1').hide();
$('.page1 .magpieBridge .but10').hide();
} else if (res.data.devotedBtnStatus == 2) {
$('.page1 .magpieBridge .buterr').show();
$('.page1 .magpieBridge .but1').hide();
$('.page1 .magpieBridge .but10').hide();
} else if (res.data.devotedBtnStatus < 0) {
$('.page1 .magpieBridge .butout').show();
$('.page1 .magpieBridge .but1').hide();
$('.page1 .magpieBridge .but10').hide();
}
// 處理任務狀態
res.data.dailyTaskList.forEach((res, i) => {
$(`.page1 .task .box1 .task${i + 1} .p2`).text(`獎勵:喜鵲*${res.xiqueNum}`)
if (res.btnStatus == 1) {//已完成
$(`.page1 .task .box1 .task${i + 1} .but`).addClass('out');
$(`.page1 .task .box1 .task${i + 1} .but`).text('已完成');
$(`.page1 .task .box1 .task${i + 1} .but`).attr('click', 0);
}
if (i == 1) {
$(`.page1 .task .box1 .task2 .p1`).text(`任意房間發送彈幕(${res.cur}/${res.need})`)
}
if (i == 2) {
var percentage = res.cur / res.need * 100;
$('.page1 .task .box1 .task3 .line .line_in').css('width', percentage >= 100 ? '100%' : `${percentage}%`);
}
});
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 獲取房間Uid接口
function getRecommendRoom () {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/home/tab/home/one',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
success (res) {
if (res.code === 200) {
roomUid = res.data;
hideLoading(layerIndex)
} else {
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 祈福配置接口
function redLineGetConfig () {
// showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/2023Qixi/redLine/getConfig',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
success (res) {
if (res.code === 200) {
// 設置紅繩數量
redLineNum = res.data.redLineNum;
$('.page2 .blessingTree .redRope b').text(res.data.redLineNum);
// 渲染祈福列錶
res.data.drawList.forEach((res, i) => {
$(`.page2 .blessingTree .lantern${i + 1}`).attr('id', res.id);
if (res.able) {
$(`.page2 .blessingTree .lantern${i + 1}`).removeClass('openLantern');
} else {
$(`.page2 .blessingTree .lantern${i + 1} img`).removeClass('typemp').removeClass('typeqp');
if (res.type == 2) {
$(`.page2 .blessingTree .lantern${i + 1} img`).addClass("typemp");
} else if (res.type == 3) {
$(`.page2 .blessingTree .lantern${i + 1} img`).addClass("typeqp");
} else {
$(`.page2 .blessingTree .lantern${i + 1} img`).removeClass('typemp').removeClass('typeqp');
}
$(`.page2 .blessingTree .lantern${i + 1} img`).attr('src', res.pic);
$(`.page2 .blessingTree .lantern${i + 1} .box p`).text(res.name);
$(`.page2 .blessingTree .lantern${i + 1} .box b`).text(`${res.num}${res.unit}`);
$(`.page2 .blessingTree .lantern${i + 1}`).addClass('openLantern');
}
})
hideLoading(layerIndex)
} else {
lack = true;
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 祈福抽獎接口
function redLineDraw (id) {
// showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/2023Qixi/redLine/draw',
data: { id },
success (res) {
if (res.code === 200) {
id = id == null ? res.data : id;
svga1Fun(id);
hideLoading(layerIndex)
} else {
lack = true;
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
lock = true;
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 默認抽獎祈福按鈕
$('.page2 .blessingTree .but').click(function () {
if (redLineNum > 0) {
if (true) {
lack = false;
redLineDraw(null);
}
} else {
toastMsg('紅繩數量不足,可參與投放喜鵲活動獲得')
}
})
// 指定抽獎
$('.page2 .blessingTree .lantern').click(function () {
var id = $(this).attr('id');
var openLantern = $(this).attr('class');
if (redLineNum > 0) {
if (openLantern.indexOf('openLantern') == -1) {
if (true) {
lack = false;
redLineDraw(id);
}
} else {
toastMsg('福袋已經完成祈願,換一個福袋再祈願吧');
}
} else {
toastMsg('紅繩數量不足,可參與投放喜鵲活動獲得')
}
})
var player1;
var parser1;
var player2;
var parser2;
var player3;
var parser3;
var player4;
var parser4;
function svga1Fun (id) {
var parser = id == 1 ? parser1 : id == 2 ? parser2 : id == 3 ? parser3 : parser4;
var player = id == 1 ? player1 : id == 2 ? player2 : id == 3 ? player3 : player4;
parser.load(`./images/blessingTree1.svga`, function (videoItem) {
$(`.page2 .blessingTree .blessingTreeSvga${id}`).show();
$(`.page2 .blessingTree .lantern${id}`).hide();
player.loops = 1;
player1.clearsAfterStop = false;
player.setVideoItem(videoItem);
player.startAnimation();
player.setContentMode('AspectFill');
player.onFinished(() => {
$(`.page2 .blessingTree .lantern${id}`).show();
$(`.page2 .blessingTree .blessingTreeSvga${id}`).hide();
lack = true;
redLineGetConfig();
})
})
}
// 播放喜鵲svg
blessingTreeSvgaFun1();
function blessingTreeSvgaFun1 () {
player1 = new SVGA.Player('.blessingTreeSvgaActive1');
parser1 = new SVGA.Parser('.blessingTreeSvgaActive1');
player2 = new SVGA.Player('.blessingTreeSvgaActive2');
parser2 = new SVGA.Parser('.blessingTreeSvgaActive2');
player3 = new SVGA.Player('.blessingTreeSvgaActive3');
parser3 = new SVGA.Parser('.blessingTreeSvgaActive3');
player4 = new SVGA.Player('.blessingTreeSvgaActive4');
parser4 = new SVGA.Parser('.blessingTreeSvgaActive5');
}
// 刷新祈福接口
function fresh () {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/2023Qixi/redLine/fresh',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
success (res) {
if (res.code === 200) {
redLineGetConfig();
hideLoading(layerIndex)
} else {
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 刷新按鈕
$('.page2 .blessingTree .refresh').click(function () {
fresh();
})
// 定情信物禮物輪播
function swiperFun () {
var mySwiper = new Swiper('.swiper', {
direction: "vertical",
loop: true,
autoplay: {
delay: 3500,//3秒切換一次
disableOnInteraction: false
}
})
}
// 總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();
$('.page2').hide();
$('.page3').hide();
$('.page4').hide();
$(`.page${i}`).show();
if (i == 2) {
redLineGetConfig();
}
if (i == 3) {
getRoomRank();
}
if (i == 4) {
data == null;
rankType = 1;
getRank(data, rankType);
getCpRank();
$('.page4 .page4Tab').removeClass('page4Tab2');
$('.page4 .dayAll').removeClass('dayAll2');
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%' });
}
})
// 房間榜單接口
function getRoomRank () {
$('.page3 ul li').remove();
showLoading()
networkRequest({
type: 'GET',
url: urlPrefix + '/act/2023Qixi/roomRank/getRank',
data: {},
success (res) {
if (res.code === 200) {
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) => {
$(`.page3 .no${index + 1} .tx`).attr('src', res.avatar);
$(`.page3 .no${index + 1} p`).text(res.nick);
$(`.page3 .no${index + 1} b`).text(`情緣值:${unitProcessing(res.score, 10000, 1, 'w')}`);
$(`.page3 .no${index + 1} .txBg`).attr('uid', res.uid);
})
// 跳轉前三房間
$('.page3 .no .txBg').click(function () {
var uid = $(this).attr('uid');
if (browser.ios) {
window.webkit.messageHandlers.openRoom.postMessage(uid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openRoom(uid);
}
}
})
// 非前三
var str = '';
notTop3.forEach((res, i) => {
str += `
<li>
<div class="num">${res.ranking}</div>
<img src="${res.avatar}" alt="" class="tx" uid=${res.uid}>
<div class="name">${res.nick}</div>
<div class="score">
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>情緣值:${unitProcessing(res.score, 10000, 1, 'w')}</b>
</div>
</li>
`
})
$('.page3 ul').append(str);
// 跳轉非前三房間
$('.page3 ul li .tx').click(function () {
var uid = $(this).attr('uid');
if (browser.ios) {
window.webkit.messageHandlers.openRoom.postMessage(uid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openRoom(uid);
}
}
})
// 處理自己榜單
var meRank = res.data.meRank;
$('.page3 .my .num').text(meRank.ranking == 0 ? '未上榜' : meRank.ranking);
$('.page3 .my .tx').attr('src', meRank.avatar);
$('.page3 .my .name').text(meRank.nick);
$('.page3 .my .score b').text(`情緣值:${unitProcessing(meRank.score, 10000, 1, 'w')}`);
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 獲取情緣榜接口
function getRank (date, rankType) {
$('.page4 ul li').remove();
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/2023Qixi/rank/getRank',
data: { date, rankType },
success (res) {
if (res.code === 200) {
// 設置當天日期
curDate = res.data.curDate;
// 處理日期
if (res.data.dateList) {
res.data.dateList.forEach((res, i) => {
$('.page4 .timeList div').eq(i).text(`${res[6]}.${res[8]}${res[9]}`);
$('.page4 .timeList div').eq(i).attr('data', res);
if (res == curDate && date == null) {
$('.page4 .timeList div').removeClass('active')
$('.page4 .timeList div').eq(i).addClass('active');
}
})
}
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) => {
$(`.page4 .no${index + 1} .tx`).attr('src', res.avatar);
$(`.page4 .no${index + 1} p`).text(res.nick);
if (rankType == 1 || rankType == 2) {
$(`.page4 .no${index + 1} b`).text(`甜蜜值:${unitProcessing(res.score, 10000, 1, 'w')}`);
} else {
$(`.page4 .no${index + 1} b`).text(`心動值:${unitProcessing(res.score, 10000, 1, 'w')}`);
}
})
// 非前三
var str = '';
notTop3.forEach((res, i) => {
str += `
<li>
<div class="num">${res.ranking}</div>
<img src="${res.avatar}" alt="" class="tx">
<div class="name">${res.nick}</div>
<div class="score">
<img src="./images/loveIcon.png" alt="" class="loveIcon">
<b>${rankType == 1 || rankType == 2 ? "甜蜜值:" : '心動值:'}${unitProcessing(res.score, 10000, 1, 'w')}</b>
</div>
</li>
`
})
$('.page4 ul').append(str);
// 處理自己榜單
var meRank = res.data.meRank;
$('.page4 .my .num').text(meRank.ranking == 0 ? '未上榜' : meRank.ranking);
$('.page4 .my .tx').attr('src', meRank.avatar);
$('.page4 .my .name').text(meRank.nick);
if (rankType == 1 || rankType == 2) {
$('.page4 .my .score b').text(`甜蜜值:${unitProcessing(meRank.score, 10000, 1, 'w')}`);
} else {
$('.page4 .my .score b').text(`心動值:${unitProcessing(meRank.score, 10000, 1, 'w')}`);
}
hideLoading(layerIndex)
} else {
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 首頁任務切換
$('.page1 .task .tab div').click(function () {
var i = $(this).index() + 1;
if (i == 1) {
$('.page1 .task').removeClass('tasks2');
} else {
$('.page1 .task').addClass('tasks2');
}
})
// 打開活動規則
$('.header .rule').click(function () {
bodyScroolFun(true);
$('.rule_pub').show();
})
// 關閉活動規則
$('.rule_pub').click(function () {
bodyScroolFun(false);
$('.rule_pub').hide();
})
// 打開房間榜活動規則
$('.page3 .rule').click(function () {
bodyScroolFun(true);
$('.page3 .roomRule').show();
})
// 關閉房間榜活動規則
$('.roomRule').click(function () {
bodyScroolFun(false);
$('.roomRule').hide();
})
// 打開房間榜活動規則
$('.page4 .rule').click(function () {
bodyScroolFun(true);
$('.page4 .sweet').show();
})
// 關閉房間榜活動規則
$('.sweet').click(function () {
bodyScroolFun(false);
$('.sweet').hide();
})
// 祈願樹tab切換
$('.page2 .blessingTreeBoomt .tab div').click(function () {
var i = $(this).index() + 1;
if (i == 1) {
$('.page2 .blessingTreeBoomt').removeClass('blessingTreeBoomt2')
} else {
$('.page2 .blessingTreeBoomt').addClass('blessingTreeBoomt2')
page = 1;
pageRecord(page)
$('.page2 .blessingTreeBoomt2 .box2 ul li').remove();
}
})
//檢測是否到達底部
$(".page2 .blessingTreeBoomt .box2 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 (pageSizeLack) {
pageSizeLack = false;
page++;
pageRecord(page)
}
}
});
// 祈福記錄
function pageRecord (page) {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/2023Qixi/redLine/pageRecord',
data: { page, size: 10 },
success (res) {
if (res.code === 200) {
if (res.data.length == 0) {
pageSizeLack = false;
hideLoading(layerIndex)
return;
}
var str = '';
res.data.forEach((res, i) => {
str += `
<li class="${i % 2 == 0 ? 'active' : ''}">
<div>
<p>${dateFormat(res.createTime, 'yyyy/MM/dd')}</p>
<i>${dateFormat(res.createTime, 'hh:mm:ss')}</i>
</div>
<div class="b">${res.rewardDesc}</div>
</li>
`
})
$('.page2 .blessingTreeBoomt2 .box2 ul').append(str);
pageSizeLack = true;
hideLoading(layerIndex)
} else {
hideLoading(layerIndex)
toastMsg(res.message)
pageSizeLack = true;
}
},
error (err) {
pageSizeLack = true;
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 獲取CP榜單接口
function getCpRank () {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/2023Qixi/rank/getCpRank',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
success (res) {
if (res.code === 200) {
if (res.data.senderNick) {
$('.page4 .loveList .txL').attr('src', res.data.receiverAvatar);
$('.page4 .loveList .txR').attr('src', res.data.senderAvatar);
$('.page4 .loveList .leftName').text(res.data.receiverNick);
$('.page4 .loveList .rightName').text(res.data.senderNick);
} else {
$('.page4 .loveList .txL').attr('src', './images/logo.png');
$('.page4 .loveList .txR').attr('src', './images/logo.png');
$('.page4 .loveList .leftName').text('虛位以待');
$('.page4 .loveList .rightName').text('虛位以待');
}
if (res.data.nextHourTimeStamp) {
nextHourTimeStamp = res.data.nextHourTimeStamp;
leftTime = nextHourTimeStamp - res.timestamp;
// leftTime = 1691654400000;
countup(leftTime);
} else {
$('.page4 .loveList .times').hide();
}
hideLoading(layerIndex)
} else {
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 倒計時
function countup () {
clearTimeout(timeOut2)
//獲取當前時間
// var now = nowTime;
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中
$('.page4 .loveList .times span').eq(0).text(m);
$('.page4 .loveList .times span').eq(1).text(s);
leftTime = leftTime - 1000;
//遞歸每秒調⽤countTime⽅法顯⽰動態時間效果
} else {
getCpRank();
// location.reload();
return
}
timeOut2 = setTimeout(countup, 1000);
}
//補0操作
function getzf (num) {
if (parseInt(num) < 10) {
num = '0' + num;
}
return num;
}
// 七夕榜單tab切換
var type = 'a';//a:甜蜜b:心動
$('.page4 .page4Tab div').click(function () {
$('.page4 .timeList').show();
$('.page4 .dayAll').removeClass('dayAll2');
var i = $(this).index() + 1;
if (i == 1) {
rankType = 1;//排行榜類型1=甜蜜日榜2=甜蜜總榜3=愛意日榜4=愛意總榜)
data = null;
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%' });
}
})
// 七夕榜單日榜總榜切換
$('.page4 .dayAll div').click(function () {
var i = $(this).index() + 1;
if (i == 1) {
$('.page4 .dayAll').removeClass('dayAll2');
rankType = type == "a" ? 1 : 3;//排行榜類型1=甜蜜日榜2=甜蜜總榜3=愛意日榜4=愛意總榜)
data = null;
$('.page4 ul').css('margin', '6rem auto 2rem');
getRank(data, rankType);
$('.page4 .timeList').show();
} else {
$('.page4 .dayAll').addClass('dayAll2');
rankType = type == "a" ? 2 : 4;//排行榜類型1=甜蜜日榜2=甜蜜總榜3=愛意日榜4=愛意總榜)
data = null;
$('.page4 ul').css('margin', '7rem auto 2rem');
getRank(data, rankType);
$('.page4 .timeList').hide();
}
})
// 日榜切換日期
$('.page4 .timeList 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(data, rankType);
})
// 關閉活動結束按鈕
$('.endActivity .endActivity_in .but').click(function () {
$('.tabs').removeClass('tab1').removeClass('tab2').removeClass('tab3').removeClass('tab4');
$('.tabs').addClass(`tab${4}`);
$('.page1').hide();
$('.page2').hide();
$('.page3').hide();
$('.page4').hide();
$(`.page${4}`).show();
data == null;
rankType = 2;
$('.page4 .dayAll').addClass('dayAll2');
$('.page4 .timeList').hide();
getRank(data, rankType);
getCpRank();
$('.endActivity').hide();
bodyScroolFun(false);
})
//領取全服喜鵲獎勵
function getXiqueReward () {
showLoading()
networkRequest({
type: 'GET',
url: urlPrefix + '/act/2023Qixi/xique/getXiqueReward',
data: {},
success (res) {
if (res.code === 200) {
getConfig();
toastMsg('領取成功');
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 領取喜鵲獎勵按鈕
$('.page1 .magpieBridge .buting').click(function () {
getXiqueReward();
})
// 領取喜鵲未參與按鈕
$('.page1 .magpieBridge .buterr').click(function () {
toastMsg('您未參加搭建鵲橋活動,無法領取');
})
// 投放喜鵲接口
function devotedXique (num) {
// showLoading()
networkRequest({
type: 'GET',
url: urlPrefix + '/act/2023Qixi/xique/devotedXique',
data: { num },
success (res) {
if (res.code === 200) {
getConfig();
toastMsg('投放成功')
svgaFun();
setTimeout(function () {
xiqueBut = true;
}, 2000)
} else {
toastMsg(res.message)
xiqueBut = true;
}
hideLoading(layerIndex)
xiqueBut = true;
},
error (err) {
xiqueBut = true;
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 播放喜鵲svg
function svgaFun () {
player1 = new SVGA.Player('.xique');
parser1 = new SVGA.Parser('.xique');
parser1.load('./images/xique.svga', function (videoItem) {
player1.loops = 1
player1.clearsAfterStop = false;
player1.setVideoItem(videoItem);
player1.startAnimation();
player1.setContentMode('AspectFill')
player1.onFinished(() => {
// $('.svga').hide()
})
})
}
// 投放按鈕
$('.page1 .magpieBridge .but1,.page1 .magpieBridge .but10').click(function () {
var clas = $(this).attr('class')
if (clas == 'but1') {
if (xiqueNum < 1) {
toastMsg('喜鵲數量不足,參加任務獲得吧~')
return
}
if (xiqueBut) {
xiqueBut = false;
devotedXique(1);
}
} else {
if (xiqueNum < 10) {
toastMsg('喜鵲數量不足,參加任務獲得吧~')
return
}
if (xiqueBut) {
xiqueBut = false;
devotedXique(10);
}
// devotedXique(10);
}
})
// 去完成任務2按鈕
$('.page1 .task .box1 .task2 .but').click(function () {
var click = $(this).attr('click');
if (click != 0) {
if (browser.ios) {
window.webkit.messageHandlers.openRoom.postMessage(roomUid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openRoom(roomUid);
}
}
}
})
// 去完成任務3按鈕
$('.page1 .task .box1 .task3 .but').click(function () {
var click = $(this).attr('click');
if (click != 0) {
if (browser.ios) {
window.webkit.messageHandlers.openRoomForGiftId.postMessage(JSON.stringify({ uid: roomUid, giftId: giftId }))
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openRoomForGiftId(roomUid, giftId);
}
}
}
})
// 循環任務按鈕
$('.page1 .task .box2 .task2But').click(function () {
if (browser.ios) {
window.webkit.messageHandlers.openRoomForGiftId.postMessage(JSON.stringify({ uid: roomUid, giftId: giftId }))
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openRoomForGiftId(roomUid, giftId);
}
}
})

File diff suppressed because one or more lines are too long

View File

@@ -703,7 +703,7 @@ function fontConvert (fontConvertBool) {
}
// 封装数值超过最大数位处理单位
function unitProcessing (val, num, toFixeds, text) { //值 以什么为单位 保留几位小数 单位后最w
return val > num ? (Math.floor(val / 1000) / 10).toFixed(toFixeds) + text : val;
return val >= num ? (Math.floor(val / 1000) / 10).toFixed(toFixeds) + text : val;
}
// 封装 在ios环境中 配置公共参数的回调函数
// 配合 methodsFromClient[infoName].ios 方法

View File

@@ -30,7 +30,7 @@ body {
.box {
width: 10rem;
height: 30.0933333333rem;
height: 30.4533333333rem;
background: url(../images/bg.png) no-repeat;
background-size: 100% 100%;
position: relative;
@@ -38,16 +38,34 @@ body {
}
.box .user {
width: 8.4rem;
height: 2rem;
height: 2.8rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.box .user1 {
top: 22.7rem;
top: 6.7rem;
}
.box .user2 {
top: 24.6rem;
top: 9.6rem;
}
.box .user3 {
top: 12.2rem;
}
.box .user4 {
top: 15.1rem;
}
.box .user5 {
top: 18rem;
}
.box .user6 {
top: 20.9rem;
}
.box .user7 {
top: 23.6rem;
}
.box .user8 {
top: 26.4rem;
}
/*# sourceMappingURL=index.css.map */

View File

@@ -38,7 +38,7 @@ body {
.box {
width: px2rem(750, );
height: px2rem(2257, );
height: px2rem(2284, );
background: url(../images/bg.png) no-repeat;
background-size: 100% 100%;
position: relative;
@@ -46,17 +46,41 @@ body {
.user {
width: 8.4rem;
height: 2rem;
height: 2.8rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.user1 {
top: 22.7rem;
top: 6.7rem;
}
.user2 {
top: 24.6rem;
top: 9.6rem;
}
.user3 {
top: 12.2rem;
}
.user4 {
top: 15.1rem;
}
.user5 {
top: 18rem;
}
.user6 {
top: 20.9rem;
}
.user7 {
top: 23.6rem;
}
.user8 {
top: 26.4rem;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 KiB

After

Width:  |  Height:  |  Size: 230 KiB

View File

@@ -17,8 +17,14 @@
</div>
<!-- 背景 -->
<div class="box">
<div class="user user1"></div>
<div class="user user2"></div>
<div class="user user1" uid="44534"></div>
<div class="user user2" uid="50728"></div>
<div class="user user3" uid="69023"></div>
<div class="user user4" uid="69320"></div>
<div class="user user5" uid="67115"></div>
<div class="user user6" uid="56674"></div>
<div class="user user7" uid="12305"></div>
<div class="user user8" uid="55897"></div>
</div>
</body>

View File

@@ -50,26 +50,15 @@ $(function () {
}, 100)
})
})
$('.box .user1').click(function () {
$('.box .user').click(function () {
var uid = $(this).attr('uid');
if (browser.app) {
if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(44534);
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(44534);
}
}
} else {
toastMsg('請在app內中打開')
}
})
$('.box .user2').click(function () {
if (browser.app) {
if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(50728);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(50728);
window.androidJsObj.openPersonPage(uid);
}
}
} else {

View File

@@ -87,7 +87,7 @@ function getUploadToken (type) {
},
});
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -157,7 +157,7 @@ function withdrawUserAccount (name, idCardNo, accountNo, contact, thirdAccountNo
setTimeout(function () {
window.location.href = './withdrawal.html'
}, 500)
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -53,7 +53,7 @@ function getConfig () {
minDiamonds = res.data.minDiamonds;
$('.box .golds').text('我的金幣:' + res.data.golds);
$('.box .diamonds').text('我的鉆石:' + res.data.diamonds);
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -78,7 +78,7 @@ function exchange () {
$('.pub').hide();
getConfig();
toastMsg('兌換成功')
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -49,7 +49,7 @@ function getQueryWithRoomType () {
if (res.code === 200) {
$('.diamond p').text(res.data.diamonds);
$('.gold p').text(res.data.golds);
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -74,7 +74,7 @@ function getUser () {
$('.myInfo img').attr('src', res.data.avatar);
$('.myInfo div p').text(res.data.nick);
$('.myInfo div b').text("ID:" + res.data.erbanNo);
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -87,7 +87,7 @@ function getUploadToken (type) {
},
});
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -180,7 +180,7 @@ function withdrawUserAccount (
setTimeout(function () {
window.location.href = './withdrawal.html'
}, 500)
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -87,7 +87,7 @@ function getUploadToken (type) {
},
});
} else if (res.code == 401) {
} else if (res.code == 1444) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -159,7 +159,7 @@ function withdrawUserAccount (
setTimeout(function () {
window.location.href = './withdrawal.html'
}, 500)
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -48,7 +48,7 @@ function getConfig () {
if (res.code === 200) {
$('.box p .b2').text(res.data.weekLimitCount);
$('.box p .b1').text(res.data.minValue);
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -87,7 +87,7 @@ function getUploadToken (type) {
},
});
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -180,7 +180,7 @@ function withdrawUserAccount (
setTimeout(function () {
window.location.href = './withdrawal.html'
}, 500)
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -62,7 +62,7 @@ function getConfig () {
`
$('.withdrawal').append(str);
getAccounts();
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -88,7 +88,7 @@ function query () {
$('.income p').text(`金幣 ${res.data.golds}`);
golds = res.data.golds;
getConfig();
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -115,7 +115,7 @@ function getUser () {
$('.myInfo div p').text(res.data.nick);
$('.myInfo div b').text("ID:" + res.data.erbanNo);
query()
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -205,7 +205,7 @@ function getAccounts () {
$(`.withdrawal input`).text('請輸入提領金幣數額');
$(`.withdrawal .withdrawalBox`).attr('click', 1);
}
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -267,7 +267,7 @@ function calculate () {
$('.goldPub .goldPub_in input').val('');
$('.butBig').addClass('butBigActive');
$('.butBig').attr('click', 1);
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -312,7 +312,7 @@ $('.withDrawalPub .withDrawalPub_in .but').click(function () {
if (res.code === 200) {
getUser();
$('.withDrawalPub').hide();
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)