古尔邦节install

This commit is contained in:
chenruiye
2025-05-30 17:37:27 +08:00
parent 2b4f8b5403
commit 5c7833eca7
92 changed files with 6791 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,528 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title class="text1"></title>
<link rel="stylesheet" href="../../common/css/reset.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="time text2"></div>
<!-- 弹幕 -->
<div class="danmu" >
<div id="my_container">
<!-- <div class="my_container_in">
<img src="./images/logo.png" alt="" class="tx">
<span>我是文案问啊案问啊案问啊案问啊案</span>
</div> -->
</div>
</div>
<!-- 发送弹幕 -->
<div class="ramadanBlessings">
<div class="title text64"></div>
<input type="text text65" placeholder="">
<div class="send text66"></div>
<p class="text67"></p>
</div>
<!-- tab切换 -->
<div class="tab">
<div class="act text3"></div>
<!-- <div class="tab2"><span>Roulette</span></div> -->
<div class="text4"></div>
</div>
</div>
<!-- 页面1 -->
<div class="page1">
<!-- 灯笼 -->
<div class="lanternBox">
<!-- hangInTheAir-未完成 completed-已完成 beCompleted-待完成 singular-单数位置下移 -->
<!-- <div class="hangInTheAir singular">
<div class="lanternDate">3/1</div>
<img src="./images/ok.png" alt="" class="ok">
<img src="./images/notOk.png" alt="" class="notOk">
</div>
<div class="completed">
<div class="lanternDate">3/1</div>
<img src="./images/ok.png" alt="" class="ok">
<img src="./images/notOk.png" alt="" class="notOk">
</div>
<div class="beCompleted">
<div class="lanternDate">3/1</div>
<img src="./images/ok.png" alt="" class="ok">
<img src="./images/notOk.png" alt="" class="notOk">
</div>
<div class="special">
<div class="lanternDate">3/1</div>
<img src="./images/ok.png" alt="" class="ok">
<img src="./images/notOk.png" alt="" class="notOk">
<div class="gift">
<img src="./images/logo.png" alt="">
</div>
</div> -->
</div>
<!-- 答题 -->
<div class="t"></div>
<div class="c">
<!-- 切换 -->
<div class="page1_tabBox">
<div class="act text5"></div>
<div class="text6"></div>
</div>
<div class="page1_1">
<!-- 勋章奖励介绍 -->
<div class="medal">
<img src="./images/medal.png" alt="">
<div class="texts text7"></div>
<div class="line">
<div class="line_in"></div>
<span>0/38</span>
</div>
</div>
<!-- 问题列表 -->
<div class="question">
<div class="questionText"></div>
<div class="questionLists a A" option="A">
<span></span>
<img src="./images/incorrect.png" alt="">
</div>
<div class="questionLists b B" option="B">
<span></span>
<img src="./images/incorrect.png" alt="">
</div>
<div class="questionLists c C" option="C">
<span></span>
<img src="./images/incorrect.png" alt="">
</div>
<!-- 已答题次数 -->
<div class="answersNum text8"></div>
</div>
<!-- 问题说明 -->
<div class="questions text9"></div>
</div>
<div class="page1_2">
<div class="answering text10">Get it by answering correctly on March 3rd/7th/15th/30th</div>
<div class="rewars">
<div class="rewars1">
<span>6/6</span>
<img src="./images/lanternBox1.png" alt="">
<div class="doneBut text11"></div>
</div>
<div class="rewars2">
<span>6/10</span>
<img src="./images/lanternBox2.png" alt="">
<div class="doneBut text11"></div>
</div>
<div class="rewars3">
<span>6/13</span>
<img src="./images/lanternBox3.png" alt="">
<div class="doneBut text11"></div>
</div>
<div class="rewars4">
<span>6/17</span>
<img src="./images/lanternBox4.png" alt="">
<div class="doneBut text11"></div>
</div>
</div>
<div class="answers text12"></div>
<div class="calendar">
<div class="calendar_in">
<!-- <div class="act">
<span>1/31</span>
<img src="./images/corrects.png" alt="">
</div>
<div>
<span>1/31</span>
<img src="./images/corrects.png" alt="">
</div> -->
</div>
</div>
</div>
</div>
<div class="b"></div>
<!-- 答题失败弹窗 -->
<div class="unfortunately">
<div class="unfortunately_in">
<div class="title text13"></div>
<img src="./images/close.png" alt="" class="close">
<div class="texts text14"></div>
<img src="./images/page1_null.png" alt="" class="null">
<div class="but text15"></div>
</div>
</div>
<!-- 答题成功弹窗 -->
<div class="congratulations">
<div class="congratulations_in">
<div class="title text16"></div>
<img src="./images/close.png" alt="" class="close">
<div class="texts text17"></div>
<div class="gift">
<img src="./images/logo.png" alt="" class="gift_in">
<div class="num">7 Days</div>
<div class="giftName">礼物昵称</div>
</div>
<div class="but text15">OK</div>
</div>
</div>
</div>
<!-- 页面2 -->
<div class="page22">
<!-- 任务 -->
<div class="task">
<div class="t">
<div class="title">Daily Task</div>
<p class="resets">Resets at 0:00 every day</p>
</div>
<div class="c">
<div class="myStar">
<img src="./images/xx.png" alt="">
<b>0</b>
</div>
<div class="taskList">
<img src="./images/xx.png" alt="" class="star">
<b>X1</b>
<p class="p">Daily Questions(<strong>0/1</strong>)</p>
<div class="but get">Get</div>
<div class="but notGet">Get</div>
<div class="but done">Done</div>
</div>
<div class="taskList">
<img src="./images/xx.png" alt="" class="star">
<b>X4</b>
<p class="">Send Ramadan Blessings(<strong>0/3</strong>)</p>
<div class="but get">Get</div>
<div class="but notGet">Get</div>
<div class="but done">Done</div>
</div>
<div class="taskList">
<img src="./images/xx.png" alt="" class="star">
<b>X2</b>
<p class="">Follow different users(<strong>0/3</strong>)</p>
<div class="but get">Get</div>
<div class="but notGet">Get</div>
<div class="but done">Done</div>
</div>
<div class="taskList">
<img src="./images/xx.png" alt="" class="star">
<b>X2</b>
<p class="">Play games in the room(<strong>0/3</strong>)</p>
<div class="but get">Get</div>
<div class="but notGet">Get</div>
<div class="but done">Done</div>
</div>
<div class="taskList">
<img src="./images/xx.png" alt="" class="star">
<b>X2</b>
<p class="">On mic for 30 minutes(<strong>0/30</strong>)mins</p>
<div class="but get">Get</div>
<div class="but notGet">Get</div>
<div class="but done">Done</div>
</div>
<div class="taskList">
<img src="./images/xx.png" alt="" class="star">
<b>X2</b>
<p class="">Stay in your room for 30 minutes(<strong>0/30</strong>)mins</p>
<div class="but get">Get</div>
<div class="but notGet">Get</div>
<div class="but done">Done</div>
</div>
<div class="taskList" style="margin-bottom: 0;">
<img src="./images/xx.png" alt="" class="star">
<b>X10</b>
<p class="">Recharge 7,000 coins(<strong>0/7000</strong>)</p>
<div class="but get">Get</div>
<div class="but notGet">Get</div>
<div class="but done">Done</div>
</div>
</div>
<div class="b"></div>
</div>
<!-- 转盘 -->
<div class="turntable">
<div class="t">
<div class="title">Roulette</div>
</div>
<div class="c">
<!-- 我得星星数量 -->
<div class="myStar">
<img src="./images/xx.png" alt="">
<b>0</b>
</div>
<!-- 转盘 -->
<div class="turntableBox">
<div class="turntable_in">
<img src="./images/turntable_in.png" alt="" class="">
</div>
<img src="./images/pointer.png" alt="" class="pointer">
</div>
<!-- 按钮 -->
<div class="pointerBut">Spin 1 time</div>
<div class="use">
<strong>Use</strong>
<img src="./images/sxx.png" alt="">
<b>X10</b>
</div>
<!-- 记录 -->
<div class="winningRecord">Winning record</div>
<ul class="record_list">
<li>
<img src="./images/logo.png" alt="" class="tx">
<div class="user">
<p>i won 【头饰昵称*1】</p>
<span>2025-2-19</span>
</div>
</li>
<li>
<img src="./images/logo.png" alt="" class="tx">
<div class="user">
<p>i won 【头饰昵称*1】</p>
<span>2025-2-19</span>
</div>
</li>
</ul>
</div>
<div class="b"></div>
</div>
<!-- 转盘未获奖弹窗 -->
<div class="unfortunately">
<div class="unfortunately_in">
<div class="title">Sorry</div>
<img src="./images/close.png" alt="" class="close">
<div class="texts">You did not win any prizes in this roulette. Try again!</div>
<img src="./images/page1_null.png" alt="" class="null">
<div class="but">OK</div>
</div>
</div>
<!-- 转盘赢取弹窗 -->
<div class="congratulations">
<div class="congratulations_in">
<div class="title">Congratulations</div>
<img src="./images/close.png" alt="" class="close">
<div class="texts">Congratulations on winning the following in the roulette:</div>
<div class="gift">
<img src="./images/logo.png" alt="" class="gift_in">
<div class="num">7 Days</div>
<div class="giftName">礼物昵称</div>
</div>
<div class="but">OK</div>
</div>
</div>
</div>
<!-- 页面3 -->
<div class="page2">
<div class="todayCoinsPool">
<div class="title text18"></div>
<div class="num"><b>0</b><img src="./images/gold.png" alt=""></div>
<p class="text19"></p>
</div>
<div class="ramadanGifts">
<div class="t">
<div class="title text20"></div>
</div>
<div class="c">
<p class="text21"></p>
<div class="gifyBigBox">
<div class="gift">
<div class="giftBox">
<div class="sTitle cp text35"></div>
<img src="./images/ramadanLanterns.png" alt="" class="">
<span class="text36"></span>
</div>
<div class="giftBox ">
<div class="sTitle normal text37"></div>
<img src="./images/ramadan.png" alt="" class="">
<span class="text38"></span>
</div>
<div class="giftBox ">
<div class="sTitle lucky text39"></div>
<img src="./images/luckyLanterns.png" alt="" class="">
<span class="text40"></span>
</div>
<div class="giftBox ">
<div class="sTitle lucky text39"></div>
<img src="./images/holyQuran.png" alt="" class="">
<span class="text41"></span>
</div>
<div class="giftBox ">
<div class="sTitle normal text37"></div>
<img src="./images/eidCakes.png" alt="" class="">
<span class="text42"></span>
</div>
<div class="giftBox ">
<div class="sTitle normal text37"></div>
<img src="./images/fancyDinner.png" alt="" class="">
<span class="text43"></span>
</div>
</div>
</div>
</div>
<div class="b"></div>
</div>
<div class="list">
<div class="t">
<div class="title text64"></div>
</div>
<div class="c">
<div class="page3_in1">
<div class="page3TabBox">
<div type="1" class=" text22"></div>
<div type="0" class="act text23"></div>
<div type="2" class="text24"></div>
</div>
<div class="timeOutBox">
<div class="days">
<b>00</b>
<span class="text25"></span>
</div>
<div class="hours">
<b>00</b>
<span class="text26"></span>
</div>
<div class="mins">
<b>00</b>
<span class="text27"></span>
</div>
<div class="secs">
<b>00</b>
<span class="text28"></span>
</div>
</div>
<div class="yesterdayCoinsPool">
<div class="title text29"></div>
<div class="num"><b>0</b><img src="./images/gold.png" alt=""></div>
</div>
<!-- 前三名 -->
<div class="no_bg">
<div class="no1">
<!-- <img src="./images/no1.png" alt="" class="ts"> -->
<img src="./images/logo.png" alt="" class="tx">
<div class="name">
<b>名字</b>
<img src="" alt="">
</div>
<div class="id">ID:0000</div>
<div class="score">
<span class="text30"></span>
<b>0k</b>
</div>
<div class="rewards text31"></div>
</div>
<div class="no23">
<div class="no2">
<img src="./images/no2.png" alt="" class="ts">
<img src="./images/logo.png" alt="" class="tx">
<div class="name">
<b>名字</b>
<img src="" alt="">
</div>
<div class="id">ID:0000</div>
<div class="score">
<span class="text30">Behind: </span>
<b>0k</b>
</div>
</div>
<div class="no3">
<img src="./images/no3.png" alt="" class="ts">
<img src="./images/logo.png" alt="" class="tx">
<div class="name">
<b>名字</b>
<img src="" alt="">
</div>
<div class="id">ID:0000</div>
<div class="score">
<span class="text30">Behind: </span>
<b>0k</b>
</div>
</div>
</div>
</div>
<ul>
<li>
<div class="num">04</div>
<img src="./images/logo.png" alt="" class="tx">
<div class="user">
<p>
<b>名字</b>
<img src="" alt="">
</p>
<span>ID:0</span>
</div>
<div class="score">
<span class="text30">Behind: </span>
0k
</div>
</li>
</ul>
</div>
</div>
<div class="b"></div>
</div>
<!-- 处理自己 -->
<div class="my">
<div class="num"></div>
<img src="./images/logo.png" alt="" class="tx">
<div class="user">
<p>
<b></b>
<img src="" alt="">
</p>
<span>ID:0</span>
</div>
<div class="score">
<span class="text30">Behind: </span>
</div>
</div>
<!-- 奖励弹窗 -->
<div class="rewardsPub">
<div class="rewardsPub_in">
<div class="title text32"></div>
<img src="./images/close.png" alt="" class="close">
<div class="box">
<img src="./images/rewardsPage3.png" alt="">
</div>
</div>
</div>
</div>
<!-- 确认发送弹幕弹窗 -->
<div class="tip">
<div class="tip_in">
<div class="title text60"></div>
<p class="text61"></p>
<div class="close text62"></div>
<div class="ok text63"></div>
</div>
</div>
<!-- 免责声明 -->
<div class="disclaimer text33"></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/route-constant.js"></script>
<script src="../../common/js/svga.min.js"></script>
<script src="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="./local/tr.js"></script>
<script src="./js/danmaku.js"></script>
<script src="./js/index.js"></script>
<script src="../../common/local/langHandler.js"></script>

