Browse Source

首页&藏品室

panhui 4 years ago
parent
commit
00d0b16e1f
2 changed files with 14 additions and 0 deletions
  1. 7 0
      src/views/Home.vue
  2. 7 0
      src/views/Store.vue

+ 7 - 0
src/views/Home.vue

@@ -72,6 +72,13 @@ export default {
         };
     },
     mounted() {
+        // eslint-disable-next-line no-undef
+        if (window.cordova && StatusBar) {
+            // eslint-disable-next-line no-undef
+            StatusBar.backgroundColorByHexString('#F5F7FA');
+            // eslint-disable-next-line no-undef
+            StatusBar.styleDefault();
+        }
         this.getInit();
     },
     methods: {

+ 7 - 0
src/views/Store.vue

@@ -186,6 +186,13 @@ export default {
         }
     },
     mounted() {
+        // eslint-disable-next-line no-undef
+        if (window.cordova && StatusBar) {
+            // eslint-disable-next-line no-undef
+            StatusBar.backgroundColorByHexString('#181818');
+            // eslint-disable-next-line no-undef
+            StatusBar.styleLightContent();
+        }
         this.$nextTick(() => {
             this.stiky = this.$refs.top.$el.childNodes[0];
             this.$el.parentNode.childNodes[1].style.backgroundColor = '#131313';