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 () => { 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"); await store.dispatch("preload");
const hash = (window.location[routeMode === 'history' ? 'pathname' : 'hash']).replace(/^[#\/\s]/, ''); const hash = (window.location[routeMode === 'history' ? 'pathname' : 'hash']).replace(/^[#\/\s]/, '');
if (hash !== 'preload') { if (hash !== 'preload') {
$init().catch(_ => {}) $init().catch(_ => {})
return return
} }
window.__initializeApp = (route) => { window.__initializeApp = (route) => {
if (/^https?:\/\//.test(route)) { if (/^https?:\/\//.test(route)) {
if ($A.getDomain(route) !== $A.getDomain($A.mainUrl())) { if ($A.getDomain(route) !== $A.getDomain($A.mainUrl())) {

View File

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

View File

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