修复安卓报错问题

This commit is contained in:
dragon
2024-04-19 16:47:15 +08:00
parent 71338ebd1e
commit 710072d963

View File

@@ -598,9 +598,7 @@ function fuzzyMatchUpdateQueryStringParameterFun() {
history.replaceState(null, null, updateQueryStringParameter(window.location.href, 'lang', langCode));
// 初始化国际化
initLocalLang();
if (language == "ar") {
document.documentElement.setAttribute("dir", "rtl")
}
langCodeFun(langCode);
} else {
setTimeout(function () {
console.log('ios deviceInfo', pubInfo.deviceInfo);
@@ -609,16 +607,10 @@ function fuzzyMatchUpdateQueryStringParameterFun() {
history.replaceState(null, null, updateQueryStringParameter(window.location.href, 'lang', langCode));
// 初始化国际化
initLocalLang();
console.log("langCode1",langCode);
if (langCode == "ar") {
document.documentElement.setAttribute("dir", "rtl")
}
langCodeFun(langCode);
} else {
fuzzyMatchUpdateQueryStringParameterFun();
console.log("langCode2",langCode);
if (langCode == "ar") {
document.documentElement.setAttribute("dir", "rtl")
}
langCodeFun(langCode);
}
}, 40)
// 初始化国际化
@@ -629,9 +621,12 @@ function fuzzyMatchUpdateQueryStringParameterFun() {
history.replaceState(null, null, updateQueryStringParameter(window.location.href, 'lang', langCode));
// 初始化国际化
initLocalLang();
if (langCode == "ar") {
document.documentElement.setAttribute("dir", "rtl")
}
langCodeFun(langCode);
}
}
function langCodeFun(langCode) {
if (langCode == "ar") {
document.documentElement.setAttribute("dir", "rtl");
}
}
// 获取整条url