| | |
| | | }); |
| | | }, |
| | | }) |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (token) { |
| | | this.getUserInfo() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | */ |
| | | onShow() { |
| | | // console.log(this.data.value); |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) { |
| | | this.getUserInfo() |
| | | } |
| | | }) |
| | | } else { |
| | | this.getUserInfo() |
| | | } |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | // 获取登录用户身份 |
| | | getUserInfo() { |
| | | app.MG.identity.getCurrentAppUser().then(res => { |
| | |
| | | queryType: '*', |
| | | paging: { |
| | | start: '0', |
| | | size: this.data.start * 9 |
| | | size: this.data.start * 12 |
| | | }, |
| | | coverSize: { |
| | | width: 260 |
| | |
| | | queryType: '*', |
| | | paging: { |
| | | start: '0', |
| | | size: this.data.start * 9 |
| | | size: this.data.start * 12 |
| | | }, |
| | | coverSize: { |
| | | width: 260 |
| | |
| | | queryType: '*', |
| | | paging: { |
| | | start: '0', |
| | | size: this.data.start * 9 |
| | | size: this.data.start * 12 |
| | | }, |
| | | coverSize: { |
| | | width: 260 |
| | |
| | | mailbox(e) { |
| | | const key = e.currentTarget.dataset.key; |
| | | const item = e.currentTarget.dataset.item; |
| | | this.setData({ |
| | | Md5: item.datas.freeFile.FileList[0].Md5, |
| | | dialogBox: true |
| | | }) |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) { |
| | | this.getUserInfo() |
| | | this.setData({ |
| | | Md5: item.datas.freeFile.FileList[0].Md5, |
| | | dialogBox: true |
| | | }) |
| | | } else {} |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | Md5: item.datas.freeFile.FileList[0].Md5, |
| | | dialogBox: true |
| | | }) |
| | | } |
| | | |
| | | // wx.scanCode({ |
| | | // success: res => { |
| | | // console.log(res); |