// pages/handle/liist.js import * as UTIL from '../../utils/util.js'; import * as API from '../../utils/API.js'; const app = getApp(); Page({ /** * 页面的初始数据 */ data: { isIPX: app.globalData.isIPX, pageNums:1, scrollHeight:"", financeList:[], index:0, array:["收支明细公开"], userInfoObj:[], date: UTIL.formatDates(new Date), data:{} }, onConfirmReviewTime(e){ let data = e.detail.value; this.setData({ 'date':data, 'pageNums':1}); this.getList(); }, paging(){ this.setData({ pageNums:this.data.pageNums+1, }) this.getList(); }, getList:function(){ let params = { pageNum:this.data.pageNums, pageSize:10, startNY:this.data.date, all:false } UTIL.httpRequest(API.URL_GET_FINANCIALLIST,params,{ success: (res) => { console.log(res); if(res.code == 200){ this.setData({'data':res.summary}) if(this.data.pageNums!=1&&this.data.financeList.length { console.log(res); that.setData({ scrollHeight:wx.getSystemInfoSync().windowHeight-res[0].height-res[0].top-res[1].height-res[1].left*2 }) }) this.getList() }, bindPickerChange:function(e){ this.setData({index:e.detail.value}); }, switchTab:function(e){ this.setData({ active:e.currentTarget.dataset.gid }) }, back:function(){ wx.navigateBack({ delta: 1 }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { } })