odc.xiaohui
2023-04-07 f693c859cdaf607c2a146ef89a7a2ce0d9476d1a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// index.ts
// 获取应用实例
const report = getApp()
 
Page({
  data: {
      reportList:[],
    isShow:false
  },
  // 事件处理函数
  bindViewTap() {
    wx.navigateTo({
      url: '../logs/logs',
    })
  },
 
  getDetail(e){
      console.log(e)
    wx.navigateTo({
        url: '../report/detail/index?id='+e.currentTarget.id,
      })
  },
  onLoad() {
      wx.request(  
        {
          url:report.globalData.url+"/wx/manager/report",
          method:"GET",
        //   data:{
        //       id:wx.getStorageSync('id')
        //   },
          header:{'token':wx.getStorageSync('token')},
          success:(res)=>{
              console.log(res)
              this.setData({
                reportList:res.data.data
              })
          }
              })
    }
})