111
k94314517
2025-03-20 3d3ed4872b5038a8cc72abc72f95fc2c134e7bc4
bicycle/pages/consumptionDetails/consumptionDetails.vue
@@ -3,12 +3,15 @@
      <view class="list_item" v-for="(item, index) in list" :key="index" @click="jump(item.type, item.orderId)">
         <view class="list_item_a">
            <text>{{item.title}}</text>
            <text v-if="item.type === 0">¥{{(item.money / 100).toFixed(2)}}</text>
            <text style="color: #FC2525;" v-if="item.type === 1 || item.type === 2 || item.type === 3">-¥{{(item.money / 100).toFixed(2)}}</text>
            <text v-if="[0,4].includes(item.type)">¥{{(item.money / 100).toFixed(2)}}</text>
            <text style="color: #FC2525;" v-if="[1,2,3].includes(item.type)">-¥{{(item.money / 100).toFixed(2)}}</text>
         </view>
         <view class="list_item_e" v-if="item.type === 4">
            <text>{{item.content}}</text>
         </view>
         <view class="list_item_b">
            <text>{{item.doneDate}}</text>
            <text v-if="item.type === 0">微信支付</text>
            <text v-if="[0,4].includes(item.type)">微信支付</text>
            <text v-if="item.type === 1">查看明细</text>
            <text v-if="item.type === 2">微信退款</text>
            <text v-if="item.type === 3">微信退款</text>
@@ -30,8 +33,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 +49,7 @@
               });
            }
         },
         getList() {
         getList(type) {
            if (!this.next) {
               this.$u.api.transactionsPage({
                  capacity: 10,
@@ -54,6 +62,9 @@
                     }
                  ]
               }).then(res => {
                  if (type) {
                     uni.stopPullDownRefresh()
                  }
                  if (res.code === 200) {
                     this.page += 1
                     this.list.push(...res.data.records)
@@ -120,6 +131,15 @@
               color: #999999;
            }
         }
         .list_item_e {
            width: 100%;
            margin-top: 20rpx;
            text {
               font-weight: 400;
               font-size: 26rpx;
               color: #666666;
            }
         }
      }
   }
</style>