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,46 +98,51 @@ ...@@ -98,46 +98,51 @@
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;
var _this = this; this.init(option);
setTimeout(() => {
_this.tabBars.forEach((tabBar) => {
var tab = {
data: [],
isLoading: false,
refreshing: false,
refreshFlag: true,
loadMoreFlag: true,
loadStatus: constant.LOAD_STATUS.loading,
page: 1,
total_pages: 1,
loadingText: '加载更多...',
isRequestComplete: false,
channel: ""
};
if (tabBar.type == REPAIR_LIST_TYPE.wait_alloc.type) {
tab.limit = 10;
tab.loadStatus = constant.LOAD_STATUS.more;
tab.total_pages = 1;
tab.data.push([{},{},{}]);
tab.channel = REPAIR_LIST_TYPE.wait_alloc.text
} else if (tabBar.type == REPAIR_LIST_TYPE.alloced.type) {
tab.limit = 5;
tab.loadStatus = constant.LOAD_STATUS.more;
tab.total_pages = 1;
tab.data.push([{},{},{},{},{},{}]);
tab.channel = REPAIR_LIST_TYPE.alloced.text
}
if (tab.total_pages == 1) {
tab.loadStatus = constant.LOAD_STATUS.noMore;
tab.loadingText = _this.loadTexts.contentnomore;
}
_this.tabList.push(tab);
});
_this.onRefresh();
}, 350)
//this.loadTexts = this.$constant.LOAD_TEXTS;
}, },
methods: { methods: {
init(option) {
this.initTabBar();
},
initTabBar() {
var _this = this;
setTimeout(() => {
_this.tabBars.forEach((tabBar) => {
var tab = {
data: [],
isLoading: false,
refreshing: false,
refreshFlag: true,
loadMoreFlag: true,
loadStatus: constant.LOAD_STATUS.loading,
page: 1,
total_pages: 1,
loadingText: '加载更多...',
isRequestComplete: false,
channel: ""
};
if (tabBar.type == REPAIR_LIST_TYPE.wait_alloc.type) {
tab.limit = 10;
tab.loadStatus = constant.LOAD_STATUS.more;
tab.total_pages = 1;
tab.data.push([{},{},{}]);
tab.channel = REPAIR_LIST_TYPE.wait_alloc.text
} else if (tabBar.type == REPAIR_LIST_TYPE.alloced.type) {
tab.limit = 5;
tab.loadStatus = constant.LOAD_STATUS.more;
tab.total_pages = 1;
tab.data.push([{},{},{},{},{},{}]);
tab.channel = REPAIR_LIST_TYPE.alloced.text
}
if (tab.total_pages == 1) {
tab.loadStatus = constant.LOAD_STATUS.noMore;
tab.loadingText = _this.loadTexts.contentnomore;
}
_this.tabList.push(tab);
});
_this.onRefresh();
}, 350)
},
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