MrShi
昨天 00a7a61df86db969f2ba61c508d02ba4709ce3d4
app/pages/wallet/wallet.vue
@@ -53,8 +53,8 @@
                  </view>
               </view>
               <view class="item-date-bottom">
                  <text>收入:¥{{(countDataList.totalIncome || 0).toFixed(2)}}</text>
                  <text>支出:¥{{(countDataList.totalExpense || 0).toFixed(2)}}</text>
                  <text>收入:¥{{((countDataList.totalIncome || 0) / 100).toFixed(2)}}</text>
                  <text>支出:¥{{((countDataList.totalExpense || 0) / 100).toFixed(2)}}</text>
               </view>
            </view>
            <view class="item-list">
@@ -166,6 +166,7 @@
      data() {
         return {
            currentPage:1,
            loading:false,
            total:0,
            active:0,
            wordsWidth:250,
@@ -240,6 +241,7 @@
                return value
            },
         getShopPage() {
            console.log(this.loading, this.hasNext)
            if(this.loading || !this.hasNext){
               return
            }
@@ -258,16 +260,21 @@
               },
               page: this.currentPage
            }).then(res => {
               console.log(res)
               if (res.code == 200) {
                  this.dataList.push(...res.data.records)
                  this.total = res.data.total
                  this.currentPage = this.currentPage+1
                  if (this.dataList.length >= res.data.total) {
                     this.hasNext = false
                  } else {
                     this.hasNext = true
                  }
                  const records = res.data.records || []
                  console.log(res.data.pageCount)
                  this.dataList.push(...records)
                  console.log(records)
                  console.log(this.dataList)
                  this.total = res.data.pageCount
                  this.currentPage++
                  this.hasNext = this.dataList.length < res.data.pageCount
               }
            }).catch(err => {
               console.log(err)
            }).finally(() => {
               this.loading = false
            })
         },
         getShopSummary() {
@@ -428,7 +435,7 @@
            this.tempType = index
         },
         getFirstPageData(){
            this.currentPage = 0
            this.currentPage = 1
            this.hasNext=true
            this.loading=false
            this.total=0