Commit be64ade2 authored by tangfh's avatar tangfh

+

parent 68f5dfc1
...@@ -40,16 +40,16 @@ ...@@ -40,16 +40,16 @@
channel: "ongoning" channel: "ongoning"
} }
}, },
onLoad() { onLoad(option) {
var systemInfo = uni.getSystemInfoSync(); var systemInfo = uni.getSystemInfoSync();
//scroll-view的高度 = 屏幕高度 -(顶部状态栏高度 + 导航栏高度) -(底部tabBar高度 + 底部安全区域高度) //scroll-view的高度 = 屏幕高度 -(顶部状态栏高度 + 导航栏高度) -(底部tabBar高度 + 底部安全区域高度)
this.scrollViewHeight = systemInfo.screenHeight - (uni.getSystemInfoSync() this.scrollViewHeight = systemInfo.screenHeight - (uni.getSystemInfoSync()
.statusBarHeight + this.$refs.navBar.height) - (systemInfo.safeAreaInsets.bottom) - .statusBarHeight + this.$refs.navBar.height) - (systemInfo.safeAreaInsets.bottom) -
90 / getApp().globalData.pxToRpxScale; 90 / getApp().globalData.pxToRpxScale;
this.init(); this.init(option);
}, },
methods: { methods: {
init() { init(option) {
this.onRefresh() this.onRefresh()
}, },
onNavBarLeftClick() { onNavBarLeftClick() {
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
} }
} }
}, },
onLoad() { onLoad(option) {
var systemInfo = uni.getSystemInfoSync(); var systemInfo = uni.getSystemInfoSync();
//scroll-view的高度 = 屏幕高度 -(顶部状态栏高度 + 导航栏高度) -(底部tabBar高度 + 底部安全区域高度) //scroll-view的高度 = 屏幕高度 -(顶部状态栏高度 + 导航栏高度) -(底部tabBar高度 + 底部安全区域高度)
this.scrollViewHeight = systemInfo.screenHeight - (uni.getSystemInfoSync() this.scrollViewHeight = systemInfo.screenHeight - (uni.getSystemInfoSync()
...@@ -98,6 +98,13 @@ ...@@ -98,6 +98,13 @@
this.svHeight = this.swiperHeight; this.svHeight = this.swiperHeight;
this.tabWidth = (getApp().globalData.screenWidth - this.tabItemMargin * 2) / this.tabBars.length; this.tabWidth = (getApp().globalData.screenWidth - this.tabItemMargin * 2) / this.tabBars.length;
this.init(option);
},
methods: {
init(option) {
this.initTabBar();
},
initTabBar() {
var _this = this; var _this = this;
setTimeout(() => { setTimeout(() => {
_this.tabBars.forEach((tabBar) => { _this.tabBars.forEach((tabBar) => {
...@@ -135,9 +142,7 @@ ...@@ -135,9 +142,7 @@
}); });
_this.onRefresh(); _this.onRefresh();
}, 350) }, 350)
//this.loadTexts = this.$constant.LOAD_TEXTS;
}, },
methods: {
onNavBarLeftClick() { onNavBarLeftClick() {
uni.navigateBack(); uni.navigateBack();
}, },
......
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