| 1234567891011121314151617181920212223242526 |
- window.onload = function () {
- if(this.sessionStorage.getItem("preloading")) return
- let pre = document.getElementById('pre')
- if (!pre) {
- let pre = document.createElement("div")
- pre.setAttribute('id', 'pre')
- pre.setAttribute('style', 'position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100000; ')
- let cover = document.createElement('div')
- cover.setAttribute('style', 'background-color: rgba(0, 0, 0, .8); width: 100%; height: 100%;')
- let loading = document.createElement('div')
- loading.setAttribute('style', 'position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);')
- let img = document.createElement('img')
- img.setAttribute('src', '/img/loding.jpg')
- loading.appendChild(img)
- cover.appendChild(loading)
- pre.appendChild(cover)
- document.body.appendChild(pre)
- }
- let app = document.createElement("script")
- app.setAttribute("src", "/js/app.8bf2d5f0.js") // 与生成app同步
- document.body.appendChild(app)
- let chunk = document.createElement("script")
- chunk.setAttribute("src", "/js/chunk-vendors.89f16f72.js") // 同步
- document.body.appendChild(chunk)
- }
|