lilei vor 2 Jahren
Ursprung
Commit
8275def822
3 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen
  1. 1 1
      pages/sales/index.vue
  2. 1 1
      pages/sales/list.vue
  3. 6 4
      pages/sales/listComponent.vue

+ 1 - 1
pages/sales/index.vue

@@ -76,7 +76,7 @@
 		onReady() {
 			const query = uni.createSelectorQuery().in(this);
 			query.select('#tjCons').boundingClientRect(data => {
-			  this.listHeight = Math.floor(data.height)
+			  this.listHeight = Math.floor(data.height) + 2
 			}).exec();
 		},
 		onLoad(opts) {

+ 1 - 1
pages/sales/list.vue

@@ -50,7 +50,7 @@
 		onReady() {
 			const query = uni.createSelectorQuery().in(this);
 			query.select('#tjCons').boundingClientRect(data => {
-			  this.listHeight = Math.floor(data.height + 10)
+			  this.listHeight = Math.floor(data.height + 5)
 			}).exec();
 		},
 		onLoad() {

+ 6 - 4
pages/sales/listComponent.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="sales-list-component">
-		<scroll-view class="sales-list-con" :style="{height: scrollH+'upx'}" scroll-y @scrolltolower="onreachBottom">
+		<scroll-view class="sales-list-con" :style="{height: scrollH+'px'}" scroll-y @scrolltolower="onreachBottom">
 			<view class="sales-list-main">
 				<view class="sales-list-item" v-for="(item, index) in listData" :key="item.id" @click="getDetail(item)">
 					<view class="list-item-tit flex align_center justify_between">
@@ -91,14 +91,16 @@
 		},
 		watch:{
 			height(a,b){
+				console.log(a,b)
 				const sys = uni.getSystemInfoSync()
+				console.log(sys)
 				if(sys.platform == 'android'){
-					this.scrollH = (sys.windowHeight - sys.statusBarHeight - a) * 2
+					this.scrollH = sys.windowHeight - a
 				}else{
 					if(sys.safeArea.top){
-						this.scrollH = (sys.windowHeight - a) * 2 + sys.statusBarHeight - 34
+						this.scrollH = sys.windowHeight - a + sys.statusBarHeight - 34
 					}else{
-						this.scrollH = (sys.windowHeight - a) * 2 - 14
+						this.scrollH = sys.windowHeight - a - 14
 					}
 				}
 			},