chenjj 3 місяців тому
батько
коміт
bc0acf952d
3 змінених файлів з 10 додано та 2 видалено
  1. 4 1
      pages/chat.vue
  2. 3 0
      pages/mine/index.vue
  3. 3 1
      utils/index.js

+ 4 - 1
pages/chat.vue

@@ -83,7 +83,7 @@
 
 <script setup>
 import CustomTabBar from '@/components/CustomTabBar/index.vue'
-import { ref, computed } from 'vue'
+import { ref, computed,onMounted } from 'vue'
 import { onShow } from '@dcloudio/uni-app';
 import NoneView from '@/components/NoneView/index.vue'
 import dayjs from 'dayjs/esm/index'
@@ -251,6 +251,9 @@ const getNav = async () => {
 
 onShow(() => {
     init('top');
+    // getNav()
+})
+onMounted(() =>{
     getNav()
 })
 </script>

+ 3 - 0
pages/mine/index.vue

@@ -398,6 +398,9 @@ onShow(() => {
         geUserInfo()
         init()
     }
+
+})
+onMounted(() =>{
     getNav()
 })
 

+ 3 - 1
utils/index.js

@@ -6,7 +6,9 @@ export const getNavBarHeight = () =>{
          // 在 App.vue  中初始化
          uni.getSystemInfo({
             success: (res) => {
-            const statusBarHeight = res.statusBarHeight
+            const statusBarHeight = res.statusBarHeight;
+            console.log('res.platform',res.platform);
+            
             const navBarHeight =
                 res.platform === 'android' ? 48 : 44 + res.statusBarHeight;
                 resolve( { statusBarHeight, navBarHeight })