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,45 +87,49 @@
"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"
}
}]
}, {
"root": "pagesD",
"pages": [{
"path": "watchRecord/watchRecord",
"style": {
"style": {
"navigationBarTitleText": "观看记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black" //用于配置状态栏的字体颜色
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "payRecord/payRecord",
"style": {
"style": {
"navigationBarTitleText": "我的订单",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "dotRecord/dotRecord",
"style": {
"style": {
"navigationBarTitleText": "看点记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "useDotRecord/useDotRecord",
"style": {
"style": {
"navigationBarTitleText": "消费记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}]
......
......@@ -117,7 +117,14 @@
let index = options.index ?? ''
if (index != '' && index != undefined) {
this.currentPage = index
}
}
// #ifdef MP-TOUTIAO
tt.setNavigationBarColor({
frontColor: '#000000',
backgroundColor: '#ffffff'
})
// #endif
if (wx.setVisualEffectOnCapture) {
wx.setVisualEffectOnCapture({
......@@ -133,7 +140,8 @@
try {
// 在子组件重写show()代替onShow()
if (this.currentPage == 0) {
this.$refs.index.show();
this.$refs.index.show();
} else if (this.currentPage == 1) {
// this.$refs.recommend.show();
} else if (this.currentPage == 2) {
......@@ -172,7 +180,22 @@
}
},
changeBottomBarColor(b) {
this.isShowBlackBar = 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