完成cp活动

This commit is contained in:
dragon
2024-10-31 19:17:27 +08:00
parent 1d7f1bea2a
commit adb5cbf70d
56 changed files with 3771 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: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 776 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 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: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,295 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Love Ferris wheel</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">
<!-- 规则Icon -->
<div class="rule_icon">Rules</div>
<!-- 摩天轮 -->
<div id="carousel" class="carousel">
<img src="./images/carouselTitle.png" alt="" class="carouselTitle">
<div class="carousel_in1">
<img src="./images/null.png" alt="" class="tx1">
<img src="./images/null.png" alt="" class="tx2">
</div>
<div class="carousel_in2">
<img src="./images/null.png" alt="" class="tx1">
<img src="./images/null.png" alt="" class="tx2">
</div>
<div class="carousel_in3">
<img src="./images/null.png" alt="" class="tx1">
<img src="./images/null.png" alt="" class="tx2">
</div>
<div class="carousel_in4">
<img src="./images/null.png" alt="" class="tx1">
<img src="./images/null.png" alt="" class="tx2">
</div>
<div class="carousel_in5">
<img src="./images/null.png" alt="" class="tx1">
<img src="./images/null.png" alt="" class="tx2">
</div>
<div class="carousel_in6">
<img src="./images/null.png" alt="" class="tx1">
<img src="./images/null.png" alt="" class="tx2">
</div>
</div>
<!-- 摩天轮底座 -->
<img src="./images/carouselBoom.png" alt="" class="carouselBoom">
<!-- 倒计时 -->
<div class="timeBox">
<div class="day">
<b>00</b>
<span class="">Day</span>
</div>
<div class="hour">
<b>00</b>
<span class="">Hour</span>
</div>
<div class="min">
<b>00</b>
<span class="">Min</span>
</div>
<div class="sec">
<b>00</b>
<span class="">Sec</span>
</div>
</div>
<!-- 音乐 -->
<div class="music">
<audio autoplay loop id="musics">
<source src="./music/music.mp3" type="audio/mpeg">
</audio>
</div>
<!-- 关闭音乐 -->
<img src="./images/notOpen.png" alt="" class="notOpen">
</div>
<!-- tab -->
<div class="tabBox">
<div class="act">CP Square</div>
<div class="">CP List</div>
<div class="">CP Rewards</div>
</div>
<!-- 页面1 -->
<div class="page1">
<div class="top">
<p>Top three users on the history list will be displayed here</p>
</div>
<div class="contentBox">
<div class="content">
<img src="./images/TimeTitle.png" alt="" class="timeTitle">
<div class="times">2024.09.09-2024.09.16</div>
<div class="topBox">
<div class="top1">
<img src="./images/ts1.png" alt="" class="tsL">
<img src="./images/ts1.png" alt="" class="tsR">
<img src="./images/null.png" alt="" class="txL">
<img src="./images/null.png" alt="" class="txR">
<div class="nameL">虚位以待</div>
<div class="nameR">虚位以待</div>
<div class="idL">ID:0</div>
<div class="idR">ID:0</div>
<div class="sclore"><img src="./images/love.png" alt="">0K</div>
</div>
<div class="top2">
<img src="./images/ts23.png" alt="" class="tsL">
<img src="./images/ts23.png" alt="" class="tsR">
<img src="./images/null.png" alt="" class="txL">
<img src="./images/null.png" alt="" class="txR">
<div class="nameL">虚位以待</div>
<div class="nameR">虚位以待</div>
<div class="idL">ID:0</div>
<div class="idR">ID:0</div>
<div class="sclore"><img src="./images/love.png" alt="">0K</div>
</div>
<div class="top3">
<img src="./images/ts23.png" alt="" class="tsL">
<img src="./images/ts23.png" alt="" class="tsR">
<img src="./images/null.png" alt="" class="txL">
<img src="./images/null.png" alt="" class="txR">
<div class="nameL">虚位以待</div>
<div class="nameR">虚位以待</div>
<div class="idL">ID:0</div>
<div class="idR">ID:0</div>
<div class="sclore"><img src="./images/love.png" alt="">0K</div>
</div>
</div>
</div>
</div>
<div class="bottom"></div>
</div>
<!-- 页面2 -->
<div class="page2">
<div class="top">
<p>Send CP gifts and you and your love may be on the list!</p>
</div>
<div class="content">
<div class="topBox">
<div class="top1">
<img src="./images/ts1.png" alt="" class="tsL">
<img src="./images/ts1.png" alt="" class="tsR">
<img src="./images/null.png" alt="" class="txL">
<img src="./images/null.png" alt="" class="txR">
<div class="nameL">虚位以待</div>
<div class="nameR">虚位以待</div>
<div class="idL">ID:0</div>
<div class="idR">ID:0</div>
<div class="sclore"><img src="./images/love.png" alt="">0K</div>
</div>
<div class="top2">
<img src="./images/ts23.png" alt="" class="tsL">
<img src="./images/ts23.png" alt="" class="tsR">
<img src="./images/null.png" alt="" class="txL">
<img src="./images/null.png" alt="" class="txR">
<div class="nameL">虚位以待</div>
<div class="nameR">虚位以待</div>
<div class="idL">ID:0</div>
<div class="idR">ID:0</div>
<div class="sclore"><img src="./images/love.png" alt="">0K</div>
</div>
<div class="top3">
<img src="./images/ts23.png" alt="" class="tsL">
<img src="./images/ts23.png" alt="" class="tsR">
<img src="./images/null.png" alt="" class="txL">
<img src="./images/null.png" alt="" class="txR">
<div class="nameL">虚位以待</div>
<div class="nameR">虚位以待</div>
<div class="idL">ID:0</div>
<div class="idR">ID:0</div>
<div class="sclore"><img src="./images/love.png" alt="">0K</div>
</div>
</div>
<ul>
<li>
<div class="num">4</div>
<div class="txL">
<img src="./images/null.png" alt="">
<p>虚位以待</p>
</div>
<img src="./images/loves.png" alt="" class="loves">
<div class="txR">
<img src="./images/null.png" alt="">
<p>虚位以待</p>
</div>
<div class="scores">
<img src="./images/love.png" alt="">
<span>0K</span>
</div>
</li>
</ul>
<div class="more">More</div>
</div>
<div class="bottom"></div>
</div>
<!-- 页面3 -->
<div class="page3">
<div class="top">
<img src="./images/TimeTitle.png" alt="" class="timeTitle">
<div class="title">TOP1</div>
</div>
<div class="content">
<div class="times">Top 1 user on the weekly list can get the following rewards</div>
<div class="topBox1">
<img src="./images/bo.png" alt="" class="bo">
<img src="./images/bo.png" alt="" class="bo2">
<div class="ts1" id="ts1"></div>
</div>
<img src="./images/TimeTitle.png" alt="" class="timeTitle">
<div class="title">TOP2</div>
<div class="times">Top 2 user on the weekly list can get the following rewards</div>
<div class="topBox2">
<img src="./images/bo.png" alt="" class="bo">
<img src="./images/bo.png" alt="" class="bo2">
<div class="ts2" id="ts2"></div>
</div>
<img src="./images/TimeTitle.png" alt="" class="timeTitle">
<div class="title">TOP3</div>
<div class="times">Top 3 user on the weekly list can get the following rewards</div>
<div class="topBox3">
<img src="./images/bo.png" alt="" class="bo">
<img src="./images/bo.png" alt="" class="bo2">
<div class="ts3" id="ts3"></div>
</div>
</div>
<div class="bottom"></div>
</div>
<!-- 规则 -->
<div class="rule">
<div class="ruleIn">
<img src="./images/close.png" alt="" class="close">
<div class="title">Rules</div>
<div class="texts">
<p>1. Event time: Monday 0:00-Sunday 23:59 (GMT+3)</p>
<p>2. Send 1 coin CP gift to get 1 love value. The more gifts you send, the more love value you get.</p>
<p>3. The top three users on the weekly statistical list will get generous gifts.</p>
<p>4. Recharge agent users do not participate in this event.</p>
<p>5. This event has nothing to do with Google and Apple.</p>
</div>
</div>
</div>
<!-- mp4 -->
<div class="zjvideo1">
<video id="zjvideo1" controls playsinline webkit-playsinline>
<source src="./mp4/zj1.mp4" type="video/mp4">
</video>
<img src="./images/close.png" alt="" class="close">
</div>
<div class="xzvideo1">
<video id="xzvideo1" controls playsinline webkit-playsinline>
<source src="./mp4/xz1.mp4" type="video/mp4">
</video>
<img src="./images/close.png" alt="" class="close">
</div>
<div class="zjvideo2">
<video id="zjvideo2" controls playsinline webkit-playsinline>
<source src="./mp4/zj23.mp4" type="video/mp4">
</video>
<img src="./images/close.png" alt="" class="close">
</div>
<div class="xzvideo2">
<video id="xzvideo2" controls playsinline webkit-playsinline>
<source src="./mp4/xz2.mp4" type="video/mp4">
</video>
<img src="./images/close.png" alt="" class="close">
</div>
<div class="zjvideo3">
<video id="zjvideo3" controls playsinline webkit-playsinline>
<source src="./mp4/zj23.mp4" type="video/mp4">
</video>
<img src="./images/close.png" alt="" class="close">
</div>
<div class="xzvideo3">
<video id="xzvideo3" controls playsinline webkit-playsinline>
<source src="./mp4/xz3.mp4" type="video/mp4">
</video>
<img src="./images/close.png" alt="" class="close">
</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="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="./js/wow.js"></script>
<script src="../../common/js/svga.min.js"></script>
<script src="./js/index.js"></script>
<script src="../../common/local/langHandler.js"></script>

