chengjunhui 1 miesiąc temu
rodzic
commit
7227b7e9a0

+ 3 - 2
app.json

@@ -43,7 +43,8 @@
     "pages/quality/detail/index",
     "pages/match/index",
     "pages/checkin/index_1874359642",
-    "pages/download/download"
+    "pages/download/download",
+    "pages/matchPage/matchPage"
   ],
   "subPackages": [
     {
@@ -184,7 +185,7 @@
         "selectedIconPath": "assets/images/tabbar/tab22.png"
       },
       {
-        "pagePath": "pages/match/index",
+        "pagePath": "pages/matchPage/matchPage",
         "text": "青创赛",
         "iconPath": "assets/images/tabbar/tab3.png",
         "selectedIconPath": "assets/images/tabbar/tab33.png"

+ 83 - 0
pages/matchPage/matchPage.js

@@ -0,0 +1,83 @@
+// pages/matchPage/matchPage.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    pageNum: 0,
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+    // console.log(this.data.pageNum)
+    if(this.data.pageNum == 0){
+      this.setData({
+        pageNum: 1
+      })
+      wx.navigateTo({
+        url: '/pages/match/index',
+      })
+    }else{
+      this.setData({
+        pageNum: 0
+      })
+      setTimeout(() => {
+        wx.switchTab({
+          url: '/pages/home/index/index',
+        })
+      }, 0);
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 8 - 0
pages/matchPage/matchPage.json

@@ -0,0 +1,8 @@
+{
+  "navigationBarTitleText": "青创赛",
+  "navigationBarBackgroundColor": "#4A90E2",
+  "navigationBarTextStyle": "white",
+  "enablePullDownRefresh": true,
+  "navigationStyle": "custom",
+  "usingComponents": {}
+}

+ 2 - 0
pages/matchPage/matchPage.wxml

@@ -0,0 +1,2 @@
+<!--pages/matchPage/matchPage.wxml-->
+<text></text>

+ 1 - 0
pages/matchPage/matchPage.wxss

@@ -0,0 +1 @@
+/* pages/matchPage/matchPage.wxss */