page
This commit is contained in:
parent
7e629af442
commit
5ae276cfeb
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "首页"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<!-- 头部搜索与导航 -->
|
<!-- 头部搜索与导航 -->
|
||||||
<view class="header">
|
<view class="header">
|
||||||
|
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||||
<view class="search-section">
|
<view class="search-section">
|
||||||
<view class="search-bar-wrap" @click="goSearch">
|
<view class="search-bar-wrap" @click="goSearch">
|
||||||
<text class="search-icon">🔍</text>
|
<text class="search-icon">🔍</text>
|
||||||
|
|
@ -262,6 +263,7 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
statusBarHeight: 44,
|
||||||
activeBottomTab: 0,
|
activeBottomTab: 0,
|
||||||
currentTab: 0,
|
currentTab: 0,
|
||||||
navList: [{ name: '首页', cat_id: 0 }, { name: '推荐', cat_id: -1 }],
|
navList: [{ name: '首页', cat_id: 0 }, { name: '推荐', cat_id: -1 }],
|
||||||
|
|
@ -302,6 +304,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
const sysInfo = uni.getSystemInfoSync();
|
||||||
|
this.statusBarHeight = sysInfo.statusBarHeight || 44;
|
||||||
this.getIndexData();
|
this.getIndexData();
|
||||||
this.getCategoryList();
|
this.getCategoryList();
|
||||||
this.getNoticeList();
|
this.getNoticeList();
|
||||||
|
|
@ -495,7 +499,6 @@
|
||||||
/* 头部区域 */
|
/* 头部区域 */
|
||||||
.header {
|
.header {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
padding-top: var(--status-bar-height, 44px); /* 适配状态栏 */
|
|
||||||
padding-bottom: 10rpx;
|
padding-bottom: 10rpx;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue