MrShi
2023-10-31 e9af167156ca9d1b404a76ab0fc8c82c26fe6a11
bicycle/pages/consumptionDetails/consumptionDetails.vue
@@ -30,8 +30,13 @@
         this.getList()
      },
      onReachBottom() {
         console.log('触底加载')
         this.getList()
      },
      onPullDownRefresh() {
         this.page = 1
         this.list = []
         this.next = false
         this.getList(1)
      },
      methods: {
         jump(type, id) {
@@ -41,7 +46,7 @@
               });
            }
         },
         getList() {
         getList(type) {
            if (!this.next) {
               this.$u.api.transactionsPage({
                  capacity: 10,
@@ -54,6 +59,9 @@
                     }
                  ]
               }).then(res => {
                  if (type) {
                     uni.stopPullDownRefresh()
                  }
                  if (res.code === 200) {
                     this.page += 1
                     this.list.push(...res.data.records)