123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- // pages/cashRecord/cashRecord.js
- const app = getApp()
- var net = require('../../utils/net.js')
- var url = require('../../utils/url.js')
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- total:'',
- list: [],
- isAll: false,
- isLoading: false
- },
- getList: function (id) {
- net.connect({
- url: url.host + url.withdraw_list,
- data: { lastWithdrawId: id },
- success: res => {
- if (id == '0') {
- wx.hideLoading()
- }
- var isAll = false
- if (res.data.data.length == 0) {
- isAll = true
- }
- this.setData({
- isAll: isAll,
- isLoading: false,
- list: this.data.list.concat(res.data.data)
- })
- },
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- var total = '已经累计提现 ¥' + ((Number(options.applyFee) + Number(options.finishFee)) / 100)
- this.setData({
- total: total
- })
- wx.showLoading({
- title: '',
- })
- this.getList('0')
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- if (this.data.isAll || this.data.isLoading) {
- return
- }
- this.setData({
- isLoading: 'ture'
- })
- var count = this.data.list.length
- this.getList(this.data.list[count - 1]['withdrawId'])
- },
- /**
- * 用户点击右上角分享
- */
- // onShareAppMessage: function () {
-
- // }
- })
|