mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-14 18:58:13 +00:00
no message
This commit is contained in:
parent
c78ca1de5d
commit
f4e6fd060e
21
resources/assets/js/app.js
vendored
21
resources/assets/js/app.js
vendored
@ -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())) {
|
||||||
|
|||||||
@ -124,6 +124,10 @@ export default {
|
|||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
|
},
|
||||||
|
|
||||||
|
showModal(v) {
|
||||||
|
$A.eeuiAppSetScrollEnabled(!v)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -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() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user