| | |
| | | data: { |
| | | // navbar: ['全部', '未进行', '进行中', '已结束'], |
| | | currentTab: 0, |
| | | src: app.globalData.imgUrl +'/image/bg.jpg', |
| | | itemIcon: app.globalData.imgUrl +'/image/ceshi.jpg', |
| | | icon: app.globalData.imgUrl +'/image/fzl.svg', |
| | | user: app.globalData.imgUrl +'/image/user.svg', |
| | | src: app.globalData.imgUrl + '/image/bg.jpg', |
| | | itemIcon: app.globalData.imgUrl + '/image/ceshi.jpg', |
| | | icon: app.globalData.imgUrl + '/image/fzl.svg', |
| | | user: app.globalData.imgUrl + '/image/user.svg', |
| | | dataSet: [], |
| | | content: '------加载中------', |
| | | size: 10, |
| | | hasMoreData: true, |
| | | }, |
| | | |
| | | onLoad:function() { |
| | | onLoad: function() { |
| | | this.showList() |
| | | }, |
| | | |
| | | showList: function () { |
| | | showList: function() { |
| | | var userinfo = wx.getStorageSync("user"); |
| | | var that = this; |
| | | var id = userinfo.id; |
| | | wx.request({ |
| | | url: app.globalData.url + '/api/activityInfo/preview?page=1&size=' + that.data.size + '&userId=' + id, |
| | | success: function (res) { |
| | | url: app.globalData.url + '/api/activity/preview', |
| | | data: { |
| | | page: 1, |
| | | size: that.data.size, |
| | | userId: id, |
| | | type: 'act_1' |
| | | }, |
| | | success: function(res) { |
| | | console.log(res) |
| | | if (res.data.code == 0) { |
| | | (res.data.data.content).forEach(e => { |
| | |
| | | size: that.data.size + 10 |
| | | }) |
| | | } |
| | | } else{ |
| | | } else { |
| | | wx.showModal({ |
| | | title: '提示', |
| | | content: "请求失败!" |
| | |
| | | }) |
| | | }, |
| | | |
| | | link:function(event) { |
| | | link: function(event) { |
| | | var id = event.currentTarget.dataset['id']; |
| | | var flag = event.currentTarget.dataset['flag']; |
| | | console.log(flag) |
| | |
| | | }) |
| | | }, |
| | | |
| | | onReachBottom: function () { |
| | | onReachBottom: function() { |
| | | if (this.data.hasMoreData) { |
| | | this.showList() |
| | | this.setData({ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | }) |
| | | }) |