郑柏铃 hai 17 horas
pai
achega
3433067e53

+ 2 - 1
16.小程序/app.json

@@ -1,7 +1,8 @@
 {
   "pages": [
     "pages/home/home",
-    "pages/list/list"
+    "pages/list/list",
+    "pages/detail/detail"
   ],
   "window": {
     "navigationBarTextStyle": "white",

+ 66 - 0
16.小程序/pages/detail/detail.js

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

+ 3 - 0
16.小程序/pages/detail/detail.json

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

+ 2 - 0
16.小程序/pages/detail/detail.wxml

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

+ 1 - 0
16.小程序/pages/detail/detail.wxss

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

+ 18 - 0
16.小程序/pages/home/home.js

@@ -53,6 +53,24 @@ Page({
   changePart3() {
     console.log(3)
   },
+  goToList() {
+    console.log("点击")
+    // 不能跳转tabbar页面
+    // wx.navigateTo({
+    //   url: '/pages/detail/detail',
+    // })
+    // 只跳转tabbar页面
+    // wx.switchTab({
+    //   url: '/pages/detail/detail',
+    // })
+    // 不能跳转tabbar页面
+    // wx.redirectTo({
+    //   url: '/pages/detail/detail',
+    // })
+    wx.reLaunch({
+      url: '/pages/detail/detail',
+    })
+  },
   /**
    * 生命周期函数--监听页面加载
    */

+ 2 - 2
16.小程序/pages/home/home.wxml

@@ -24,6 +24,6 @@
     <view class="box1" bind:tap="showWord2"></view>
   </view>
     <input type="text" bindinput="changePart1" bind:tap="changePart2"  bindconfirm="changePart3" />
-
-    
+    <view class="btn" bind:tap="goToList">去列表</view>
+    <navigator url="/pages/detail/detail">去详情</navigator>
 </view>