安瑾然
2023-03-23 f68f67f34857085d627cc2acdcfe714eb8bbdcb5
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
// index.ts
// 获取应用实例
const myself = getApp()
 
Page({
  data: {
      reportList:{},
    isShow:false
  },
 
  logout(){
    wx.removeStorageSync('token')
   wx.reLaunch({
       url:'../../index/index'
   })
  },
  onLoad() {
      wx.request(  
        {
          url:myself.globalData.url+  "/wx/manager/myself",
          method:"GET",
          data:{
              id:wx.getStorageSync('id')
          },
          header:{'token':wx.getStorageSync('token')},
          success:(res)=>{
              console.log(res)
              this.setData({
                reportList:res.data.data
              })
          }
              })
    }
})