guhongwei 3 年之前
父節點
當前提交
39c268ba6d
共有 5 個文件被更改,包括 102 次插入2 次删除
  1. 3 2
      app.json
  2. 84 0
      pages/teamrank/index.js
  3. 6 0
      pages/teamrank/index.json
  4. 5 0
      pages/teamrank/index.wxml
  5. 4 0
      pages/teamrank/index.wxss

+ 3 - 2
app.json

@@ -1,20 +1,21 @@
 {
 {
     "pages": [
     "pages": [
         "pages/index/index",
         "pages/index/index",
+        "pages/me/index",
+        "pages/matchadmin/index",
         "pages/login/index",
         "pages/login/index",
         "pages/register/index",
         "pages/register/index",
         "pages/home/index",
         "pages/home/index",
         "pages/search/index",
         "pages/search/index",
         "pages/match/info",
         "pages/match/info",
+        "pages/teamrank/index",
         "pages/addmatch/index",
         "pages/addmatch/index",
-        "pages/matchadmin/index",
         "pages/matchadmin/edit",
         "pages/matchadmin/edit",
         "pages/matchadmin/layout",
         "pages/matchadmin/layout",
         "pages/teamexam/index",
         "pages/teamexam/index",
         "pages/team/index",
         "pages/team/index",
         "pages/teamInfo/index",
         "pages/teamInfo/index",
         "pages/teamInfo/info",
         "pages/teamInfo/info",
-        "pages/me/index",
         "pages/editBasic/index",
         "pages/editBasic/index",
         "pages/uploadimg/index",
         "pages/uploadimg/index",
         "pages/uploadScore/index",
         "pages/uploadScore/index",

+ 84 - 0
pages/teamrank/index.js

@@ -0,0 +1,84 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '团队排名', leftArrow: true, useBar: false },
+        // 主体高度
+        infoHeight: '',
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/match/index' })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        // 计算高度
+        this.searchHeight()
+    },
+    // 计算高度
+    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 })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/teamrank/index.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/mobile-main"
+    }
+}

+ 5 - 0
pages/teamrank/index.wxml

@@ -0,0 +1,5 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    模板
+  </view>
+</mobile-main>

+ 4 - 0
pages/teamrank/index.wxss

@@ -0,0 +1,4 @@
+.main {
+    position: relative;
+    width: 100%;
+}