panhui 3 лет назад
Родитель
Сommit
92ea3d354d
1 измененных файлов с 15 добавлено и 16 удалено
  1. 15 16
      src/main.js

+ 15 - 16
src/main.js

@@ -144,21 +144,20 @@ if (navigator.userAgent.includes('#cordova#')) {
             StatusBar.overlaysWebView(true);
             window.$vm = app.mount('#app');
 
-            StatusBar.overlaysWebView(false);
-            StatusBar.backgroundColorByHexString('#191d27');
-            StatusBar.styleDefault();
-            // loadSplash(
-            //     () => {
-            //         setTimeout(() => {
-            //             navigator.splashscreen.hide();
-            //         }, 100);
-            //     },
-            //     () => {
-            //         navigator.splashscreen.hide();
-            //     }
-            // ).then(res => {
-             
-            // });
+            loadSplash(
+                () => {
+                    setTimeout(() => {
+                        navigator.splashscreen.hide();
+                    }, 100);
+                },
+                () => {
+                    navigator.splashscreen.hide();
+                }
+            ).then(res => {
+                StatusBar.overlaysWebView(false);
+                StatusBar.backgroundColorByHexString('#191d27');
+                StatusBar.styleDefault();
+            });
 
             if (/iphone|ipad|ipod/i.test(navigator.userAgent)) {
                 style.setProperty('--safe-top', 'env(safe-area-inset-top)');
@@ -276,6 +275,6 @@ if (navigator.userAgent.includes('#cordova#')) {
 } else {
     window.$vm = app.mount('#app');
     // loadSplash().then(res => {
-      
+
     // });
 }