ソースを参照

feta: config tabbar & relative pages

wangyuan 2 年 前
コミット
8cb03b35d7

+ 20 - 1
app.json

@@ -1,7 +1,10 @@
 {
   "entryPagePath": "pages/permisission/permission",
   "pages": [
-    "pages/permisission/permission"
+    "pages/permisission/permission",
+    "pages/index/index",
+    "pages/report/report",
+    "pages/my/my"
   ],
   "window": {
     "backgroundTextStyle": "light",
@@ -9,6 +12,22 @@
     "navigationBarTitleText": "ITT健康检测",
     "navigationBarTextStyle": "white"
   },
+  "tabBar": {
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "text": "首页"
+      },
+      {
+        "pagePath": "pages/report/report",
+        "text": "报告"
+      },
+      {
+        "pagePath": "pages/my/my",
+        "text": "我的"
+      }
+    ]
+  },
   "style": "v2",
   "sitemapLocation": "sitemap.json"
 }

+ 17 - 0
pages/index/index.js

@@ -0,0 +1,17 @@
+// pages/index/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+    wx.hideHomeButton()
+  }
+})

+ 3 - 0
pages/index/index.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "首页"
+}

+ 6 - 0
pages/index/index.wxml

@@ -0,0 +1,6 @@
+<!--pages/index/index.wxml-->
+<view class="index-container">
+  <view class="top">top</view>
+  <view class="content">content</view>
+  <view class="footer">footer</view>
+</view>

+ 6 - 0
pages/index/index.wxss

@@ -0,0 +1,6 @@
+/* pages/index/index.wxss */
+.index-container {
+  width: 100%;
+  height: 100%;
+  background-color: #F7F7F7;
+}

+ 66 - 0
pages/my/my.js

@@ -0,0 +1,66 @@
+// pages/my/my.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/my/my.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/my/my.wxml

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

+ 1 - 0
pages/my/my.wxss

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

+ 66 - 0
pages/report/report.js

@@ -0,0 +1,66 @@
+// pages/report/report.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/report/report.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/report/report.wxml

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

+ 1 - 0
pages/report/report.wxss

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