| | |
| | | |
| | | |
| | | onLoad() { |
| | | if (wx.getStorageSync('info') == '') { |
| | | wx.redirectTo({ |
| | | url: '../user/loginInfo/index' |
| | | }) |
| | | } |
| | | wx.request({ |
| | | url: user.globalData.url+"/wx/login", |
| | | data: { |
| | | "phone": wx.getStorageSync('phone'), |
| | | }, |
| | | method: "GET", |
| | | success: (res) => { |
| | | console.log(res); |
| | | wx.setStorageSync('token', res.data.data.token) |
| | | wx.setStorageSync('role', res.data.data.role) |
| | | wx.setStorageSync('id', res.data.data.id) |
| | | wx.setStorageSync('card',res.data.data.time) |
| | | |
| | | wx.request( |
| | | { |
| | | url: user.globalData.url + "/wx/publicity?size=" + "4", |
| | |
| | | |
| | | } |
| | | }) |
| | | }}) |
| | | if (wx.getStorageSync('info') == '') { |
| | | wx.redirectTo({ |
| | | url: '../user/loginInfo/index' |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | getReport() { |
| | | console.log("xxx") |