View File

@@ -0,0 +1,564 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Danmaku = factory());
}(this, (function () { 'use strict';
var transform = (function() {
/* istanbul ignore next */
if (typeof document === 'undefined') return 'transform';
var properties = [
'oTransform', // Opera 11.5
'msTransform', // IE 9
'mozTransform',
'webkitTransform',
'transform'
];
var style = document.createElement('div').style;
for (var i = 0; i < properties.length; i++) {
/* istanbul ignore else */
if (properties[i] in style) {
return properties[i];
}
}
/* istanbul ignore next */
return 'transform';
}());
function createCommentNode(cmt) {
var node = document.createElement('div');
node.style.cssText = 'position:absolute;';
if (typeof cmt.render === 'function') {
var $el = cmt.render();
if ($el instanceof HTMLElement) {
node.appendChild($el);
return node;
}
}
node.textContent = cmt.text;
if (cmt.style) {
for (var key in cmt.style) {
node.style[key] = cmt.style[key];
}
}
return node;
}
function init() {
var stage = document.createElement('div');
stage.style.cssText = 'overflow:hidden;white-space:nowrap;transform:translateZ(0);';
return stage;
}
function clear(stage) {
var lc = stage.lastChild;
while (lc) {
stage.removeChild(lc);
lc = stage.lastChild;
}
}
function resize(stage, width, height) {
stage.style.width = '100%';
stage.style.height = '100%';
}
function framing() {
//
}
function setup(stage, comments) {
var df = document.createDocumentFragment();
var i = 0;
var cmt = null;
for (i = 0; i < comments.length; i++) {
cmt = comments[i];
cmt.node = cmt.node || createCommentNode(cmt);
df.appendChild(cmt.node);
}
if (comments.length) {
stage.appendChild(df);
}
for (i = 0; i < comments.length; i++) {
cmt = comments[i];
cmt.width = cmt.width || cmt.node.offsetWidth;
cmt.height = cmt.height || cmt.node.offsetHeight;
}
}
function render(stage, cmt) {
cmt.node.style[transform] = 'translate(' + cmt.x + 'px,' + cmt.y + 'px)';
}
/* eslint no-invalid-this: 0 */
function remove(stage, cmt) {
stage.removeChild(cmt.node);
/* istanbul ignore else */
if (!this.media) {
cmt.node = null;
}
}
var domEngine = {
name: 'dom',
init: init,
clear: clear,
resize: resize,
framing: framing,
setup: setup,
render: render,
remove: remove,
};
var raf =
(
typeof window !== 'undefined' &&
(
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame
)
) ||
function(cb) {
return setTimeout(cb, 50 / 3);
};
var caf =
(
typeof window !== 'undefined' &&
(
window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame
)
) ||
clearTimeout;
function binsearch(arr, prop, key) {
var mid = 0;
var left = 0;
var right = arr.length;
while (left < right - 1) {
mid = (left + right) >> 1;
if (key >= arr[mid][prop]) {
left = mid;
} else {
right = mid;
}
}
if (arr[left] && key < arr[left][prop]) {
return left;
}
return right;
}
function formatMode(mode) {
if (!/^(ltr|top|bottom)$/i.test(mode)) {
return 'rtl';
}
return mode.toLowerCase();
}
function collidableRange() {
var max = 9007199254740991;
return [
{ range: 0, time: -max, width: max, height: 0 },
{ range: max, time: max, width: 0, height: 0 }
];
}
function resetSpace(space) {
space.ltr = collidableRange();
space.rtl = collidableRange();
space.top = collidableRange();
space.bottom = collidableRange();
}
function now() {
return typeof window.performance !== 'undefined' && window.performance.now
? window.performance.now()
: Date.now();
}
/* eslint no-invalid-this: 0 */
function allocate(cmt) {
var that = this;
var ct = this.media ? this.media.currentTime : now() / 1000;
var pbr = this.media ? this.media.playbackRate : 1;
function willCollide(cr, cmt) {
if (cmt.mode === 'top' || cmt.mode === 'bottom') {
return ct - cr.time < that._.duration;
}
var crTotalWidth = that._.width + cr.width;
var crElapsed = crTotalWidth * (ct - cr.time) * pbr / that._.duration;
if (cr.width > crElapsed) {
return true;
}
// (rtl mode) the right end of `cr` move out of left side of stage
var crLeftTime = that._.duration + cr.time - ct;
var cmtTotalWidth = that._.width + cmt.width;
var cmtTime = that.media ? cmt.time : cmt._utc;
var cmtElapsed = cmtTotalWidth * (ct - cmtTime) * pbr / that._.duration;
var cmtArrival = that._.width - cmtElapsed;
// (rtl mode) the left end of `cmt` reach the left side of stage
var cmtArrivalTime = that._.duration * cmtArrival / (that._.width + cmt.width);
return crLeftTime > cmtArrivalTime;
}
var crs = this._.space[cmt.mode];
var last = 0;
var curr = 0;
for (var i = 1; i < crs.length; i++) {
var cr = crs[i];
var requiredRange = cmt.height;
if (cmt.mode === 'top' || cmt.mode === 'bottom') {
requiredRange += cr.height;
}
if (cr.range - cr.height - crs[last].range >= requiredRange) {
curr = i;
break;
}
if (willCollide(cr, cmt)) {
last = i;
}
}
var channel = crs[last].range;
var crObj = {
range: channel + cmt.height,
time: this.media ? cmt.time : cmt._utc,
width: cmt.width,
height: cmt.height
};
crs.splice(last + 1, curr - last - 1, crObj);
if (cmt.mode === 'bottom') {
return this._.height - cmt.height - channel % this._.height;
}
return channel % (this._.height - cmt.height);
}
/* eslint no-invalid-this: 0 */
function createEngine(framing, setup, render, remove) {
return function(_timestamp) {
framing(this._.stage);
var timestamp = _timestamp || now();
var dn = timestamp / 1000;
var ct = this.media ? this.media.currentTime : dn;
var pbr = this.media ? this.media.playbackRate : 1;
var cmt = null;
var cmtt = 0;
var i = 0;
for (i = this._.runningList.length - 1; i >= 0; i--) {
cmt = this._.runningList[i];
cmtt = this.media ? cmt.time : cmt._utc;
if (ct - cmtt > this._.duration) {
remove(this._.stage, cmt);
this._.runningList.splice(i, 1);
}
}
var pendingList = [];
while (this._.position < this.comments.length) {
cmt = this.comments[this._.position];
cmtt = this.media ? cmt.time : cmt._utc;
if (cmtt >= ct) {
break;
}
// when clicking controls to seek, media.currentTime may changed before
// `pause` event is fired, so here skips comments out of duration,
// see https://github.com/weizhenye/Danmaku/pull/30 for details.
if (ct - cmtt > this._.duration) {
++this._.position;
continue;
}
if (this.media) {
cmt._utc = dn - (this.media.currentTime - cmt.time);
}
pendingList.push(cmt);
++this._.position;
}
setup(this._.stage, pendingList);
for (i = 0; i < pendingList.length; i++) {
cmt = pendingList[i];
cmt.y = allocate.call(this, cmt);
this._.runningList.push(cmt);
}
for (i = 0; i < this._.runningList.length; i++) {
cmt = this._.runningList[i];
var totalWidth = this._.width + cmt.width;
var elapsed = totalWidth * (dn - cmt._utc) * pbr / this._.duration;
if (cmt.mode === 'ltr') cmt.x = elapsed - cmt.width;
if (cmt.mode === 'rtl') cmt.x = this._.width - elapsed;
if (cmt.mode === 'top' || cmt.mode === 'bottom') {
cmt.x = (this._.width - cmt.width) >> 1;
}
render(this._.stage, cmt);
}
};
}
/* eslint no-invalid-this: 0 */
function play() {
if (!this._.visible || !this._.paused) {
return this;
}
this._.paused = false;
if (this.media) {
for (var i = 0; i < this._.runningList.length; i++) {
var cmt = this._.runningList[i];
cmt._utc = now() / 1000 - (this.media.currentTime - cmt.time);
}
}
var that = this;
var engine = createEngine(
this._.engine.framing.bind(this),
this._.engine.setup.bind(this),
this._.engine.render.bind(this),
this._.engine.remove.bind(this)
);
function frame(timestamp) {
engine.call(that, timestamp);
that._.requestID = raf(frame);
}
this._.requestID = raf(frame);
return this;
}
/* eslint no-invalid-this: 0 */
function pause() {
if (!this._.visible || this._.paused) {
return this;
}
this._.paused = true;
caf(this._.requestID);
this._.requestID = 0;
return this;
}
/* eslint no-invalid-this: 0 */
function seek() {
if (!this.media) {
return this;
}
this.clear();
resetSpace(this._.space);
var position = binsearch(this.comments, 'time', this.media.currentTime);
this._.position = Math.max(0, position - 1);
return this;
}
/* eslint no-invalid-this: 0 */
function bindEvents(_) {
_.play = play.bind(this);
_.pause = pause.bind(this);
_.seeking = seek.bind(this);
this.media.addEventListener('play', _.play);
this.media.addEventListener('pause', _.pause);
this.media.addEventListener('playing', _.play);
this.media.addEventListener('waiting', _.pause);
this.media.addEventListener('seeking', _.seeking);
}
/* eslint no-invalid-this: 0 */
function unbindEvents(_) {
this.media.removeEventListener('play', _.play);
this.media.removeEventListener('pause', _.pause);
this.media.removeEventListener('playing', _.play);
this.media.removeEventListener('waiting', _.pause);
this.media.removeEventListener('seeking', _.seeking);
_.play = null;
_.pause = null;
_.seeking = null;
}
/* eslint-disable no-invalid-this */
function init$1(opt) {
this._ = {};
this.container = opt.container || document.createElement('div');
this.media = opt.media;
this._.visible = true;
/* eslint-disable no-undef */
/* istanbul ignore next */
{
this.engine = 'dom';
this._.engine = domEngine;
}
/* eslint-enable no-undef */
this._.requestID = 0;
this._.speed = Math.max(0, opt.speed) || 144;
this._.duration = 4;
this.comments = opt.comments || [];
this.comments.sort(function(a, b) {
return a.time - b.time;
});
for (var i = 0; i < this.comments.length; i++) {
this.comments[i].mode = formatMode(this.comments[i].mode);
}
this._.runningList = [];
this._.position = 0;
this._.paused = true;
if (this.media) {
this._.listener = {};
bindEvents.call(this, this._.listener);
}
this._.stage = this._.engine.init(this.container);
this._.stage.style.cssText += 'position:relative;pointer-events:none;';
this.resize();
this.container.appendChild(this._.stage);
this._.space = {};
resetSpace(this._.space);
if (!this.media || !this.media.paused) {
seek.call(this);
play.call(this);
}
return this;
}
/* eslint-disable no-invalid-this */
function destroy() {
if (!this.container) {
return this;
}
pause.call(this);
this.clear();
this.container.removeChild(this._.stage);
if (this.media) {
unbindEvents.call(this, this._.listener);
}
for (var key in this) {
/* istanbul ignore else */
if (Object.prototype.hasOwnProperty.call(this, key)) {
this[key] = null;
}
}
return this;
}
var properties = ['mode', 'time', 'text', 'render', 'style'];
/* eslint-disable no-invalid-this */
function emit(obj) {
if (!obj || Object.prototype.toString.call(obj) !== '[object Object]') {
return this;
}
var cmt = {};
for (var i = 0; i < properties.length; i++) {
if (obj[properties[i]] !== undefined) {
cmt[properties[i]] = obj[properties[i]];
}
}
cmt.text = (cmt.text || '').toString();
cmt.mode = formatMode(cmt.mode);
cmt._utc = now() / 1000;
if (this.media) {
var position = 0;
if (cmt.time === undefined) {
cmt.time = this.media.currentTime;
position = this._.position;
} else {
position = binsearch(this.comments, 'time', cmt.time);
if (position < this._.position) {
this._.position += 1;
}
}
this.comments.splice(position, 0, cmt);
} else {
this.comments.push(cmt);
}
return this;
}
/* eslint-disable no-invalid-this */
function show() {
if (this._.visible) {
return this;
}
this._.visible = true;
if (this.media && this.media.paused) {
return this;
}
seek.call(this);
play.call(this);
return this;
}
/* eslint-disable no-invalid-this */
function hide() {
if (!this._.visible) {
return this;
}
pause.call(this);
this.clear();
this._.visible = false;
return this;
}
/* eslint-disable no-invalid-this */
function clear$1() {
this._.engine.clear(this._.stage, this._.runningList);
this._.runningList = [];
return this;
}
/* eslint-disable no-invalid-this */
function resize$1() {
this._.width = this.container.offsetWidth;
this._.height = this.container.offsetHeight;
this._.engine.resize(this._.stage, this._.width, this._.height);
this._.duration = this._.width / this._.speed;
return this;
}
var speed = {
get: function() {
return this._.speed;
},
set: function(s) {
if (typeof s !== 'number' ||
isNaN(s) ||
!isFinite(s) ||
s <= 0) {
return this._.speed;
}
this._.speed = s;
if (this._.width) {
this._.duration = this._.width / s;
}
return s;
}
};
function Danmaku(opt) {
opt && init$1.call(this, opt);
}
Danmaku.prototype.destroy = function() {
return destroy.call(this);
};
Danmaku.prototype.emit = function(cmt) {
return emit.call(this, cmt);
};
Danmaku.prototype.show = function() {
return show.call(this);
};
Danmaku.prototype.hide = function() {
return hide.call(this);
};
Danmaku.prototype.clear = function() {
return clear$1.call(this);
};
Danmaku.prototype.resize = function() {
return resize$1.call(this);
};
Object.defineProperty(Danmaku.prototype, 'speed', speed);
return Danmaku;
})));

