// pages/member/integrallist/integrallist.js var app = getApp(); Page({ /** * 页面的初始数据 */ data: { selected: 0, all: [], //收入积分 income: [], //消费积分 out: [], integral: '积分', recordsList: [], //more isLoadMore: true, page: 1, total_page: 0, show:false }, /** * 生命周期函数--监听页面加载 */ onLoad: function(options) { this._getIntegralInfo(''); try { const value = wx.getStorageSync('integral'); if (value) { this.setData({ integral: value }); // Do something with return value if (this.data.integral) { wx.setNavigationBarTitle({ title: this.data.integral + '列表' }); } } } catch (e) { // Do something when catch error } }, tapIs(e){ let ind = e.currentTarget.dataset.ind; let item = e.currentTarget.dataset.info; let recordsList = this.data.recordsList; recordsList[ind].show=!this.data.recordsList[ind].show; this.setData({ recordsList:recordsList }); wx.navigateTo({ url: '/packageB/member/integralDetail/integralDetail' + '?id=' + item.id, }); }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function() { }, /** * 生命周期函数--监听页面显示 */ onShow: function() { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function() { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function() { this._getMoreIntegralInfo(this.data.selected); }, /** * 用户点击右上角分享 */ onShareAppMessage: function() { }, _getIntegralInfo(type) { let that = this; this.data.page = 1; let urlStr = app.getNetAddresss("finance.point-info"); urlStr += '&status=' + type; app._getNetWork({ url: urlStr, success: function(resdata) { var res = resdata.data; if (res.result == 1) { var myData = res.data.list.data; for(let i = 0;i= this.data.total_page) { return; } else { this.data.page = this.data.page + 1; let urlStr = app.getNetAddresss("finance.point-info"); urlStr = urlStr + '&status=' + type + '&page=' + this.data.page; app._getNetWork({ url: urlStr, success: function (resdata) { var res = resdata.data; if (res.result == 1) { var myData = res.data.list.data; for(let i = 0;i