odc.xiaohui
2023-03-07 4cdcd7fbf08474c5c10ec1637a23e0e0ce230e8a
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
41
42
43
// index.ts
// 获取应用实例
const userReport = getApp()
 
Page({
  data: {
      reportList:[],
    isShow:false
  },
  // 事件处理函数
  bindViewTap() {
    wx.navigateTo({
      url: '../logs/logs',
    })
  },
  getDetail(e){
 wx.navigateTo({
     url:'../report/detail/index?id='+e.currentTarget.id 
 })
  },
report(){
 wx.navigateTo({
     url:'../report/submitReport/index'
 })
},
  onLoad() {
      wx.request(  
        {
          url:userReport.globalData.url+"/wx/user/cause",
          method:"GET",
          header:{'token':wx.getStorageSync('token')},
          data:{
              id:wx.getStorageSync('id')
          },
          success:(res)=>{
              console.log(res)
              this.setData({
                reportList:res.data.data
              })
          }
              })
    }
})