View File

@@ -0,0 +1,363 @@
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;
var thisWeekCpRankTop3 = []
var thisWeekCpRank = []
// 初始化函數
$(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()
get();
var audio = document.getElementById("musics");
// 尝试自动播放音频
audio.play().then(function () {
// 如果自动播放成功
$('.header .music').show();
console.log('成功');
}).catch(function (error) {
$('.header .notOpen').show();
console.log('失败');
})
}, 100)
})
function translateFun() {
var langReplace = window.lang.replace;
var localLang = window.lang;
// $('.text1').text(langReplace(localLang.demoModule.text1));
}
// 处理SVGA
document.addEventListener('DOMContentLoaded', function () {
function loadSVGA(containerId, svgaPath) {
var container = document.getElementById(containerId);
var player = new SVGA.Player(container);
var parser = new SVGA.Parser();
parser.load(svgaPath, function (videoItem) {
player.setVideoItem(videoItem);
player.startAnimation();
});
}
loadSVGA('ts1', './svga/ts1.svga');
loadSVGA('ts2', './svga/ts2.svga');
loadSVGA('ts3', './svga/ts3.svga');
});
// 接口
function get() {
showLoading()
networkRequest({
type: 'get',
url: urlPrefix + '/activity/h5/cp/rank',
success(res) {
if (res.code === 200) {
// 渲染倒计时
countup(res.data.endTime - res.timestamp);
// 处理摩天轮榜单
res.data.topCpList.forEach((res, i) => {
$(`.header .carousel .carousel_in${i + 1} .tx1`).attr("src", res.leftAvatar);
$(`.header .carousel .carousel_in${i + 1} .tx2`).attr("src", res.rightAvatar);
})
// 处理第一个tab的榜单
$('.contentBox .content').remove();
var squareCpListStr = '';
res.data.squareCpList.forEach((res, i) => {
squareCpListStr += `
<div class="content">
<img src="./images/TimeTitle.png" alt="" class="timeTitle">
<div class="times">${dateFormat(res.beginDate, 'yyyy.MM.dd')}-${dateFormat(res.beginDate, 'yyyy.MM.dd')}</div>
<div class="topBox">${squareCpListStrFun(res.cpUserVos)}</div>
</div>
`
})
$('.contentBox').append(squareCpListStr);
// 处理第二个榜单
thisWeekCpRankTop3 = splitArray(res.data.thisWeekCpRank).firstThree;
thisWeekCpRank = splitArray(res.data.thisWeekCpRank).pages;
// 处理前三
var listTo3 = thisWeekCpRankTop3;
if (listTo3.length < 3) {
let arr = new Array(3 - listTo3.length).fill({
leftAvatar: './images/null.png',
rightAvatar: './images/null.png',
leftNick: "",
rightNick: "",
leftErbanNo: "",
rightErbanNo: "",
totalNum: ""
})
listTo3.push(...arr)
}
listTo3.forEach((res, i) => {
$(`.page2 .content .topBox .top${i + 1} .txL`).attr('src', res.leftAvatar);
$(`.page2 .content .topBox .top${i + 1} .txR`).attr('src', res.rightAvatar);
$(`.page2 .content .topBox .top${i + 1} .nameL`).text(res.leftNick);
$(`.page2 .content .topBox .top${i + 1} .nameR`).text(res.rightNick);
$(`.page2 .content .topBox .top${i + 1} .idL`).text(res.leftErbanNo == "" ? "" : 'ID:' + res.leftErbanNo);
$(`.page2 .content .topBox .top${i + 1} .idR`).text(res.rightErbanNo == "" ? "" : 'ID:' + res.rightErbanNo);
$(`.page2 .content .topBox .top${i + 1} .sclore`).html(`<img style="display:${res.totalNum == '' ? 'none' : 'inline-block'}" src="./images/love.png" alt="">${unitProcessingAr(res.totalNum, 2)}`)
})
// 非前三
$('.page2 .content ul li').remove();
var str = ''
if (thisWeekCpRank[0]) {
thisWeekCpRank[0].forEach(res => {
str += `
<li>
<div class="num">${res.rank}</div>
<div class="txL">
<img src="${res.leftAvatar}" alt="">
<p>${res.leftNick}</p>
</div>
<img src="./images/loves.png" alt="" class="loves">
<div class="txR">
<img src="${res.rightAvatar}" alt="">
<p>${res.rightNick}</p>
</div>
<div class="scores">
<img src="./images/love.png" alt="">
<span>${unitProcessingAr(res.totalNum, 2)}</span>
</div>
</li>
`
})
$('.page2 .content ul').append(str);
}
if (thisWeekCpRank.length <= 1) {
$('.page2 .content .more').hide();
}
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error(err) {
hideLoading(layerIndex)
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
function squareCpListStrFun(arr) {
var str = '';
var listTo3 = arr.slice(0, 3);
if (listTo3.length < 3) {
let arr = new Array(3 - listTo3.length).fill({
leftAvatar: './images/null.png',
rightAvatar: './images/null.png',
leftNick: "",
rightNick: "",
leftErbanNo: "",
rightErbanNo: "",
totalNum: ""
})
listTo3.push(...arr)
}
listTo3.forEach((res, i) => {
str += `
<div class="top${i + 1}">
<img src="${i + 1 == 1 ? './images/ts1.png' : './images/ts23.png'}" alt="" class="tsL">
<img src="${i + 1 == 1 ? './images/ts1.png' : './images/ts23.png'}" alt="" class="tsR">
<img src="${res.leftAvatar}" alt="" class="txL">
<img src="${res.rightAvatar}" alt="" class="txR">
<div class="nameL">${res.leftNick}</div>
<div class="nameR">${res.rightNick}</div>
<div class="idL">${res.leftErbanNo == "" ? '' : "ID:" + res.leftErbanNo}</div>
<div class="idR">${res.rightErbanNo == "" ? '' : "ID:" + res.rightErbanNo}</div>
<div class="sclore"><img style="display:${res.totalNum == '' ? 'none' : 'inline-block'}" src="./images/love.png" alt="">${unitProcessingAr(res.totalNum, 2)}</div>
</div>
`})
return str;
}
function splitArray(arr) {
// 获取前三个元素
const firstThree = arr.slice(0, 3);
// 剩余的元素
const remainingElements = arr.slice(3);
// 将剩余元素每10个分成一组
const pages = [];
for (let i = 0; i < remainingElements.length; i += 10) {
const chunk = remainingElements.slice(i, i + 10);
pages.push(chunk);
}
return { firstThree, pages };
}
// 倒計時
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中
$('.header .timeBox .day b').text(d);
$('.header .timeBox .hour b').text(h);
$('.header .timeBox .min b').text(m);
$('.header .timeBox .sec b').text(s);
} else {
// get();
}
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;
}
// 打开音乐
$('.header .music').click(function () {
$('.header .music').hide();
$('.header .notOpen').show();
var audio = document.getElementById("musics");
audio.pause();
})
// 关闭音乐
$('.header .notOpen').click(function () {
$('.header .notOpen').hide();
$('.header .music').show();
var audio = document.getElementById("musics");
audio.play();
})
// tab切换
$('.tabBox div').click(function () {
var i = $(this).index() + 1;
$(this).addClass('act').siblings().removeClass('act')
$('.page1,.page2,.page3').hide();
$(`.page${i}`).show();
})
// 关闭规则
$('.header .rule_icon').click(function () {
$('.rule').show();
bodyScroolFun(true);
})
// 关闭规则
$('.rule .ruleIn .close').click(function () {
$('.rule').hide();
bodyScroolFun(false);
})
// 打开mp4弹窗
$('.page3 .content .topBox1 .bo').click(function () {
var video = document.getElementById('zjvideo1');
video.play();
bodyScroolFun(true);
$('.zjvideo1').show();
})
// 打开mp4弹窗
$('.page3 .content .topBox1 .bo2').click(function () {
var video = document.getElementById('xzvideo1');
video.play();
bodyScroolFun(true);
$('.xzvideo1').show();
})
// 打开mp4弹窗
$('.page3 .content .topBox2 .bo').click(function () {
var video = document.getElementById('zjvideo2');
video.play();
bodyScroolFun(true);
$('.zjvideo2').show();
})
// 打开mp4弹窗
$('.page3 .content .topBox2 .bo2').click(function () {
var video = document.getElementById('xzvideo2');
video.play();
bodyScroolFun(true);
$('.xzvideo2').show();
})
// 打开mp4弹窗
$('.page3 .content .topBox3 .bo').click(function () {
var video = document.getElementById('zjvideo3');
video.play();
bodyScroolFun(true);
$('.zjvideo3').show();
})
// 打开mp4弹窗
$('.page3 .content .topBox3 .bo2').click(function () {
var video = document.getElementById('xzvideo3');
video.play();
bodyScroolFun(true);
$('.xzvideo3').show();
})
// 关闭mp4弹窗
$('.zjvideo1 .close,.xzvideo1 .close,.zjvideo2 .close,.xzvideo2 .close,.zjvideo3 .close,.xzvideo3 .close').click(function () {
var video = document.getElementById('zjvideo1');
var video1 = document.getElementById('xzvideo1');
var video2 = document.getElementById('zjvideo2');
var video3 = document.getElementById('xzvideo2');
var video4 = document.getElementById('zjvideo3');
var video5 = document.getElementById('xzvideo3');
video.pause();
video1.pause();
video2.pause();
video3.pause();
video4.pause();
video5.pause();
bodyScroolFun(false);
$('.zjvideo1,.xzvideo1,.zjvideo2,.xzvideo2,.zjvideo3,.xzvideo3').hide();
})

View File

@@ -0,0 +1,46 @@
var baba = document.querySelector('body');
baba.addEventListener('click', function (e) {
// $('body,html').css({ "width": "100%", "position": "relative", "overflow": "hidden" });
tianJia(e);
})
var erZi = [];
function tianJia (e) {
var sunZi = document.createElement('div');
sunZi.className = 'rabbit';
// sunZi.innerHTML = '<i class="iconfont icon-tuzi"></i>';
sunZi.innerHTML = '<img src="./images/loveIcon.png" alt="">';
baba.appendChild(sunZi);
erZi.push({
el: sunZi,
top: e.pageY - 30,
left: e.pageX - 20,
opacity: 1,
scale: 1,
color: `rgb(${255 * Math.random()},${255 * Math.random()},${255 * Math.random()})`
});
move();
};
function move () {
for (var i = 0; i < erZi.length; i++) {
if (erZi[i].opacity <= 0) {
baba.removeChild(erZi[i].el);
erZi.splice(i, 1);
return;
}
erZi[i].top--;
erZi[i].opacity = erZi[i].opacity - 0.02;
// erZi[i].scale = erZi[i].scale + 0.0001;
erZi[i].el.style.cssText = `
top: ${erZi[i].top}px;
left: ${erZi[i].left}px;
color: ${erZi[i].color};
opacity: ${erZi[i].opacity};
transform: scale(${erZi[i].scale});
position: absolute;
`
}
window.requestAnimationFrame(move);
// $('body,html').css({ "width": "100%", "position": "relative", "overflow": "auto" });
}

View File

@@ -0,0 +1,9 @@
// 阿拉伯
langAr = {
// 模块
demoModule: {
layerIndex1: `جاري التحميل...`,
layerIndex2: `نجاح`,
layerIndex3: `خطأ في الشبكة`,
}
}

View File

@@ -0,0 +1,7 @@
langEn = {
demoModule: {
layerIndex1: `Loading...`,
layerIndex2: `Success`,
layerIndex3: `Network error`,
},
}

View File

@@ -0,0 +1,9 @@
// 中文
langZh = {
// 模塊
demoModule: {
layerIndex1: `加载中...`,
layerIndex2: `成功`,
layerIndex3: `网络错误`,
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.