wzh 3 лет назад
Родитель
Сommit
e0a0521838

+ 2 - 1
miniprogram/app.js

@@ -31,7 +31,8 @@ App({
       traceUser: true
     })
     this.globalData = {
-      maintab: 1
+      maintab: 1,
+      currentLab: {}
     }
   },
   onShow() {

+ 2 - 58
miniprogram/pages/voyageManage/myBills/labDetail/labDetail.js

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

+ 12 - 0
miniprogram/pages/voyageManage/myBills/myLab/myLab.js

@@ -5,6 +5,8 @@ const {
   uploadImage
 } = require('../../../../utils/uploadImage')
 
+const app = getApp()
+
 // pages/voyageManage/myBills/myLab.js
 Page({
   data: {
@@ -115,6 +117,16 @@ Page({
       this.getLabList()
     }
   },
+  goToDetail(e) {
+    let {
+      item
+    } = e.currentTarget.dataset
+    app.globalData.currentLab = item
+    wx.navigateTo({
+      url: '/pages/voyageManage/myBills/labDetail/labDetail',
+    })
+
+  },
   onLoad(options) {
     let {
       id: voyageId

+ 1 - 1
miniprogram/pages/voyageManage/myBills/myLab/myLab.wxml

@@ -32,7 +32,7 @@
 
 
 <scroll-view bindrefresherrefresh="scrollDownList" refresher-triggered="{{isFreshing}}" refresher-enabled="{{true}}" scroll-y="true" bindscrolltolower="scrollList" style="height:calc(100vh - 600rpx);padding-bottom: 100rpx;background: #fff;">
-  <view class="df aic jcsb list" wx:for="{{labList}}" wx:key="index" data-id="{{item.id}}" bindtap="goToDetail" data-index="{{index}}">
+  <view class="df aic jcsb list" wx:for="{{labList}}" wx:key="index" data-item="{{item}}" bindtap="goToDetail" data-index="{{index}}">
     <view class="col-1">{{item.labNumber}}</view>
     <view class="col-2">{{item.billingDate}}</view>
     <view class="col-3">{{item.cargo}}</view>