jiangping
2024-07-29 d9a89d83c2048a964f16ca179feb2b7f21b9d33a
wechat_jiaxuan/pages/userinfo/mysub.js
@@ -15,6 +15,11 @@
  onLoad(options) {
    this.getList()
  },
  onPullDownRefresh: function () {
    console.log('下拉刷新');
    this.setData({ dataList: [], page: 1, total: 0 })
    this.getList()
  },
  onReachBottom() {
    console.log('触底事件');
    const { total, dataList, page } = this.data
@@ -35,10 +40,18 @@
        type: activeTabs
      },page,capacity
    }).then(res => {
      this.setData({
        dataList: res.data.records,
        total: res.data.total,
      })
      if(res.data && res.data.records){
        const temp = res.data.records.map(item => {
          if(item.budget > 10000){
            item.budget = (item.budget / 10000).toFixed(2) + '万'
          }
          return item
        })
        this.setData({
          dataList: [ ...this.data.dataList, ...temp ],
          total: res.data.total,
        })
      }
    })
  },
  tabsChange(e) {