Commit 81606868 authored by mengcuiguang's avatar mengcuiguang

抖音自定义状态栏

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