Commit f28837ec by kaisa

feat:更新火箭游戏音效

parent 2f7759a3
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta content="telephone=no" name="format-detection" /> <meta content="telephone=no" name="format-detection">
<meta name="wap-font-scale" content="no" /> <meta name="wap-font-scale" content="no">
<title></title> <title></title>
<script src="lib/fsize.js"></script> <script src="lib/fsize.js"></script>
<link rel="stylesheet" href="css/base.css" /> <link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/layer.css" /> <link rel="stylesheet" href="css/layer.css">
<link rel="stylesheet" href="css/daily.css" /> <link rel="stylesheet" href="css/daily.css">
<link rel="stylesheet" href="css/index.css?v=2024111202" /> <link rel="stylesheet" href="css/index.css?v=2024111202">
<link rel="stylesheet" href="css/liMarquee.css" /> <link rel="stylesheet" href="css/liMarquee.css">
<style> <style>
.layui-layer-shade { .layui-layer-shade {
opacity: 0.7 !important; opacity: 0.7 !important;
......
...@@ -3,63 +3,63 @@ ...@@ -3,63 +3,63 @@
*/ */
var bbb = location.href; var bbb = location.href;
if (bbb.indexOf("https://fsactive.fusi.club/") > -1) { if (bbb.indexOf("https://fsactive.fusi.club/") > -1) {
$ip = "https://vc.game.tealive66.com"; $ip = "https://vc.game.tealive66.com";
$ws = "wss://zhiboweb.ishuaji.cn/yzsocket/ws?type=2"; $ws = "wss://zhiboweb.ishuaji.cn/yzsocket/ws?type=2";
$url = "https://activity.ishuaji.cn/"; $url = "https://activity.ishuaji.cn/";
} else { } else {
$ip = "http://testvc.game.tealive66.com"; $ip = "http://testvc.game.tealive66.com";
$ws = "ws://114.55.165.186:12308/ws?type=-1"; $ws = "ws://114.55.165.186:12308/ws?type=-1";
$url = "https://vc.game.tealive66.com"; $url = "https://vc.game.tealive66.com";
} }
var bbb = location.href; var bbb = location.href;
var data = url_get_params(bbb); var data = url_get_params(bbb);
if (sessionStorage.kkk == undefined) { if (sessionStorage.kkk == undefined) {
sessionStorage.kkk = data.token; //t sessionStorage.kkk = data.token; //t
sessionStorage.bbb = data.uid; //u sessionStorage.bbb = data.uid; //u
sessionStorage.version = data.appversion; sessionStorage.version = data.appversion;
sessionStorage.pkg = data.pkg; sessionStorage.pkg = data.pkg;
sessionStorage.lang = data.lang; sessionStorage.lang = data.lang;
if (data.roomID != undefined && data.roomID != "undefined") { if (data.roomID != undefined && data.roomID != "undefined") {
sessionStorage.roomId = data.roomID; sessionStorage.roomId = data.roomID;
} else { } else {
sessionStorage.roomId = data.roomId; sessionStorage.roomId = data.roomId;
} }
if (sessionStorage.roomId == "undefined") sessionStorage.roomId = 0; if (sessionStorage.roomId == "undefined") sessionStorage.roomId = 0;
} }
sessionStorage.jump = data.jump; sessionStorage.jump = data.jump;
sessionStorage.isShowHalf = data.isShowHalf; sessionStorage.isShowHalf = data.isShowHalf;
function url_get_params(url_path) { function url_get_params(url_path) {
var url = url_path; var url = url_path;
var theRequest = new Object(); var theRequest = new Object();
if (url.indexOf("?") != -1) { if (url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1); var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&"); strs = str.split("&");
for (var i = 0; i < strs.length; i++) { for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]); theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
} }
} return theRequest;
return theRequest;
} }
if (bbb.indexOf("http://localhost:63342") > -1) { if (bbb.indexOf("http://localhost:63342") > -1) {
sessionStorage.bbb = 23871190; sessionStorage.bbb = 23871190;
sessionStorage.kkk = "debug"; sessionStorage.kkk = "debug";
sessionStorage.roomId = 23864554; sessionStorage.roomId = 23864554;
} }
if (bbb.indexOf("file:///") > -1) { if (bbb.indexOf("file:///") > -1) {
sessionStorage.bbb = 10007; sessionStorage.bbb = 10007;
sessionStorage.kkk = "debug"; sessionStorage.kkk = "debug";
sessionStorage.roomId = 23868834; sessionStorage.roomId = 23868834;
sessionStorage.lang = 1; sessionStorage.lang = 1;
} }
//ajax设置默认参数 //ajax设置默认参数
$.ajaxSetup({ $.ajaxSetup({
global: false, global: false,
type: "get", type: "get",
data: { data: {
uid: sessionStorage.bbb, uid: sessionStorage.bbb,
token: sessionStorage.kkk, token: sessionStorage.kkk,
}, },
dataType: "JSON", dataType: "JSON",
}); });
mAudios.bgm.src = "dist/bg.mp3"; mAudios.bgm.src = "dist/bg.mp3";
...@@ -74,211 +74,211 @@ mAudios.bgm.loop = true; ...@@ -74,211 +74,211 @@ mAudios.bgm.loop = true;
mAudios.bgm.play(); mAudios.bgm.play();
//点击刷新 //点击刷新
$(".ref").on("click", function () { $(".ref").on("click", function () {
sessionStorage.jump = undefined; sessionStorage.jump = undefined;
window.location.reload(); window.location.reload();
}); });
function btnHref(e) { function btnHref(e) {
var myJson = { var myJson = {
cid: 12, "cid": 12,
reqCode: new Date().getTime(), "reqCode": new Date().getTime(),
data: { "data": {
msg: "跳转页面", "msg": "跳转页面",
jump: e, "jump": e,
}, },
}; };
var obj = JSON.stringify(myJson); var obj = JSON.stringify(myJson);
appCollaboration(obj); appCollaboration(obj);
} }
// 露水音效 // 露水音效
function betSound() { function betSound() {
mAudios.water.play(); mAudios.water.play();
} }
// 中奖音效 // 中奖音效
function betWin() { function betWin() {
mAudios.betWin.play(); mAudios.betWin.play();
} }
// 未中奖音效 // 未中奖音效
function betLose() { function betLose() {
mAudios.betLose.play(); mAudios.betLose.play();
} }
// 爆炸音效 // 爆炸音效
function betBoom() { function betBoom() {
mAudios.boom.play(); mAudios.boom.play();
} }
// 火箭升空音效 // 火箭升空音效
function rocket() { function rocket() {
if (mAudios.bgm.muted) { if (mAudios.bgm.muted) {
return; return;
} }
mAudios.rocket.play(); mAudios.rocket.play();
} }
// 停止播放火箭升空音效 // 停止播放火箭升空音效
function rocketStop() { function rocketStop() {
mAudios.rocket.pause(); mAudios.rocket.pause();
} }
// 点击静音关闭所有 // 点击静音关闭所有
function stopAll() { function stopAll() {
mAudios.bgm.pause(); mAudios.bgm.pause();
mAudios.rocket.pause(); mAudios.rocket.pause();
mAudios.clock.pause(); mAudios.clock.pause();
} }
// 倒计时音效 // 倒计时音效
function clock(min, sec) { function clock(min, sec) {
if (mAudios.bgm.muted) { if (mAudios.bgm.muted) {
return; return;
} }
if (Number(min) == 0 && Number(sec) == 3) { if (Number(min) == 0 && Number(sec) == 3) {
mAudios.clock.play(); mAudios.clock.play();
} }
} }
//与客户端交互 //与客户端交互
function appCollaboration(msg) { function appCollaboration(msg) {
var ua = window.navigator.userAgent.toLowerCase(); var ua = window.navigator.userAgent.toLowerCase();
try { try {
if (/iphone|ipad|ipod/.test(ua)) { if (/iphone|ipad|ipod/.test(ua)) {
window.webkit.messageHandlers.appCollaboration.postMessage(msg); window.webkit.messageHandlers.appCollaboration.postMessage(msg);
} else if (/android/.test(ua)) { } else if (/android/.test(ua)) {
window.yazhai.appCollaboration(msg); window.yazhai.appCollaboration(msg);
} }
} catch (e) {} } catch (e) { }
} }
//处理时间倒计时的函数 //处理时间倒计时的函数
function timeDeal(e) { function timeDeal(e) {
var endTime = e; var endTime = e;
var newTime = new Date().getTime(); var newTime = new Date().getTime();
var Remain = Math.floor((endTime - newTime) / 1000); var Remain = Math.floor((endTime - newTime) / 1000);
if (Remain <= 0) window.location.reload(); if (Remain <= 0) window.location.reload();
var day = Math.floor(Remain / 86400); var day = Math.floor(Remain / 86400);
var hour = add0(Math.floor((Remain % 86400) / 3600)); var hour = add0(Math.floor((Remain % 86400) / 3600));
if (hour > 99) hour = 99; if (hour > 99) hour = 99;
var min = add0(Math.floor((Remain % 3600) / 60)); var min = add0(Math.floor((Remain % 3600) / 60));
var sceond = add0(Math.floor(Remain % 60)); var sceond = add0(Math.floor(Remain % 60));
var timeArr = [day, hour, min, sceond]; var timeArr = [day, hour, min, sceond];
return timeArr; return timeArr;
} }
function timeDeal2(e, star) { function timeDeal2(e, star) {
var endTime = e; var endTime = e;
var newTime = star; var newTime = star;
var Remain = Math.floor((endTime - newTime) / 1000); var Remain = Math.floor((endTime - newTime) / 1000);
if (Remain <= 0) Remain = 0; if (Remain <= 0) Remain = 0;
var day = Math.floor(Remain / 86400); var day = Math.floor(Remain / 86400);
var hour = add0(Math.floor((Remain % 86400) / 3600)); var hour = add0(Math.floor((Remain % 86400) / 3600));
if (hour > 99) hour = 99; if (hour > 99) hour = 99;
var min = add0(Math.floor((Remain % 3600) / 60)); var min = add0(Math.floor((Remain % 3600) / 60));
var sceond = add0(Math.floor(Remain % 60)); var sceond = add0(Math.floor(Remain % 60));
if (sceond < 0) sceond = 0; if (sceond < 0) sceond = 0;
var timeArr = [day, hour, min, sceond]; var timeArr = [day, hour, min, sceond];
return timeArr; return timeArr;
} }
//时间戳转具体 年月日时分秒 //时间戳转具体 年月日时分秒
function timeGet(e) { function timeGet(e) {
var time = new Date(Number(e)); var time = new Date(Number(e));
var y = time.getFullYear(); var y = time.getFullYear();
var m = time.getMonth() + 1; var m = time.getMonth() + 1;
var d = time.getDate(); var d = time.getDate();
var h = time.getHours(); var h = time.getHours();
var mm = time.getMinutes(); var mm = time.getMinutes();
var s = time.getSeconds(); var s = time.getSeconds();
var timeArr = [y, m, d, add0(h), add0(mm), s]; var timeArr = [y, m, d, add0(h), add0(mm), s];
return timeArr; return timeArr;
} }
//一位数前面加0 //一位数前面加0
function add0(m) { function add0(m) {
return m < 10 ? "0" + m : m; return m < 10 ? "0" + m : m;
} }
function add00(m) { function add00(m) {
if (m < 10) { if (m < 10) {
return "00" + m; return "00" + m;
} else if (m > 10 && m < 100) { } else if (m > 10 && m < 100) {
return "0" + m; return "0" + m;
} else { } else {
return m; return m;
} }
} }
function imgAdd(m) { function imgAdd(m) {
if (String(m).length > 5) return m; if (String(m).length > 5) return m;
return (Array(5).join(0) + m).slice(-5); return (Array(5).join(0) + m).slice(-5);
} }
//一万以上省略 //一万以上省略
function addw(e) { function addw(e) {
if (e >= 100000000) { if (e >= 100000000) {
return Math.floor((e / 100000000).toFixed(2) * 10) / 10 + "亿"; return Math.floor((e / 100000000).toFixed(2) * 10) / 10 + "亿";
} else if (e >= 10000) { } else if (e >= 10000) {
return Math.floor((e / 10000).toFixed(2) * 10) / 10 + "万"; return Math.floor((e / 10000).toFixed(2) * 10) / 10 + "万";
} else { } else {
return Math.ceil(e); return Math.ceil(e);
} }
} }
function addDoc(e) { function addDoc(e) {
if (e % 1 == 0) { if (e % 1 == 0) {
return e + ".0"; return e + ".0";
} else return e; } else return e;
} }
function callFK() { function callFK() {
var obj2 = { var obj2 = {
cid: 4, "cid": 4,
reqCode: new Date().getTime(), "reqCode": new Date().getTime(),
data: { "data": {
msg: "请求客服", "msg": "请求客服",
}, },
}; };
var obj = JSON.stringify(obj2); var obj = JSON.stringify(obj2);
appCollaboration(obj); appCollaboration(obj);
} }
//跳转充值页面 //跳转充值页面
function goReg() { function goReg() {
if (sessionStorage.pkg == "qingliang") { if (sessionStorage.pkg == "qingliang") {
var ua = window.navigator.userAgent.toLowerCase(); var ua = window.navigator.userAgent.toLowerCase();
if (/iphone|ipad|ipod/.test(ua)) { if (/iphone|ipad|ipod/.test(ua)) {
window.location.href = "yazhai://_recharge"; window.location.href = "yazhai://_recharge";
} else {
window.location.href =
"http://web.yazhai.co/milkRecharge/index.html?uid=" +
sessionStorage.bbb +
"&token=" +
sessionStorage.kkk +
"&pkg=qingliang";
}
} else if (sessionStorage.pkg == "qiezi") {
var ua = window.navigator.userAgent.toLowerCase();
if (/iphone|ipad|ipod/.test(ua)) {
window.location.href = "yazhai://_recharge";
} else {
window.location.href =
"http://web.yazhai.co/guodongRecharge/index.html?uid=" +
sessionStorage.bbb +
"&token=" +
sessionStorage.kkk +
"&pkg=qingliang";
}
} else if (sessionStorage.pkg == "iosxiuse") {
window.location.href = "yazhai://_recharge";
} else { } else {
window.location.href = window.location.href =
"http://web.yazhai.co/milkRecharge/index.html?uid=" + "http://web.yazhai.co/recharge/index.html?uid=" +
sessionStorage.bbb + sessionStorage.bbb +
"&token=" + "&token=" +
sessionStorage.kkk + sessionStorage.kkk +
"&pkg=qingliang"; "&pkg=yabo";
} }
} else if (sessionStorage.pkg == "qiezi") {
var ua = window.navigator.userAgent.toLowerCase();
if (/iphone|ipad|ipod/.test(ua)) {
window.location.href = "yazhai://_recharge";
} else {
window.location.href =
"http://web.yazhai.co/guodongRecharge/index.html?uid=" +
sessionStorage.bbb +
"&token=" +
sessionStorage.kkk +
"&pkg=qingliang";
}
} else if (sessionStorage.pkg == "iosxiuse") {
window.location.href = "yazhai://_recharge";
} else {
window.location.href =
"http://web.yazhai.co/recharge/index.html?uid=" +
sessionStorage.bbb +
"&token=" +
sessionStorage.kkk +
"&pkg=yabo";
}
} }
function scrollTo(element, speed) { function scrollTo(element, speed) {
if (!speed) { if (!speed) {
speed = 300; speed = 300;
} }
if (!element) { if (!element) {
$("html,body").animate({ scrollTop: 0 }, speed); $("html,body").animate({ scrollTop: 0 }, speed);
} else { } else {
if (element.length > 0) { if (element.length > 0) {
$("html,body").animate( $("html,body").animate(
{ scrollTop: $(element).offset().top - 200 }, { scrollTop: $(element).offset().top - 200 },
speed speed
); );
}
} }
}
} }
//var betEnd = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), new Date().getHours(), 59, 59).getTime(); //var betEnd = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), new Date().getHours(), 59, 59).getTime();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment