Karsa 4 месяцев назад
Родитель
Сommit
6a637faa1d
5 измененных файлов с 23 добавлено и 21 удалено
  1. 16 13
      index.html
  2. 0 1
      package.json
  3. 7 0
      src/App.vue
  4. BIN
      src/assets/img/layoutLoading.png
  5. 0 7
      src/main.js

+ 16 - 13
index.html

@@ -18,19 +18,20 @@
           width: 100vw;
           height: 100vh;
           display: flex;
-          align-items: center;
           justify-content: center;
+          align-items: center;
           position: absolute;
           top: 0;
           z-index: -1;
+          color: #007aff;
       }
 
       .loading {
-          width: 100px;
-          height: 100px;
-          border: 10px solid #176af8;
-          border-bottom: #cccccc 10px solid;
-          border-radius: 50%;
+          width: 50px;
+          height: 50px;
+          background: url('./src/assets/img/layoutLoading.png') no-repeat center center;
+          margin: 0 auto 20px;
+          background-size: cover;
           -webkit-animation: load 1.1s infinite linear;
       }
 
@@ -44,17 +45,19 @@
       }
     </style>
   </head>
-  <script type="module">
-		import { registerEtaComp } from '/public/eta_comp.js'
-		registerEtaComp()
-	 </script>
   <body>
-    <div class="loading-model" id="#loadingModel">
-      <div class="loading"></div>
-      <div class="loading-text">资源加载中,请稍候...</div>
+    <div class="loading-model" id="loadingModel">
+      <div>
+        <div class="loading"></div>
+        <div class="loading-text">资源加载中,请稍候...</div>
+      </div>
     </div>
 
     <div id="app"></div>
     <script type="module" src="/src/main.js"></script>
+    <script type="module">
+      import { registerEtaComp } from '/public/eta_comp.js'
+      registerEtaComp()
+    </script>
   </body>
 </html>

+ 0 - 1
package.json

@@ -15,7 +15,6 @@
     "moment": "^2.29.1",
     "normalize.css": "^8.0.1",
     "vant": "^3.3.4",
-    "vconsole": "^3.15.1",
     "vue": "^3.2.16",
     "vue-router": "^4.0.12",
     "vuex": "^4.0.2",

+ 7 - 0
src/App.vue

@@ -1,4 +1,11 @@
 <template>
   <router-view />
 </template>
+<script>
+export default {
+  mounted() {
+    document.getElementById('loadingModel').style.display='none';
+  }
+}
+</script>
 

BIN
src/assets/img/layoutLoading.png


+ 0 - 7
src/main.js

@@ -10,13 +10,6 @@ import 'vant/lib/index.css';
 import '@/utils/rem.js';
 
 import {injectSdk} from '@/views/utils/wxShare.js';
-
-import VConsole from 'vconsole'
-console.log(import.meta.env.MODE)
-if(import.meta.env.MODE!=='production') {
-  new VConsole()
-}
-
 injectSdk()
 
 const app=createApp(App)