View File

@@ -0,0 +1,658 @@
let urlPrefix = getUrlPrefix()
let browser = checkVersion()
let env = EnvCheck();
if (env == 'test') {
new VConsole();
}
// 封裝layer消息提醒框
let layerIndex
var langReplace;
var localLang;
const showLoading = (content = langReplace(localLang.demoModule.layerIndex1)) => {
layer.open({
type: 2,
shadeClose: false,
content,
success(e) {
layerIndex = $(e).attr('index')
}
})
}
const hideLoading = (index) => {
layer.close(index)
}
const toastMsg = (content = langReplace(localLang.demoModule.layerIndex2), time = 2) => {
layer.open({
content,
time,
skin: 'msg'
})
}
var countupTime;//倒计时容器
// 弹幕专用
let damuPool = [];
let danmu = [];
let timer2;
// 初始化
let danmaku;
const initDanmu = () => {
danmaku = new Danmaku({
container: document.getElementById('my_container'),
speed: 60,
})
setDanmuData();
}
const setDanmuData = () => {
// damuPool = [
// { avatar: './images/logo.png', bless: '我把思念写着天空', },
// { avatar: './images/logo.png', bless: '我想永远陪着你', },
// { avatar: './images/logo.png', bless: '我爱你我爱你甜蜜蜜', },
// { avatar: './images/logo.png', bless: 'asdawdasdasdas', },
// ]
if (!timer2) {
timer2 = setInterval(() => {
if (!danmu.length) {
danmu = [...damuPool]
}
let danmushoot = danmu.shift();
if (danmushoot) {
renderDM(danmushoot);
}
}, 500);
}
}
const renderDM = (item) => {
danmaku.resize();
danmaku.emit({
mode: window.lang.code == 'ar' ? 'ltr' : 'rtl',
render: function () {
var $div = document.createElement('div');
$div.innerHTML = `
<div class="my_container_in">
<img src="${item.avatar}" alt="" class="tx">
<span>${item.bless}</span>
</div>`
return $div;
},
})
}
var page = 0;
var maxPage = 0;
var arr = [];
var lists = [];
var list = [];
var listType = 0;
// 初始化函數
$(function () {
getInfoFromClient();
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () {
// 頁面全屏
if (browser.app) {
if (browser.android) {
window.androidJsObj.initShowNav(false)
} else {
window.webkit.messageHandlers.initShowNav.postMessage(0)
}
};
// 頂部返回事件
$('.back img').click(() => {
if (browser.android) {
window.androidJsObj.closeWebView()
} else {
window.webkit.messageHandlers.closeWebView.postMessage(null)
}
})
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();
blessGetConfig();
questionConfig();
}, 100)
})
function translateFun() {
var langReplace = window.lang.replace;
var localLang = window.lang;
$('.text1').html(langReplace(localLang.demoModule.text1));
$('.text2').html(langReplace(localLang.demoModule.text2));
$('.text3').html(langReplace(localLang.demoModule.text3));
$('.text4').html(langReplace(localLang.demoModule.text4));
$('.text5').html(langReplace(localLang.demoModule.text5));
$('.text6').html(langReplace(localLang.demoModule.text6));
$('.text7').html(langReplace(localLang.demoModule.text7));
$('.text8').html(langReplace(localLang.demoModule.text8));
$('.text9').html(langReplace(localLang.demoModule.text9));
$('.text10').html(langReplace(localLang.demoModule.text10));
$('.text11').html(langReplace(localLang.demoModule.text11));
$('.text12').html(langReplace(localLang.demoModule.text12));
$('.text13').html(langReplace(localLang.demoModule.text13));
$('.text14').html(langReplace(localLang.demoModule.text14));
$('.text15').html(langReplace(localLang.demoModule.text15));
$('.text16').html(langReplace(localLang.demoModule.text16));
$('.text17').html(langReplace(localLang.demoModule.text17));
$('.text18').html(langReplace(localLang.demoModule.text18));
$('.text19').html(langReplace(localLang.demoModule.text19));
$('.text20').html(langReplace(localLang.demoModule.text20));
$('.text21').html(langReplace(localLang.demoModule.text21));
$('.text22').html(langReplace(localLang.demoModule.text22));
$('.text23').html(langReplace(localLang.demoModule.text23));
$('.text24').html(langReplace(localLang.demoModule.text24));
$('.text25').html(langReplace(localLang.demoModule.text25));
$('.text26').html(langReplace(localLang.demoModule.text26));
$('.text27').html(langReplace(localLang.demoModule.text27));
$('.text28').html(langReplace(localLang.demoModule.text28));
$('.text29').html(langReplace(localLang.demoModule.text29));
$('.text30').html(langReplace(localLang.demoModule.text30));
$('.text31').html(langReplace(localLang.demoModule.text31));
$('.text32').html(langReplace(localLang.demoModule.text32));
$('.text34').html(langReplace(localLang.demoModule.text34));
$('.text35').html(langReplace(localLang.demoModule.text35));
$('.text36').html(langReplace(localLang.demoModule.text36));
$('.text37').html(langReplace(localLang.demoModule.text37));
$('.text38').html(langReplace(localLang.demoModule.text38));
$('.text39').html(langReplace(localLang.demoModule.text39));
$('.text40').html(langReplace(localLang.demoModule.text40));
$('.text41').html(langReplace(localLang.demoModule.text41));
$('.text42').html(langReplace(localLang.demoModule.text42));
$('.text43').html(langReplace(localLang.demoModule.text43));
$('.text60').html(langReplace(localLang.demoModule.text60));
$('.text61').html(langReplace(localLang.demoModule.text61));
$('.text62').html(langReplace(localLang.demoModule.text62));
$('.text63').html(langReplace(localLang.demoModule.text63));
$('.text64').html(langReplace(localLang.demoModule.text64));
$('.header .ramadanBlessings input').attr('placeholder', langReplace(localLang.demoModule.text65));
$('.text66').html(langReplace(localLang.demoModule.text66));
$('.text67').html(langReplace(localLang.demoModule.text67));
$('.page2 .rewardsPub .rewardsPub_in .box img').attr("src", langReplace(localLang.demoModule.text45))
if (browser.ios) {
$('.text33').html(langReplace(localLang.demoModule.text33));
} else {
$('.text33').html(langReplace(localLang.demoModule.text34));
}
}
// 弹幕接口
function blessGetConfig() {
showLoading()
networkRequest({
type: 'get',
url: urlPrefix + '/act/2025Ramadan/bless/getConfig',
success(res) {
if (res.code === 200) {
damuPool = res.data.blessQueue;
initDanmu();
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error(err) {
hideLoading(layerIndex)
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
// 主tab切换
$('.header .tab div').click(function () {
var i = $(this).index() + 1;
$('.page1,.page2,.page3').hide();
$(this).addClass('act').siblings().removeClass('act');
$(`.page${i}`).show();
if (i == 2) {
ramadanRank();
}
})
// ===============================================页面一===============================================
// 问题列表接口
function questionConfig(dates) {
showLoading()
networkRequest({
type: 'get',
url: urlPrefix + '/act/2025Ramadan/question/getConfig',
success(res) {
if (res.code === 200) {
// 进度
var num = res.data.cumulativeNum / 38 * 100
$('.page1 .c .page1_1 .medal .line .line_in').css('width', num + "%")
$('.page1 .c .page1_1 .medal .line span').text(`${res.data.cumulativeNum}/38`);
var myMap = res.data.questionStatusMap;
// 渲染日期
$('.page1 .c .page1_2 .calendar .calendar_in div').remove();
var calendarStr = '';
for (let key in myMap) {
if (myMap.hasOwnProperty(key)) {
calendarStr += `
<div class="${myMap[key] == 3 || myMap[key] == 2 ? 'act' : ''}">
<span>${formattedDate(key)}</span>
<img src="${myMap[key] == 3 ? './images/corrects.png' : myMap[key] == 2 ? './images/incorrect.png' : ''}" alt="">
</div>
`
if (key == '2025-03-03' && myMap[key] == 3) {
$('.page1 .c .page1_2 .rewars1 div .doneBut').show();
}
if (key == '2025-03-07' && myMap[key] == 3) {
$('.page1 .c .page1_2 .rewars2 div .doneBut').show();
}
if (key == '2025-03-15' && myMap[key] == 3) {
$('.page1 .c .page1_2 .rewars3 div .doneBut').show();
}
if (key == '2025-03-30' && myMap[key] == 3) {
$('.page1 .c .page1_2 .rewars4 div .doneBut').show();
}
}
}
$('.page1 .c .page1_2 .calendar .calendar_in').append(calendarStr);
// 渲染灯笼
$('.page1 .lanternBox div').remove();
var lantern = ''
var bool = false;
for (let key in myMap) {
if (myMap.hasOwnProperty(key)) {
bool = !bool;
lantern += `
<div status="${myMap[key]}" date="${key}" class="buts ${key == '2025-03-03' || key == '2025-03-07' || key == '2025-03-15' || key == '2025-03-30' ? 'special' : ''} ${bool ? 'singular' : ''} ${myMap[key] == 0 ? 'hangInTheAir' : myMap[key] == 1 ? 'beCompleted' : myMap[key] == 2 || myMap[key] == 3 ? 'completed' : ''}">
<div class="lanternDate">${formattedDate(key)}</div>
<img src="./images/ok.png" alt="" class="ok">
<img src="./images/notOk.png" alt="" class="notOk">
<div class="gift" style="display:${key == '2025-03-03' || key == '2025-03-07' || key == '2025-03-15' || key == '2025-03-30' ? 'block' : 'none'}">
<img src="./images/${key == '2025-03-03' ? 'questionSheet1' : key == '2025-03-07' ? 'questionSheet2' : key == '2025-03-15' ? 'questionSheet3' : key == '2025-03-30' ? 'questionSheet4' : ''}.png" alt="">
</div>
</div>
`
}
}
$('.page1 .lanternBox').append(lantern);
getQuestion(dates ? dates : res.data.curDate);
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error(err) {
hideLoading(layerIndex)
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
function formattedDate(dateStr) {
const parts = dateStr.split("-");
const month = parseInt(parts[1], 10);
const day = parseInt(parts[2], 10);
return `${month}/${day}`
}
// 获取问题接口
function getQuestion(date) {
showLoading()
networkRequest({
type: 'get',
url: urlPrefix + '/act/2025Ramadan/question/getQuestion',
data: { date },
success(res) {
if (res.code === 200) {
$('.questionLists').attr('date', date);
$('.page1 .c .page1_1 .question .answersNum b').text(res.data.rightAnswerNum);
$('.page1 .c .page1_1 .question .questionText').text(res.data.question);
$('.page1 .c .page1_1 .question .a span').html('A &nbsp;&nbsp;' + res.data.optionA);
$('.page1 .c .page1_1 .question .b span').html('B &nbsp;&nbsp;' + res.data.optionB);
$('.page1 .c .page1_1 .question .c span').html('C &nbsp;&nbsp;' + res.data.optionC);
// 判断是否答题
$(`.page1 .c .page1_1 .question .questionLists `).removeClass('borders');
if (res.data.answer) {
// 已答题
$(`.page1 .c .page1_1 .question .${res.data.answer}`).addClass('borders');
$('.questionLists').attr('answer', 0);
$(`.page1 .c .page1_1 .question .questionLists img`).hide();
if (res.data.result) {
// 正确
$(`.page1 .c .page1_1 .question .${res.data.answer} img`).attr('src', './images/corrects.png')
} else {
// 不正确
$(`.page1 .c .page1_1 .question .${res.data.answer} img`).attr('src', './images/incorrect.png')
}
$(`.page1 .c .page1_1 .question .${res.data.answer} img`).show();
} else {
// 未答题
$(`.page1 .c .page1_1 .question .questionLists `).removeClass('borders');
$(`.page1 .c .page1_1 .question .questionLists img`).hide();
$('.questionLists').attr('answer', 1);
}
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error(err) {
hideLoading(layerIndex)
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
// 回答按钮
$('.questionLists').click(function () {
var option = $(this).attr('option');
var date = $(this).attr('date');
var answer = $(this).attr('answer');
if (answer == 1) {
questionAsk(date, option);
}
})
// 回答接口
function questionAsk(date, option) {
showLoading()
networkRequest({
type: 'get',
url: urlPrefix + '/act/2025Ramadan/question/ask',
data: { date, option },
success(res) {
if (res.code === 200) {
bodyScroolFun(false);
if (res.data.result) {
if (res.data.reward) {
$('.page1 .congratulations .congratulations_in .gift .gift_in').attr('src', res.data.reward.pic);
$('.page1 .congratulations .congratulations_in .gift .giftName').text(res.data.reward.name);
$('.page1 .congratulations .congratulations_in .gift .num').text(`${res.data.reward.num} ${res.data.reward.unit}`);
$('.page1 .congratulations').show();
}
} else {
$('.page1 .unfortunately').show();
}
questionConfig(date);
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error(err) {
hideLoading(layerIndex)
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
// 监听切换题目
$('.page1 .lanternBox').on('click', '.buts', function () {
var date = $(this).attr('date');
var status = $(this).attr('status');
if (status == 0) {
toastMsg(langReplace(localLang.demoModule.text44));
} else {
getQuestion(date)
}
})
// 页面1tab切换
$('.page1 .c .page1_tabBox div').click(function () {
var i = $(this).index() + 1;
$(this).addClass('act').siblings().removeClass('act');
$(`.page1_1,.page1_2`).hide();
$(`.page1_${i}`).show();
})
// 关闭答题错误弹窗
$('.page1 .unfortunately .unfortunately_in .close,.page1 .unfortunately .unfortunately_in .but').click(function () {
bodyScroolFun(false);
$('.page1 .unfortunately').hide();
})
// 关闭答题正确弹窗
$('.page1 .congratulations .congratulations_in .close,.page1 .congratulations .congratulations_in .but').click(function () {
bodyScroolFun(false);
$('.page1 .congratulations').hide();
})
// ===============================================页面二===============================================
// 发射弹幕接口
function bless(bless) {
showLoading()
networkRequest({
type: 'get',
url: urlPrefix + '/act/2025Ramadan/bless/bless',
data: { bless },
success(res) {
if (res.code === 200) {
danmaku.destroy();
blessGetConfig();
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error(err) {
hideLoading(layerIndex)
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
// 发送弹幕
$('.ramadanBlessings .send').click(function () {
var text = $('.ramadanBlessings input').val();
if (text.length > 20 || text.length == 0) {
toastMsg(langReplace(localLang.demoModule.text70));
return;
}
$('.tip').show();
bodyScroolFun(true);
})
// 确认发送按钮
$('.tip .tip_in .ok').click(function () {
var text = $('.ramadanBlessings input').val();
bodyScroolFun(false);
$('.tip').hide();
bless(text)
})
// 取消发送按钮
$('.tip .tip_in .close').click(function () {
bodyScroolFun(false);
$('.tip').hide();
})
// 转盘未获奖弹窗
$('.page2 .unfortunately .unfortunately_in .close,.page2 .unfortunately .unfortunately_in .but').click(function () {
bodyScroolFun(false);
$('.page2 .unfortunately').hide();
})
// 转盘获奖弹窗
$('.page2 .congratulations .congratulations_in .close,.page2 .congratulations .congratulations_in .but').click(function () {
bodyScroolFun(false);
$('.page2 .congratulations').hide();
})
// 转盘相关的
var arr = [20, 60, 100, 140, 180, 220, 260, 300];
var i = null;
var sec = 3;
var animationFunLock = true;
$('.page2 .turntable .c .pointerBut').click(function () {
i = Math.floor(Math.random() * arr.length);
console.log(Math.floor(Math.random() * arr.length));
if (animationFunLock) {
animationFunLock = false;
animationFun();
}
})
function animationFun() {
// 设置为立即从0默认值
$('.page2 .turntable .c .turntableBox .turntable_in img').css({
'transition': `all 0s`,
'transform': `rotate(0deg)`
});
// 在稍后的时间应用旋转效果
setTimeout(function () {
$('.page2 .turntable .c .turntableBox .turntable_in img').css({
'transition': `all ${sec}s`,
'transform': `rotate(${3 * 360 + arr[i]}deg)`,
});
}, 0);
setTimeout(function () {
animationFunLock = true;
}, sec * 1000)
}
// // ===============================================页面三===============================================
var countupTime;//倒计时容器
//tab切换
$('.page2 .list .c .page3_in1 .page3TabBox div').click(function () {
var i = $(this).index() + 1;
$(this).addClass('act').siblings().removeClass();
listType = $(this).attr('type');
$('.page2 .list .c .page3_in1 .timeOutBox').css('display', 'none');
$('.page2 .list .c .page3_in1 .yesterdayCoinsPool').hide();
$('.page2 .list .c .page3_in1 .no1 .rewards').hide();
if (i == 1) {
$('.page2 .list .c .page3_in1 .yesterdayCoinsPool').show();
} else if (i == 2) {
$('.page2 .list .c .page3_in1 .timeOutBox').css('display', 'flex');
} else {
$('.page2 .list .c .page3_in1 .timeOutBox').css('display', 'flex');
$('.page2 .list .c .page3_in1 .no1 .rewards').show();
}
ramadanRank();
})
// 榜单接口
function ramadanRank() {
showLoading()
networkRequest({
type: 'get',
url: urlPrefix + '/activity/h5/ramadan/rank',
data: { type: listType },
success(res) {
if (res.code === 200) {
$('.page2 .todayCoinsPool .num b').text(res.data.poolGoldNum);
var val = res.data.activityH5RankVo
if (listType == 1) {
console.log(val);
$('.page2 .list .c .page3_in1 .yesterdayCoinsPool .num b').text(val.totalGoldNum);
} else {
var endtime = new Date(res.data.activityH5RankVo.endTimeStr.replace(/\-/g, '/')).getTime();
countup(endtime - res.timestamp);
}
var listTo3 = val.rankList.slice(0, 3);
var notListTo3 = val.rankList.slice(3);
// 处理前三
if (listTo3.length < 3) {
let arr = new Array(3 - listTo3.length).fill({
avatar: './images/logo.png',
name: langReplace(localLang.demoModule.text68),
erbanNo: "",
diffExp: '',
userLevelVo: {
experUrl: null
}
})
listTo3.push(...arr)
}
$('.page2 .list .c .page3_in1 .no1 .score').hide();
listTo3.forEach((res, i) => {
$(`.page2 .list .c .page3_in1 .no${i + 1} .tx`).attr('src', res.avatar);
$(`.page2 .list .c .page3_in1 .no${i + 1} .name `).html(`<b>${res.name.length > 4 ? res.name.slice(0, 4) + '...' : res.name}</b> <img src="${res.userLevelVo.experUrl}" alt="">`);
$(`.page2 .list .c .page3_in1 .no${i + 1} .id`).text("ID: " + res.erbanNo);
$(`.page2 .list .c .page3_in1 .no${i + 1} .score b`).text(unitProcessingAr(res.diffExp, 1));
if (res.userLevelVo.experUrl == null) {
$(`.page2 .list .c .page3_in1 .no23 .no${i + 1} .name img`).hide()
$(`.page2 .list .c .page3_in1 .no23 .no${i + 1} .score`).hide()
$(`.page2 .list .c .page3_in1 .no23 .no${i + 1} .id`).hide()
} else {
$(`.page2 .list .c .page3_in1 .no23 .no${i + 1} .name img`).show()
$(`.page2 .list .c .page3_in1 .no23 .no${i + 1} .score`).show()
$(`.page2 .list .c .page3_in1 .no23 .no${i + 1} .id`).show()
}
})
// 处理非前三
var str = '';
$('.page2 .list .c .page3_in1 ul li').remove();
notListTo3.forEach((res, i) => {
str += `
<li>
<div class="num">${res.rank}</div>
<img src="${res.avatar}" alt="" class="tx">
<div class="user">
<p>
<b>${res.name.length > 4 ? res.name.slice(0, 4) + '...' : res.name}</b>
<img src="${res.userLevelVo.experUrl}" alt="">
</p>
<span>ID: ${res.erbanNo}</span>
</div>
<div class="score">
<span class="text30">${langReplace(localLang.demoModule.text30)}${unitProcessingAr(res.diffExp, 1)}</span>
</div>
</li>
`;
});
$('.page2 .list .c .page3_in1 ul').append(str);
// 处理自己
var my = res.data.activityH5RankVo.myRank;
if (my.rank == 1) {
$('.page2 .my .score').hide();
}
if (my.rank == 0) {
$('.page2 .my .num').css({ "font-size": "0.3rem", "width": '1rem', "text-indent": "-0.2rem" });
}
$('.page2 .my .num').text(my.rank == 0 ? langReplace(localLang.demoModule.text69) : my.rank);
$('.page2 .my .tx').attr('src', my.avatar);
$('.page2 .my .user').html(`<p><b>${my.name.length > 6 ? my.name.slice(0, 4) + '...' : my.name}</b> <img src="${my.userLevelVo.experUrl}" alt=""><span>ID:${my.erbanNo}</span></p>`);
$('.page2 .my .score').html(`<span class="text30">${langReplace(localLang.demoModule.text30)}</span>${unitProcessingAr(my.diffExp, 1)}`)
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error(err) {
hideLoading(layerIndex)
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
// 打开弹窗奖励
$('.page2 .list .c .page3_in1 .no1 .rewards').click(function () {
$('.page2 .rewardsPub').show();
bodyScroolFun(true);
})
// 关闭弹窗奖励
$('.page2 .rewardsPub .rewardsPub_in .close').click(function () {
$('.page2 .rewardsPub').hide();
bodyScroolFun(false);
})
// 倒計時
function countup(leftTime) {
clearTimeout(countupTime)
//獲取當前時間
// var now = nowTime;
var d = 0;
var h = 0;
var m = 0;
var s = 0;
//定義變數 d,h,m,s保存倒計時的時間
var d, h, m, s;
//遞歸每秒調⽤countTime⽅法顯⽰動態時間效果
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中
$('.page2 .list .c .page3_in1 .timeOutBox .days b').text(d);
$('.page2 .list .c .page3_in1 .timeOutBox .hours b').text(h);
$('.page2 .list .c .page3_in1 .timeOutBox .mins b').text(m);
$('.page2 .list .c .page3_in1 .timeOutBox .secs b').text(s);
} else {
ramadanRank();
}
if (leftTime > 0) {
leftTime = leftTime - 1000;
}
countupTime = setTimeout(function () {
countup(leftTime);
}, 1000);
}
//补0操作
function getzf(num) {
if (parseInt(num) < 10) {
num = '0' + num;
}
return num;
}

View File

@@ -0,0 +1,66 @@
// 阿拉伯
langAr = {
// 模块
demoModule: {
layerIndex1: 'جار التحميل...',
layerIndex2: 'اكتملت العملية',
layerIndex3: 'خطأ في الشبكة، يرجى الخروج وإعادة الدخول',
text1: `احتفل بعيد الأضحى المبارك`,
text2: `وقت الفعالية: ١ - ١٦ يونيو`,
text3: `<span>أسئلة</span>`,
text4: `<span> العملات اليوم</span>`,
text5: `أسئلة اليوم`,
text6: `ورقة أسئلتي`,
text7: `استمر في الإجابة على الأسئلة لتحصل على ميدالية عيد أضحى مباركة دائمة`,
text8: `عدد الإجابات الصحيحة: <b>0</b>`,
text9: `س: سجّل دخولك يوميًا للإجابة على الأسئلة. يمكنك الحصول على ميدالية عيد أضحى مباركة دائمة من خلال الإجابة على الأسئلة باستمرار. كما ستتاح لك فرصة ربح هدايا مميزة.`,
text10: `أجب بشكل صحيح في 6/10/13/17 يونيو للحصول على`,
text11: `تم`,
text12: `أجب عن الأسئلة باستمرار لتحصل على ميدالية عيد الأضحى المبارك`,
text13: `للأسف`,
text14: `للأسف، لم تجب على السؤال بشكل صحيح ولا يمكنك الحصول على المكافأة! استمر في المحاولة!`,
text15: `موافق`,
text16: `تهانينا`,
text17: `تهانينا لحصولك على:`,
text18: `مسبح العملات لليوم`,
text19: `يمكن لأفضل 10 مستخدمين في الترتيب مشاركة مسبح العملات`,
text20: `هدايا عيد الأضحى المبارك`,
text21: `أرسل هدايا عيد الأضحى المبارك، ويمكن لأفضل ١٠ مستخدمين في ترتيب النقاط اليومي مشاركة مجموعة العملات. كلما استثمرت أكثر، زادت ربحك.`,
text22: `مشاركة <br> الأمس`,
text23: `ترتيب <br> اليوم`,
text24: `إجمالي <br> الترتيب`,
text25: `أيام`,
text26: `ساعات`,
text27: `دقائق`,
text28: `ثواني`,
text29: `مسبح العملات ليوم أمس`,
text30: `متأخر:`,
text31: `المكافآت`,
text32: `المكافآت`,
text33: `هذا الحدث لا علاقة له بـ Apple.`,
text34: `هذا الحدث لا علاقة له بـ Google.`,
text35: `CP`,
text37: `عادي`,
text39: `محظوظ`,
text36: `فوانيس رمضان<br>27/02/2025`,
text38: `رمضان<br>27/02/2025`,
text40: `فوانيس الحظ<br>27/02/2025`,
text41: `القرآن الكريم<br>15/03/2025`,
text42: `كعكات العيد<br>30/03/2025`,
text43: `عشاء فاخر<br>30/03/2025`,
text44: `لم يحن وقت الإجابة بعد`,
text45: `./images/rewardsPage3-ar.png`,
text60: `تنبيه`,
text61: `إرسال تهاني رمضان يتطلب 77 قطعة ذهب. هل متأكد؟`,
text62: `إلغاء`,
text63: `تأكيد`,
text64: `تهاني عيد الأضحى المبارك`,
text65: `احتفل بعيد الأضحى المبارك`,
text66: `إرسال`,
text67: `في كل مرة ترسل فيها تهنئة، سيتم خصم 77 عملة`,
text68: `شاغر`,
text69: `غير`,
text70: `المحتوى لا يمكن أن يكون فارغًا ولا يمكن أن يتجاوز 20 حرفًا`,
}
}

View File

@@ -0,0 +1,66 @@
// 英文
langEn = {
// 模块
demoModule: {
layerIndex1: 'Loading...',
layerIndex2: 'Operation completed',
layerIndex3: 'Network error, please exit and re-enter',
text1: `Celebrate Eid al-Adha`,
text2: `Event time: June 1st - June 16th`,
text3: `<span>Questions</span>`,
text4: `<span>Coins Pool</span>`,
text5: `Today's Questions`,
text6: `My Question Sheet`,
text7: `Continue answering questions to earn you a permanent Eid al-Adha Medal`,
text8: `Number of correct answers: <b>0</b>`,
text9: `Q: Log in every day to answer questions. You can get a permanent Eid al-Adha medal by answering questions continuously. You'll also have the opportunity to earn special gifts along the way.`,
text10: `Answer correctly on June 6/10/13/17 to get`,
text11: `Done`,
text12: `Answer questions continuously to get Eid al-Adha Medal`,
text13: `Unfortunately`,
text14: `Unfortunately, you didn't answer the question correctly and can't get the reward!
Keep going!`,
text15: `OK`,
text16: `Congratulations`,
text17: `Congratulations on receiving:`,
text18: `Today's Coins Pool`,
text19: `The top 10 users on the ranking can share the Coins Pool`,
text20: `Eid al-Adha Gifts`,
text21: `Send Eid al-Adha gifts, and the top 10 users with the daily points ranking can share the coin pool. The more you invest, the more you earn.`,
text22: `Yesterday's <br> Share`,
text23: `Today's <br> Ranking`,
text24: `Total <br> Ranking`,
text25: `Days`,
text26: `Hours`,
text27: `Mins`,
text28: `Secs`,
text29: `Yesterday's Coins Pool`,
text30: `Behind: `,
text31: `Rewards`,
text32: `Rewards`,
text33: `Event has nothing to do with Apple.`,
text34: `Event has nothing to do with Google.`,
text35: `CP`,
text36: `RamadanLanterns<br>27/02/2025`,
text37: `Normal`,
text38: `Ramadan<br>27/02/2025`,
text39: `Lucky`,
text40: `Lucky Lanterns<br>27/02/2025`,
text41: `Holy Quran<br>15/03/2025`,
text42: `Eid Cakes<br>30/03/2025`,
text43: `Fancy Dinner<br>30/03/2025`,
text44: `It is not yet time to answer`,
text45: `./images/rewardsPage3.png`,
text60: `Tip`,
text61: `Sending Ramadan blessings requires 77 coins. Send it?`,
text62: `Cancel`,
text63: `Confirm`,
text64: `Eid al-Adha Blessings`,
text65: `Celebrate Eid al-Adha`,
text66: `Send`,
text67: `Each time you send a blessing, it will consume 77 coins`,
text68: `Vacant`,
text69: `Unranked`,
text70: `Content cannot be empty and cannot exceed 20 characters`,
}
}

View File

@@ -0,0 +1,66 @@
// 土耳其
langTr = {
// 模塊
demoModule: {
layerIndex1: 'Yükleniyor...',
layerIndex2: 'İşlem tamamlandı',
layerIndex3: 'Ağ hatası, lütfen çıkış yapıp tekrar girin',
text1: `Kurban Bayramı'nı kutlayın`,
text2: `Etkinlik zamanı: 1 Haziran - 16 Haziran`,
text3: `<span>Soruları</span>`,
text4: `<span>Coin Havuzu</span>`,
text5: `Günün Soruları`,
text6: `Benim Soru Kartım`,
text7: `Kalıcı bir Kurban Bayramı Madalyası kazanmak için soruları yanıtlamaya devam edin`,
text8: `Doğru cevap sayısı: <b>0</b>`,
text9: `S: Soruları yanıtlamak için her gün oturum açın. Sürekli olarak soruları yanıtlayarak kalıcı bir Kurban Bayramı madalyası kazanabilirsiniz. Ayrıca bu arada özel hediyeler kazanma fırsatınız da olacak.`,
text10: `6/10/13/17 Haziran'da doğru cevap verin ve alın`,
text11: `Tamamlandı`,
text12: `Kurban Bayramı Madalyası almak için soruları sürekli olarak yanıtlayın`,
text13: `Maalesef`,
text14: `Maalesef, soruyu yanlış cevapladınız ve ödül alamadınız! Devam edin!`,
text15: `Tamam`,
text16: `Tebrikler`,
text17: `Tebrikler, kazandınız:`,
text18: `Bugünün Coin Havuzu`,
text19: `Sıralamadaki ilk 10 kullanıcı Coin Havuzunu paylaşabilir`,
text20: `Kurban Bayramı Hediyeleri`,
text21: `Kurban Bayramı hediyeleri gönderin ve günlük puan sıralamasına sahip ilk 10 kullanıcı madeni para havuzunu paylaşabilir. Ne kadar çok yatırım yaparsanız o kadar çok kazanırsınız.`,
text22: `Dünün <br> Paylaşımı`,
text23: `Bugünün <br> Sıralaması`,
text24: `Genel <br> Sıralama`,
text25: `Gün`,
text26: `Saat`,
text27: `Dakika`,
text28: `Saniye`,
text29: `Dünün Coin Havuzu`,
text30: `Geride:`,
text31: `Ödüller`,
text32: `Ödüller`,
text33: `Bu etkinlik Apple ile ilgili değildir.`,
text34: `Bu etkinlik Google ile ilgili değildir.`,
text35: `CP`,
text37: `Sıradan`,
text39: `Şanslı`,
text36: `Ramazan Fenerleri<br>27/02/2025`,
text38: `Ramazan<br>27/02/2025`,
text40: `Şans Fenerleri<br>27/02/2025`,
text41: `Kur'an-ı Kerim<br>15/03/2025`,
text42: `Bayram Pastaları<br>30/03/2025`,
text43: `Şık Akşam Yemeği<br>30/03/2025`,
text44: `Yanıt verme zamanı henüz gelmedi`,
text45: `./images/rewardsPage3-tr.png`,
text60: `İpucu`,
text61: `Ramazan tebrikleri için 77 altın gerekiyor, gönderilsin mi?`,
text62: `İptal`,
text63: `Onayla`,
text64: `Kurban Bayramı Kutlamaları`,
text65: `Kurban Bayramı'nı kutlayın`,
text66: `Gönder`,
text67: `Her kutlama gönderdiğinizde 77 jeton harcanacaktır`,
text68: `Boş`,
text69: `Sırasız`,
text70: `İçerik boş olamaz ve 20 karakteri geçemez`,
}
}

View File

@@ -0,0 +1,67 @@
// 中文
langZh = {
// 模塊
demoModule: {
layerIndex1: '載入中...',
layerIndex2: '操作完成',
layerIndex3: '網絡錯誤,請退出並重新進入',
text1: `慶祝宰牲節`,
text2: `活動時間6月1日-6月16日`,
text3: `<span>問答</span>`,
text4: `<span>金幣獎池</span>`,
text5: `今日問題`,
text6: `我的答題卡`,
text7: `繼續回答問題即可獲得永久的宰牲節獎章`,
text8: `正確回答數量:<b>0</b>`,
text9: `Q每天登入回答問題。連續回答問題即可獲得永久的宰牲節獎章。您還將有機會獲得特殊禮物。`,
text10: `6 月 6 日/10 日/13 日/17日正確回答可獲得`,
text11: `完成`,
text12: `連續回答問題即可獲得宰牲節獎章`,
text13: `很遺憾`,
text14: `很遺憾,您沒有答對問題,無法獲得獎勵!繼續加油!`,
text15: `確定`,
text16: `恭喜`,
text17: `恭喜獲得:`,
text18: `今日金幣獎池`,
text19: `排行榜前10名的用戶可分享金幣獎池`,
text20: `宰牲節禮物`,
text21: `送宰牲節禮物每日積分排名前10名用戶可共享幣池。投入越多賺得越多。`,
text22: `昨日 <br> 分享`,
text23: `今日 <br> 排行榜`,
text24: `總 <br> 排行榜`,
text25: ``,
text26: `小時`,
text27: `分鐘`,
text28: ``,
text29: `昨日金幣獎池`,
text30: `落後:`,
text31: `獎勵`,
text32: `獎勵`,
text33: `此活動與 Apple 無關。`,
text34: `此活動與 Google 無關。`,
text35: `CP`,
text36: `提灯<br>27/02/2025`,
text37: `普通`,
text38: `斋月<br>27/02/2025`,
text39: `幸运`,
text40: `幸运提灯<br>27/02/2025`,
text41: `古兰经<br>15/03/2025`,
text42: `开斋节蛋糕<br>30/03/2025`,
text43: `丰盛晚餐<br>30/03/2025`,
text44: `还未到答题时间`,
text45: `./images/rewardsPage3.png`,
text60: `提示`,
text61: `發送齋月祝福需要 77 顆金币。您確定要發送嗎?`,
text62: `取消`,
text63: `確認`,
text64: `宰牲節祝福`,
text65: `慶祝宰牲節`,
text66: `發送`,
text67: `每次發送祝福都會消耗77枚硬幣`,
text68: `空缺`,
text69: `未上榜`,
text70: `內容不能為空,且不能超過 20 個字`,
}
}