Commit 81606868 authored by mengcuiguang's avatar mengcuiguang

抖音自定义状态栏

parent be6c8f61
......@@ -13,8 +13,8 @@
"path": "pages/loading",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black" //用于配置状态栏的字体颜色
"navigationBarBackgroundColor": "#F2F1FF",
"navigationBarTextStyle": "#000000"
}
},
// #endif
......@@ -22,51 +22,51 @@
"path": "pages/home",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black"
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
}, {
"path": "pages/index/index",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black"
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
},
{
"path": "pages/my/my",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black" //用于配置状态栏的字体颜色
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
}, {
"path": "pages/brower/brower",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "pages/recommend/recommend",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black"
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff"
}
}, {
"path": "pages/recommend/follow",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black"
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
}, {
"path": "pages/recommend/recommendVideo",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black"
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff"
}
}
],
......@@ -87,15 +87,15 @@
"path": "video/videoDetail",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black"
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff"
}
}, {
"path": "video/newVideoDetail",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black"
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff"
}
}]
}, {
......@@ -103,29 +103,33 @@
"pages": [{
"path": "watchRecord/watchRecord",
"style": {
"navigationBarTitleText": "观看记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black" //用于配置状态栏的字体颜色
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "payRecord/payRecord",
"style": {
"navigationBarTitleText": "我的订单",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "dotRecord/dotRecord",
"style": {
"navigationBarTitleText": "看点记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "useDotRecord/useDotRecord",
"style": {
"navigationBarTitleText": "消费记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}]
......
......@@ -119,6 +119,13 @@
this.currentPage = index
}
// #ifdef MP-TOUTIAO
tt.setNavigationBarColor({
frontColor: '#000000',
backgroundColor: '#ffffff'
})
// #endif
if (wx.setVisualEffectOnCapture) {
wx.setVisualEffectOnCapture({
visualEffect: 'hidden',
......@@ -134,6 +141,7 @@
// 在子组件重写show()代替onShow()
if (this.currentPage == 0) {
this.$refs.index.show();
} else if (this.currentPage == 1) {
// this.$refs.recommend.show();
} else if (this.currentPage == 2) {
......@@ -173,6 +181,21 @@
},
changeBottomBarColor(b) {
this.isShowBlackBar = b
// #ifdef MP-TOUTIAO
if(b){
tt.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#000000'
})
}else{
tt.setNavigationBarColor({
frontColor: '#000000',
backgroundColor: '#ffffff'
})
}
// #endif
},
showEditBarH(b) {
this.showEditBar = b
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment