Commit 19e5b23e by qiuren

feat: 优化活动基础配置

parent a3512442
Showing with 13 additions and 160 deletions
...@@ -20,17 +20,22 @@ if ($firefly.urlData.appname == 'com.ftsfoss.android' || $firefly.urlData.appnam ...@@ -20,17 +20,22 @@ if ($firefly.urlData.appname == 'com.ftsfoss.android' || $firefly.urlData.appnam
fileName = 'fusi' fileName = 'fusi'
} }
imgUrl1 = 'https://app.ixiulive.com/static/app/img/' + fileName + '/kf.png';
imgUrl2 = 'https://app.ixiulive.com/static/app/img/' + fileName + '/share1.png'
imgUrl3 = 'https://app.ixiulive.com/static/app/img/' + fileName + '/5.png'
imgUrl4 = 'https://app.ixiulive.com/static/app/img/' + fileName + '/title_fusiya.png'
if (isFirefly) { if (isFirefly) {
// firefly
imgUrl1 = 'https://app.ixiulive.com/static/app/img/com.happy.live/kf.webp'; imgUrl1 = 'https://app.ixiulive.com/static/app/img/com.happy.live/kf.webp';
} else if ($firefly.urlData.appname == 'com.ftsfuxin.android') { imgUrl4 = 'https://app.ixiulive.com/static/app/img/title.png';
} else if (fileName == 'fusi') {
// fusiya
imgUrl1 = 'https://app.ixiulive.com/static/app/img/fusi/kf.png';
imgUrl4 = 'https://app.ixiulive.com/static/app/img/fusi/title_fusiya.png'
} else {
// 其他马甲包
imgUrl1 = 'https://app.ixiulive.com/static/app/img/' + fileName + '/kf.png'; imgUrl1 = 'https://app.ixiulive.com/static/app/img/' + fileName + '/kf.png';
imgUrl4 = 'https://app.ixiulive.com/static/app/img/' + fileName + '/title.png'
} }
imgUrl2 = 'https://app.ixiulive.com/static/app/img/' + fileName + '/share1.png'
imgUrl3 = 'https://app.ixiulive.com/static/app/img/' + fileName + '/5.png'
if ($firefly.urlData.appversion >= 7400) { if ($firefly.urlData.appversion >= 7400) {
try { try {
......
...@@ -34,17 +34,6 @@ function url_get_params(url_path) { ...@@ -34,17 +34,6 @@ function url_get_params(url_path) {
} }
return theRequest; return theRequest;
} }
if (bbb.indexOf("http://localhost:63342") > -1) {
sessionStorage.bbb = 23871190;
sessionStorage.kkk = "debug";
sessionStorage.roomId = 23864554;
}
if (bbb.indexOf("file:///") > -1) {
sessionStorage.bbb = 155100;
sessionStorage.kkk = "debug";
sessionStorage.roomId = 11137199;
sessionStorage.lang = 2;
}
//ajax设置默认参数 //ajax设置默认参数
$.ajaxSetup({ $.ajaxSetup({
global: false, global: false,
...@@ -59,74 +48,7 @@ $.ajaxSetup({ ...@@ -59,74 +48,7 @@ $.ajaxSetup({
}, },
dataType: "JSON", dataType: "JSON",
}); });
//点击刷新
$(".ref").on("click", function () {
window.location.reload();
});
//与客户端交互
function appCollaboration(msg) {
var ua = window.navigator.userAgent.toLowerCase();
try {
if (/iphone|ipad|ipod/.test(ua)) {
window.webkit.messageHandlers.appCollaboration.postMessage(msg);
} else if (/android/.test(ua)) {
window.yazhai.appCollaboration(msg);
}
} catch (e) {}
}
function sendAppVerificationMsg(msg) {
var ua = window.navigator.userAgent.toLowerCase();
try {
if (/iphone|ipad|ipod/.test(ua)) {
window.webkit.messageHandlers.sendAppVerificationMsg.postMessage(msg);
} else if (/android/.test(ua)) {
window.yazhai.sendAppVerificationMsg(msg);
}
} catch (e) {}
}
//处理时间倒计时的函数
function timeDeal(e) {
var endTime = e;
var newTime = new Date().getTime();
var Remain = Math.floor((endTime - newTime) / 1000);
if (Remain <= 0) window.location.reload();
var day = Math.floor(Remain / 86400);
var hour = add0(Math.floor((Remain % 86400) / 3600));
if (hour > 99) hour = 99;
var min = add0(Math.floor((Remain % 3600) / 60));
var sceond = add0(Math.floor(Remain % 60));
var timeArr = [day, hour, min, sceond];
return timeArr;
}
function timeDeal2(e, time) {
var endTime = e;
var newTime = time;
var Remain = Math.floor((endTime - newTime) / 1000);
if (Remain <= 0) Remain = 0;
var bbb = location.href;
if (bbb.indexOf("https://activity.yazhaiyabo.com/") > -1) {
if (Remain <= 0) window.location.reload();
}
var day = add0(Math.floor(Remain / 86400));
var hour = add0(Math.floor(Remain / 3600));
if (hour > 99) hour = 99;
var min = add0(Math.floor((Remain % 3600) / 60));
var sceond = add0(Math.floor(Remain % 60));
var timeArr = [day, hour, min, sceond];
return timeArr;
}
//时间戳转具体 年月日时分秒
function timeGet(e) {
var time = new Date(Number(e));
var y = time.getFullYear();
var m = time.getMonth() + 1;
var d = time.getDate();
var h = time.getHours();
var mm = time.getMinutes();
var s = time.getSeconds();
var timeArr = [y, m, add0(d), add0(h), add0(mm), add0(s)];
return timeArr;
}
//一位数前面加0 //一位数前面加0
function add0(m) { function add0(m) {
...@@ -141,10 +63,7 @@ function add00(m) { ...@@ -141,10 +63,7 @@ function add00(m) {
return m; return m;
} }
} }
function imgAdd(m) {
if (String(m).length > 5) return m;
return (Array(5).join(0) + m).slice(-5);
}
//一万以上省略 //一万以上省略
function addw(e) { function addw(e) {
if (e >= 100000000) { if (e >= 100000000) {
...@@ -160,77 +79,6 @@ function addDoc(e) { ...@@ -160,77 +79,6 @@ function addDoc(e) {
return e + ".0"; return e + ".0";
} else return e; } else return e;
} }
function loadImageGo(name, sNum, eNum, num) {
var imgList = [];
var num = sNum;
loadImage();
function loadImage() {
var img = new Image();
img.addEventListener("load", loadHandler);
img.src = "images/" + name + "/" + num + "_" + imgAdd(num) + ".png";
}
function loadHandler() {
imgList.push(this.cloneNode());
num++;
if (num > eNum) {
return;
}
this.src = "images/" + name + "/" + num + "_" + imgAdd(num) + ".png";
}
}
//跳转充值页面
function goReg() {
if (sessionStorage.pkg == "qingliang") {
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/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 {
window.location.href =
"http://web.yazhai.co/recharge/index.html?uid=" +
sessionStorage.bbb +
"&token=" +
sessionStorage.kkk +
"&pkg=yabo";
}
}
function scrollTo(element, speed) {
if (!speed) {
speed = 300;
}
if (!element) {
$("html,body").animate({ scrollTop: 0 }, speed);
} else {
if (element.length > 0) {
$("html,body").animate(
{ scrollTop: $(element).offset().top - 200 },
speed
);
}
}
}
//var betEnd = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), new Date().getHours(), 59, 59).getTime();
function getBarWidth(z, m) { function getBarWidth(z, m) {
if (z == 0) { if (z == 0) {
return "0%"; return "0%";
......
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