测试适配安卓ios是否可以调通

This commit is contained in:
dragon
2024-04-12 12:06:39 +08:00
parent 090f49864a
commit e85409b576
17 changed files with 65 additions and 48 deletions

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<html>
<!-- dir="rtl" -->
<head>
<meta charset="UTF-8">

View File

@@ -6,6 +6,8 @@ if (env == 'test') {
}
// 封裝layer消息提醒框
let layerIndex
var langReplace;
var localLang;
const showLoading = (content = langReplace(localLang.share.text5)) => {
layer.open({
type: 2,
@@ -26,17 +28,16 @@ const toastMsg = (content = langReplace(localLang.share.text36), time = 2) => {
skin: 'msg'
})
}
var langReplace;
var localLang;
var inviteCode = '';
var typeStr = "1,3";//收益類型 1 直接邀請 2 間接邀請 3 直接邀請充值 4 間接邀請充值
var page = 1;
var isLock = true;
var obj = {};
var text;;
// 初始化函數
$(function () {
// 初始化函數
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () {
// 頁面全屏
if (browser.app) {
@@ -54,15 +55,14 @@ $(function () {
window.webkit.messageHandlers.closeWebView.postMessage(null)
}
})
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
text = langReplace(localLang.demoModule.text35)
translateFun();
// getConfig();
getMySelf();
profitPage();
}, 100)
// getMySelf();
// profitPage();
}, 300)
})
function translateFun() {
var langReplace = window.lang.replace;
@@ -103,10 +103,10 @@ function translateFun() {
$('#text33').html(langReplace(localLang.demoModule.text33));
$('#text34').html(langReplace(localLang.demoModule.text34));
$('#text66').html(langReplace(localLang.demoModule.text66));
$('#img1').attr('src',langReplace(localLang.demoModule.img1))
$('#img2').attr('src',langReplace(localLang.demoModule.img2))
$('#img3').attr('src',langReplace(localLang.demoModule.img3))
$('#img4').attr('src',langReplace(localLang.demoModule.img4))
$('#img1').attr('src', langReplace(localLang.demoModule.img1))
$('#img2').attr('src', langReplace(localLang.demoModule.img2))
$('#img3').attr('src', langReplace(localLang.demoModule.img3))
$('#img4').attr('src', langReplace(localLang.demoModule.img4))
}
// 獲取配置接口
function getConfig() {

View File

@@ -35,6 +35,7 @@ $(function () {
inviteCode = urlDate.inviteCode;
$('.box .codeBg .num').text(inviteCode);
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () {
var mySwiper = new Swiper('.swiper', {
// direction: "vertical",
@@ -69,7 +70,6 @@ $(function () {
// }
// ]);
// }
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();

View File

@@ -3,7 +3,7 @@
}
// @function prefixurl() {
// @return 'https://img.pekolive.com/'
// @return 'https://img.molistarlive.com/'
// }
@font-face {

View File

@@ -49,8 +49,8 @@ backgroundMusic.volume = 0.2;
drawBut.volume = 1;
$(function () {
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () {
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();

View File

@@ -19,9 +19,9 @@ const toastMsg = (content = '', time = 2) => {
$(function () {
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
if (EnvCheck() === 'test') { new VConsole }
setTimeout(function () {
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();

View File

@@ -31,28 +31,28 @@
</div>
<div class="result_sBox">
<div class="bg">
<img src="http://beta.img.pekolive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
<img src="http://beta.img.molistarlive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
</div>
<div class="bg">
<img src="http://beta.img.pekolive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
<img src="http://beta.img.molistarlive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
</div>
<div class="bg">
<img src="http://beta.img.pekolive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
<img src="http://beta.img.molistarlive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
</div>
<div class="bg">
<img src="http://beta.img.pekolive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
<img src="http://beta.img.molistarlive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
</div>
<div class="bg">
<img src="http://beta.img.pekolive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
<img src="http://beta.img.molistarlive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
</div>
<div class="bg">
<img src="http://beta.img.pekolive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
<img src="http://beta.img.molistarlive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
</div>
<div class="bg">
<img src="http://beta.img.pekolive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
<img src="http://beta.img.molistarlive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
</div>
<div class="bg">
<img src="http://beta.img.pekolive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
<img src="http://beta.img.molistarlive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" alt="">
</div>
</div>
</div>
@@ -60,7 +60,7 @@
<div class="put"></div>
<div class="list">
<div class="item">
<p><img src="http://beta.img.pekolive.com/FmLQyTfMaHlwkvj568vpV0uk7aSc?imageslim" class="gift"
<p><img src="http://beta.img.molistarlive.com/FmLQyTfMaHlwkvj568vpV0uk7aSc?imageslim" class="gift"
alt=""></p>
<div>
<img src="./images/gold.png" class="diamond" alt="">
@@ -69,7 +69,7 @@
</div>
<div class="item">
<p><img src="http://beta.img.pekolive.com/Fm94cJfxF1Eqm0U04nG476JvFLaF?imageslim" class="gift"
<p><img src="http://beta.img.molistarlive.com/Fm94cJfxF1Eqm0U04nG476JvFLaF?imageslim" class="gift"
alt=""></p>
<div>
<img src="./images/gold.png" class="diamond" alt="">
@@ -78,7 +78,7 @@
</div>
<div class="item">
<p><img src="http://beta.img.pekolive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" class="gift"
<p><img src="http://beta.img.molistarlive.com/FjWcbuxEpzZ8P3aS4A0n2llW9Jw9?imageslim" class="gift"
alt=""></p>
<div>
<img src="./images/gold.png" class="diamond" alt="">
@@ -87,7 +87,7 @@
</div>
<div class="item">
<p><img src="http://beta.img.pekolive.com/Ftlck3geTvQvvjBkyCwxuv7tHR_a?imageslim" class="gift"
<p><img src="http://beta.img.molistarlive.com/Ftlck3geTvQvvjBkyCwxuv7tHR_a?imageslim" class="gift"
alt=""></p>
<div>
<img src="./images/gold.png" class="diamond" alt="">
@@ -96,7 +96,7 @@
</div>
<div class="item">
<p><img src="http://beta.img.pekolive.com/Fnnd7i5L8BPI95DF_ZvhdGkk8cqI?imageslim" class="gift"
<p><img src="http://beta.img.molistarlive.com/Fnnd7i5L8BPI95DF_ZvhdGkk8cqI?imageslim" class="gift"
alt=""></p>
<div>
<img src="./images/gold.png" class="diamond" alt="">
@@ -105,7 +105,7 @@
</div>
<div class="item">
<p><img src="http://beta.img.pekolive.com/FoIKvxfBJiUUGNcL8ouKQKENQ2eb?imageslim" class="gift"
<p><img src="http://beta.img.molistarlive.com/FoIKvxfBJiUUGNcL8ouKQKENQ2eb?imageslim" class="gift"
alt=""></p>
<div>
<img src="./images/gold.png" class="diamond" alt="">
@@ -114,7 +114,7 @@
</div>
<div class="item">
<p><img src="http://beta.img.pekolive.com/Fv3U6kNuCovsRljPb_an73W0U0lZ?imageslim" class="gift"
<p><img src="http://beta.img.molistarlive.com/Fv3U6kNuCovsRljPb_an73W0U0lZ?imageslim" class="gift"
alt=""></p>
<div>
<img src="./images/gold.png" class="diamond" alt="">
@@ -123,7 +123,7 @@
</div>
<div class="item">
<p><img src="http://beta.img.pekolive.com/FuEuGPGHcyGExK_nJhvx08S4KeJ9?imageslim" class="gift"
<p><img src="http://beta.img.molistarlive.com/FuEuGPGHcyGExK_nJhvx08S4KeJ9?imageslim" class="gift"
alt=""></p>
<div>
<img src="./images/gold.png" class="diamond" alt="">

View File

@@ -1,7 +1,6 @@
const productUrl = 'https://api.molistar.xyz'; // 正式环境
const testUrl = 'http://beta.api.molistar.xyz'; // 测试环境
function render(templateId, templateData, target) {
var html = template(templateId, templateData);
target.innerHTML += html;
@@ -582,7 +581,11 @@ function getLanguageCode(language) {
}
}
} else {
return 'en'; // 旧版本返回默认语言
if (getQueryString().lang) {
return getQueryString().lang;
} else {
return 'en'; // 旧版本返回默认语言
}
}
}
// 判断国际化参数路径
@@ -593,20 +596,29 @@ function fuzzyMatchUpdateQueryStringParameterFun() {
console.log('and deviceInfo', JSON.parse(pubInfo.deviceInfo));
let langCode = getLanguageCode(JSON.parse(pubInfo.deviceInfo)["Accept-Language"]);
history.replaceState(null, null, updateQueryStringParameter(window.location.href, 'lang', langCode));
// 初始化国际化
initLocalLang();
} else {
setTimeout(function () {
console.log('ios deviceInfo', pubInfo.deviceInfo);
let langCode = getLanguageCode(pubInfo.deviceInfo["Accept-Language"]);
history.replaceState(null, null, updateQueryStringParameter(window.location.href, 'lang', langCode));
if (pubInfo.deviceInfo) {
let langCode = getLanguageCode(pubInfo.deviceInfo["Accept-Language"]);
history.replaceState(null, null, updateQueryStringParameter(window.location.href, 'lang', langCode));
// 初始化国际化
initLocalLang();
}else{
fuzzyMatchUpdateQueryStringParameterFun();
}
}, 40)
// 初始化国际化
initLocalLang();
}
} else {
let langCode = getLanguageCode();
history.replaceState(null, null, updateQueryStringParameter(window.location.href, 'lang', langCode));
// 初始化国际化
initLocalLang();
}
// 初始化国际化
initLocalLang();
}
// 获取整条url
function updateQueryStringParameter(uri, key, value) {

View File

@@ -33,6 +33,7 @@ var getRankType = 1;//1=今日獎勵榜2=次數總榜
// 初始化函數
$(function () {
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () {
// 頁面全屏
if (browser.app) {
@@ -50,7 +51,6 @@ $(function () {
window.webkit.messageHandlers.closeWebView.postMessage(null)
}
})
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();

View File

@@ -27,6 +27,8 @@ $(function () {
} else {
info.uid = 900143;
}
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
//渲染数据
const randerList = (data) => {
// console.log(data);

View File

@@ -77,7 +77,7 @@
</div>
<!-- <div class="explain">
<p class="explain-tit">等级说明</p>
<p class="explain-title">魅力等级是您在piko个人魅力的成长属性每收到1个鉆石的礼物积累一点魅力值随着您的等级上升您的等级标致会有相应的颜色变化。</p>
<p class="explain-title">魅力等级是您在molistar个人魅力的成长属性每收到1个鉆石的礼物积累一点魅力值随着您的等级上升您的等级标致会有相应的颜色变化。</p>
</div> -->
<img id="img2" class="explain-img" src="./images/charm.png" alt="">
</div>

View File

@@ -17,7 +17,9 @@ $(function () {
$('.user-content').eq(1).show().siblings('.user-content').hide();
console.log("charm")
}
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
if (browser.app) {
if (browser.ios) {

View File

@@ -12,8 +12,8 @@ var langReplace;
var localLang;
$(function () {
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () {
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();

View File

@@ -30,6 +30,7 @@ const toastMsg = (content = langReplace(localLang.demoModule.text4), time = 2) =
}
$(function () {
getInfoFromClient();
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () {
// 页面全屏
if (browser.app) {
@@ -47,7 +48,6 @@ $(function () {
window.webkit.messageHandlers.closeWebView.postMessage(null)
}
})
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();

View File

@@ -109,7 +109,7 @@
</p>
<p>如有疑問,請聯系官方客服</p>
<p>客服WeChat:sd245376</p>
<p>客服Line:pekoyuyin</p>
<p>客服Line:molistaryuyin</p>
</div>
<!-- 选择地区弹窗 -->
<div class="area">
@@ -138,7 +138,7 @@
<!-- 信息弹窗提示 -->
<div class="toastMasge">
<div class="toastMasge_in">
<p>请打开molistarApp,并搜索该用户</p>
<p>请打开molistar并搜索该用户</p>
<div class="but">確認</div>
</div>
</div>

View File

@@ -211,8 +211,8 @@ const renderCurrentRoomInfo = () => {
$(function () {
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(() => {
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();

View File

@@ -36,6 +36,7 @@ var typeWealth = 'day';//財富榜類型day 日 week 周 month 月 total 總
// 初始化函數
$(function () {
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () {
// 頁面全屏
if (browser.app) {
@@ -53,7 +54,6 @@ $(function () {
window.webkit.messageHandlers.closeWebView.postMessage(null)
}
})
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();