| | |
| | | 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 |
| | | }) |
| | | } |
| | | }) |
| | | data: { |
| | | reportList: [], |
| | | isShow: false |
| | | }, |
| | | // 事件处理函数 |
| | | bindViewTap() { |
| | | wx.navigateTo({ |
| | | url: '../logs/logs', |
| | | }) |
| | | }, |
| | | getDetail(e) { |
| | | let url = '../report/detail/index?id=' + e.currentTarget.id |
| | | if (e.currentTarget.dataset.word == 2) { |
| | | url = '../report/submitReport/index?id=' + e.currentTarget.id |
| | | } |
| | | wx.navigateTo({ |
| | | url |
| | | }) |
| | | }, |
| | | 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) => { |
| | | this.setData({ |
| | | reportList: res.data.data |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |