no message

This commit is contained in:
kuaifan 2025-03-03 18:42:33 +08:00
parent c78ca1de5d
commit f4e6fd060e
3 changed files with 29 additions and 3 deletions

View File

@ -269,12 +269,33 @@ const $init = async () => {
}
const $preload = async () => {
if ($A.isEEUiApp) {
const requireTime = new Date().getTime();
while (typeof requireModuleJs !== "function") {
await new Promise(resolve => setTimeout(resolve, 200));
if (new Date().getTime() - requireTime > 15 * 1000) {
break
}
}
if (typeof requireModuleJs !== "function") {
const errorTip = $A.L("加载失败,请重启软件")
const errorView = document.querySelector(".app-view-loading")
if (errorView) {
errorView.innerHTML = `<span style="color:#f00;font-size:18px;">${errorTip}</span>`
} else {
alert(errorTip)
}
return
}
}
await store.dispatch("preload");
const hash = (window.location[routeMode === 'history' ? 'pathname' : 'hash']).replace(/^[#\/\s]/, '');
if (hash !== 'preload') {
$init().catch(_ => {})
return
}
window.__initializeApp = (route) => {
if (/^https?:\/\//.test(route)) {
if ($A.getDomain(route) !== $A.getDomain($A.mainUrl())) {

View File

@ -124,6 +124,10 @@ export default {
}, 500)
},
immediate: true
},
showModal(v) {
$A.eeuiAppSetScrollEnabled(!v)
}
},

View File

@ -323,14 +323,15 @@ export default {
immediate: true
},
showModal(value) {
if (value) {
showModal(v) {
if (v) {
this.searchBefore()
this.upTitleWidth()
} else {
this.searchKey = ""
}
this.$emit("on-show-change", value)
this.$emit("on-show-change", v)
$A.eeuiAppSetScrollEnabled(!v)
},
searchKey() {