diff --git a/pages.json b/pages.json index 2327993..c7fecbd 100644 --- a/pages.json +++ b/pages.json @@ -3,7 +3,7 @@ { "path": "pages/index/index", "style": { - "navigationBarTitleText": "首页" + "navigationStyle": "custom" } }, { diff --git a/pages/index/index.vue b/pages/index/index.vue index 486e11d..5eadf71 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -2,6 +2,7 @@ + 🔍 @@ -262,6 +263,7 @@ }, data() { return { + statusBarHeight: 44, activeBottomTab: 0, currentTab: 0, navList: [{ name: '首页', cat_id: 0 }, { name: '推荐', cat_id: -1 }], @@ -302,6 +304,8 @@ } }, onLoad() { + const sysInfo = uni.getSystemInfoSync(); + this.statusBarHeight = sysInfo.statusBarHeight || 44; this.getIndexData(); this.getCategoryList(); this.getNoticeList(); @@ -495,7 +499,6 @@ /* 头部区域 */ .header { background: #ffffff; - padding-top: var(--status-bar-height, 44px); /* 适配状态栏 */ padding-bottom: 10rpx; z-index: 100; }