소스 검색

visitandinfo中 scroll-view 问题

roose 4 년 전
부모
커밋
48b8a68d6c
1개의 변경된 파일11개의 추가작업 그리고 4개의 파일을 삭제
  1. 11 4
      pages/visitandinfo/visitandinfo.js

+ 11 - 4
pages/visitandinfo/visitandinfo.js

@@ -344,8 +344,12 @@ Page({
   computeScrollViewHeight1() {
     let that = this
     let query = wx.createSelectorQuery().in(this)
+    console.log(query,"..........................");
+    
     query.select('.zizi').boundingClientRect()
     query.exec(res => {
+      console.log(res);
+      
       let searchHeight = res[0].height
       let windowHeight = wx.getSystemInfoSync().windowHeight
       let scrollHeight = windowHeight - searchHeight - 30 - 5 - 50
@@ -368,15 +372,18 @@ Page({
         isTrue: false,
       })
     } else {
-      this.oldInfo();
-      this.visitInfo();
-      this.computeScrollViewHeight();
-      this.computeScrollViewHeight1();
       this.setData({
         isAllTrue: false,
         select_all: false,
         isTrue: true,
       })
+      if(this.data.isTrue){
+        this.computeScrollViewHeight();
+        this.computeScrollViewHeight1();
+      }
+      this.oldInfo();
+      this.visitInfo();
+     
       switch (this.data.number) {
         case 0:
           this.openIdInfo();