| | |
| | | <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> |
| | |
| | | this.getList() |
| | | }, |
| | | onReachBottom() { |
| | | console.log('触底加载') |
| | | this.getList() |
| | | }, |
| | | onPullDownRefresh() { |
| | | this.page = 1 |
| | | this.list = [] |
| | | this.next = false |
| | | this.getList(1) |
| | | }, |
| | | methods: { |
| | | jump(type, id) { |
| | |
| | | }); |
| | | } |
| | | }, |
| | | getList() { |
| | | getList(type) { |
| | | if (!this.next) { |
| | | this.$u.api.transactionsPage({ |
| | | capacity: 10, |
| | |
| | | } |
| | | ] |
| | | }).then(res => { |
| | | if (type) { |
| | | uni.stopPullDownRefresh() |
| | | } |
| | | if (res.code === 200) { |
| | | this.page += 1 |
| | | this.list.push(...res.data.records) |
| | |
| | | color: #999999; |
| | | } |
| | | } |
| | | .list_item_e { |
| | | width: 100%; |
| | | margin-top: 20rpx; |
| | | text { |
| | | font-weight: 400; |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |