소스 검색

Merge branch 'master' of http://git.cc-lotus.info/ball-court/court-mobile

zs 3 년 전
부모
커밋
0013139372

+ 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 })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 56 - 54
pages/createTeam/index.js

@@ -27,6 +27,9 @@ Page({
         // 上传图片
         fileList: [],
     },
+    back: function () {
+        wx.navigateBack({ url: '/pages/me/index' })
+    },
     determine: function (e) {
         this.setData({ showModal: false })
     },
@@ -67,9 +70,7 @@ Page({
             ['form.create_time']: e.detail.value
         })
     },
-    back: function () {
-        wx.navigateBack({ url: '/pages/me/index' })
-    },
+
     //点击减号删除
     delList: function (e) {
         var id = e.currentTarget.dataset.id;
@@ -96,17 +97,54 @@ Page({
         let arr = data.filter((i, index) => index != e.detail.index)
         that.setData({ fileList: arr })
     },
-
+    //提交
+    formSubmit: function (e) {
+        const value = e.detail.value;
+        if (!this.WxValidate.checkForm(value)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            value.logo = this.data.fileList;
+            value.members = this.data.members;
+            value.create_id = this.data.form.create_id;
+            wx.request({
+                url: `${app.globalData.publicUrl}/courtAdmin/api/team`, //接口地址
+                method: "post",//请求方法
+                //请求参数
+                data: value,
+                header: {},
+                success: res => {
+                    if (res.data.errcode == 0) {
+                        wx.showToast({
+                            title: '创建团队成功',
+                            icon: 'success',
+                            duration: 2000//延迟两秒
+                        })
+                        return wx.redirectTo({ url: '/pages/me/index' })// 跳转页面
+                    } else {
+                        wx.showToast({
+                            title: '创建团队失败',
+                            icon: 'error',
+                            duration: 2000
+                        })
+                    }
+                },
+                error: err => {
+                }
+            })
+        }
+    },
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
+        //验证规则函数
+        this.initValidate()
         // 计算高度
         this.searchHeight()
         // 监听用户是否登录
         this.watchLogin();
-        //验证规则函数
-        this.initValidate()
     },
     //验证必填项
     initValidate() {
@@ -114,6 +152,17 @@ Page({
         // 验证字段的提示信息,若不传则调用默认的信息
         const messages = { name: { required: '请输入团队名称' }, type: { required: '请输入团队类型' }, create_user: { required: '请输入团队创建人名称' }, };
         this.WxValidate = new WxValidate(rules, messages)
+    },
+     // 计算高度
+     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 })
     },
     // 监听用户是否登录
     watchLogin: function () {
@@ -151,54 +200,7 @@ Page({
             }
         })
     },
-    //提交
-    formSubmit: function (e) {
-        const value = e.detail.value;
-        if (!this.WxValidate.checkForm(value)) {
-            const error = this.WxValidate.errorList[0];
-            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
-            return false
-        } else {
-            value.logo = this.data.fileList;
-            value.members = this.data.members;
-            value.create_id = this.data.form.create_id;
-            wx.request({
-                url: `${app.globalData.publicUrl}/courtAdmin/api/team`, //接口地址
-                method: "post",//请求方法
-                //请求参数
-                data: value,
-                header: {},
-                success: res => {
-                    if (res.data.errcode == 0) {
-                        wx.showToast({
-                            title: '创建团队成功',
-                            icon: 'success',
-                            duration: 2000//延迟两秒
-                        })
-                        return wx.redirectTo({ url: '/pages/me/index' })// 跳转页面
-                    } else {
-                        wx.showToast({
-                            title: '创建团队失败',
-                            icon: 'error',
-                            duration: 2000
-                        })
-                    }
-                },
-                error: err => {
-                }
-            })
-        }
-    },
-    // 计算高度
-    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 })
-    },
+
     /**
      * 生命周期函数--监听页面初次渲染完成
      */

+ 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 })
-  },
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 36 - 32
pages/information/index.js

@@ -9,13 +9,21 @@ Page({
         // 主体高度
         infoHeight: '',
         frameStyle: { useTop: true, name: '个人信息', leftArrow: true, useBar: false },
-        form: {
-        },
-        // index: 0,
-        // 上传图片
+        form: {},
         fileList: [],
+        genderList: [{ id: '0', name: '男' }, { id: 1, name: '女' },],
+        index: 0,
+    },
+    //验证必填项
+    initValidate() {
+        const rules = { phone: { required: true, tel: true }, }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { phone: { required: '请输入手机号' }, };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/me/index' })
     },
-
     //上传图片
     imgUpload: function (e) {
         const that = this;
@@ -30,8 +38,12 @@ Page({
         let arr = data.filter((i, index) => index != e.detail.index)
         that.setData({ fileList: arr })
     },
-    back: function () {
-        wx.navigateBack({ url: '/pages/me/index' })
+    // 选择用户性别
+    bindPickerChange: function (e) {
+        const that = this;
+        let index = e.detail.value;
+        let data = that.data.genderList[index];
+        if (data) that.setData({ 'form.gender': data.name });
     },
     //提交
     formSubmit: function (e) {
@@ -42,8 +54,9 @@ Page({
             return false
         } else {
             value.icon = this.data.fileList;
+            value.id = this.data.form.id;
             wx.request({
-                url: `${app.globalData.publicUrl}/courtAdmin/api/user/${res.data.id}`, //接口地址
+                url: `${app.globalData.publicUrl}/courtAdmin/api/user/${value.id}`, //接口地址
                 method: "post",
                 data: value,
                 header: {},
@@ -65,24 +78,27 @@ Page({
             })
         }
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
+        //验证规则函数
+        this.initValidate();
         // 计算高度
         this.searchHeight();
         // 监听用户是否登录
         this.watchLogin();
-        //验证规则函数
-        this.initValidate();
     },
-    //验证必填项
-    initValidate() {
-        const rules = { phone: { required: true, tel: true }, }
-        // 验证字段的提示信息,若不传则调用默认的信息
-        const messages = { phone: { required: '请输入手机号' }, };
-        this.WxValidate = new WxValidate(rules, messages)
+    // 计算高度
+    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 })
     },
     // 监听用户是否登录
     watchLogin: function () {
@@ -93,13 +109,13 @@ Page({
                 //数据请求
                 wx.request({
                     url: `${app.globalData.publicUrl}/courtAdmin/api/user/${res.data.id}`, //接口地址
-                    method: "get",//请求方法
-                    data: {},//请求参数
+                    method: "get",
+                    data: {},
                     header: {},
                     success: res => {
                         that.setData({ form: res.data.data })
                         let icon = res.data.data.icon;
-                        this.setData({ fileList: icon })
+                        that.setData({ fileList: icon })
                     },
                     error: err => {
                     }
@@ -110,18 +126,6 @@ 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 })
-    },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */

+ 4 - 5
pages/information/index.wxml

@@ -4,7 +4,7 @@
             <view class="form" style="height:{{infoHeight-140}}px;">
                 <view class="zero">
                     <view class="text">头像</view>
-                    <upload class="tou" list="{{fileList}}" count="{{1}}"  bind:imgUpload="imgUpload" bind:imgDel="imgDel"></upload>
+                    <upload class="tou" list="{{fileList}}" count="{{1}}" bind:imgUpload="imgUpload" bind:imgDel="imgDel"></upload>
                 </view>
                 <view class="one">
                     <view class="text">昵称</view>
@@ -16,10 +16,9 @@
                 </view>
                 <view class="one">
                     <view class="text">性别</view>
-                    <input class="input" name="gender" value="{{form.gender}}" placeholder="请输入性别" />
-                    <!-- <picker name="gender" bindchange="bindPickerChange" value="{{index}}" range="{{form.sex}}">
-                        <view class="input">{{form.gender[index]}}</view>
-                    </picker> -->
+                    <picker name="gender" mode="selector" bindchange="bindPickerChange" range-key="name" value="{{form.gender}}" range="{{genderList}}">
+                        <view class="input">{{form.gender}}</view>
+                    </picker>
                 </view>
                 <view class="one">
                     <view class="text">岗位</view>

+ 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

@@ -70,16 +70,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/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 })
+},
 
   /**
    * 生命周期函数--监听页面初次渲染完成