Forráskód Böngészése

计算高度新版

YY 3 éve
szülő
commit
68c31c7e31

+ 6 - 5
pages/add/index.js

@@ -120,16 +120,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
+   // 计算高度
+   searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 6 - 5
pages/administration/compete.js

@@ -121,16 +121,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
+   // 计算高度
+   searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 6 - 5
pages/administration/detail.js

@@ -170,16 +170,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
+   // 计算高度
+   searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 4 - 3
pages/administration/details.js

@@ -63,12 +63,13 @@ Page({
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 12 - 10
pages/administration/index.js

@@ -108,16 +108,18 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
+  
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/auditTeam/index.js

@@ -134,16 +134,17 @@ Page({
             }
         })
     },
-    // 计算高度
-    searchHeight: function () {
-        let frameStyle = this.data.frameStyle;
-        let client = app.globalData.client;
-        // 减去状态栏
-        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-        // 是否减去底部菜单
-        if (frameStyle.useBar) infoHeight = infoHeight - 50;
-        if (infoHeight) this.setData({ infoHeight: infoHeight })
-    },
+   // 计算高度
+   searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
     /**
      * 生命周期函数--监听页面初次渲染完成
      */

+ 11 - 10
pages/competition/index.js

@@ -171,16 +171,17 @@ Page({
     let data = that.data.levelArray;
     that.setData({ valueList: [data[0], data[1]] })
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 5 - 4
pages/createTeam/index.js

@@ -153,12 +153,13 @@ Page({
         const messages = { name: { required: '请输入团队名称' }, type: { required: '请输入团队类型' }, create_user: { required: '请输入团队创建人名称' }, };
         this.WxValidate = new WxValidate(rules, messages)
     },
-    // 计算高度
-    searchHeight: function () {
+     // 计算高度
+     searchHeight: function () {
         let frameStyle = this.data.frameStyle;
         let client = app.globalData.client;
-        // 减去状态栏
-        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        let infoHeight = client.windowHeight;
+        // 是否去掉状态栏
+        if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
         // 是否减去底部菜单
         if (frameStyle.useBar) infoHeight = infoHeight - 50;
         if (infoHeight) this.setData({ infoHeight: infoHeight })

+ 6 - 5
pages/dissolution/detail.js

@@ -78,16 +78,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
+   // 计算高度
+   searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+},
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 5 - 4
pages/dissolution/index.js

@@ -117,12 +117,13 @@ Page({
             }
         })
     },
-    // 计算高度
-    searchHeight: function () {
+     // 计算高度
+     searchHeight: function () {
         let frameStyle = this.data.frameStyle;
         let client = app.globalData.client;
-        // 减去状态栏
-        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        let infoHeight = client.windowHeight;
+        // 是否去掉状态栏
+        if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
         // 是否减去底部菜单
         if (frameStyle.useBar) infoHeight = infoHeight - 50;
         if (infoHeight) this.setData({ infoHeight: infoHeight })

+ 1 - 1
pages/index/index.js

@@ -57,7 +57,7 @@ Page({
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 5 - 4
pages/layNew/index.js

@@ -161,12 +161,13 @@ Page({
         this.WxValidate = new WxValidate(rules, messages)
     },
 
-    // 计算高度
-    searchHeight: function () {
+     // 计算高度
+     searchHeight: function () {
         let frameStyle = this.data.frameStyle;
         let client = app.globalData.client;
-        // 减去状态栏
-        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        let infoHeight = client.windowHeight;
+        // 是否去掉状态栏
+        if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
         // 是否减去底部菜单
         if (frameStyle.useBar) infoHeight = infoHeight - 50;
         if (infoHeight) this.setData({ infoHeight: infoHeight })

+ 5 - 4
pages/lays/index.js

@@ -60,12 +60,13 @@ Page({
             }
         })
     },
-    // 计算高度
-    searchHeight: function () {
+     // 计算高度
+     searchHeight: function () {
         let frameStyle = this.data.frameStyle;
         let client = app.globalData.client;
-        // 减去状态栏
-        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        let infoHeight = client.windowHeight;
+        // 是否去掉状态栏
+        if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
         // 是否减去底部菜单
         if (frameStyle.useBar) infoHeight = infoHeight - 50;
         if (infoHeight) this.setData({ infoHeight: infoHeight })

+ 4 - 3
pages/maintain/index.js

@@ -231,12 +231,13 @@ Page({
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 6 - 5
pages/manage/index.js

@@ -191,16 +191,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
+   // 计算高度
+   searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/match/detail.js

@@ -99,16 +99,17 @@ Page({
     // 计算高度
     this.searchHeight()
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/match/index.js

@@ -98,16 +98,17 @@ Page({
     // 计算高度
     this.searchHeight()
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/me/index.js

@@ -199,16 +199,17 @@ Page({
     })
   },
 
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 11 - 10
pages/modify/index.js

@@ -96,16 +96,17 @@ Page({
     })
   },
 
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/password/index.js

@@ -90,16 +90,17 @@ Page({
             }
         })
     },
-    // 计算高度
-    searchHeight: function () {
-        let frameStyle = this.data.frameStyle;
-        let client = app.globalData.client;
-        // 减去状态栏
-        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-        // 是否减去底部菜单
-        if (frameStyle.useBar) infoHeight = infoHeight - 50;
-        if (infoHeight) this.setData({ infoHeight: infoHeight })
-    },
+ // 计算高度
+ searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
     /**
      * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/photo/index.js

@@ -70,16 +70,17 @@ Page({
         // 计算高度
         this.searchHeight()
     },
-    // 计算高度
-    searchHeight: function () {
-        let frameStyle = this.data.frameStyle;
-        let client = app.globalData.client;
-        // 减去状态栏
-        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-        // 是否减去底部菜单
-        if (frameStyle.useBar) infoHeight = infoHeight - 50;
-        if (infoHeight) this.setData({ infoHeight: infoHeight })
-    },
+ // 计算高度
+ searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
     /**
      * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/ranking/index.js

@@ -58,16 +58,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/score/index.js

@@ -88,16 +88,17 @@ Page({
     // 计算高度
     this.searchHeight()
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/team/apply.js

@@ -170,16 +170,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/team/examine.js

@@ -133,16 +133,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/team/index.js

@@ -88,16 +88,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/teamDetails/detail.js

@@ -85,16 +85,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 11 - 10
pages/teamDetails/index.js

@@ -79,16 +79,17 @@ Page({
       }
     })
   },
-  // 计算高度
-  searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    // 减去状态栏
-    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-  },
+ // 计算高度
+ searchHeight: function () {
+  let frameStyle = this.data.frameStyle;
+  let client = app.globalData.client;
+  let infoHeight = client.windowHeight;
+  // 是否去掉状态栏
+  if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+  // 是否减去底部菜单
+  if (frameStyle.useBar) infoHeight = infoHeight - 50;
+  if (infoHeight) this.setData({ infoHeight: infoHeight })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成