Browse Source

visitandinfo中 scroll-view 问题

roose 4 years ago
parent
commit
48b8a68d6c
1 changed files with 11 additions and 4 deletions
  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();