Commit de5ffc80 authored by 刘用法's avatar 刘用法

防止后台给的total不准确

parent 958b2ff9
......@@ -261,7 +261,7 @@
self.orderList = []
}
self.orderList.push(...res.data.list);
self.currentLoadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore'
self.currentLoadStatus = res.data.total > self.orderList.length && res.data.list.length == self.search.pageSize ? 'loadmore' : 'nomore'
}
} else {
......
......@@ -264,7 +264,7 @@
if (self.list[self.types[res.data.type]]) {
self.list[self.types[res.data.type]].total = res.data.total
}
self.loadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore'
self.loadStatus = res.data.total > self.orderList.length && res.data.list.length == self.pageSize ? 'loadmore' : 'nomore'
}
} else {
console.log(res.message, "获取订单数量失败!");
......
......@@ -3,33 +3,40 @@
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="收入流水" titleColor="#333333"
:border-bottom="false"></u-navbar>
<view class="statement-content-view">
<view class="head-view">
<view class="head-top-view">
</view>
<view class="head-bottom-view">
<view v-for="(value, key) in items" :key="key">
<view><text>{{value}}</text></view>
<view><text>{{info[key]}}</text></view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
data: {
type: Object,
default () {
return {
paymentTime: '预结',
payableRecordStatusText: '已确认',
payableRecordNumber: '订单数',
statementList: [] // count是总数
}
}
}
},
data() {
return {
}
},
computed: {
computed: {
info() {
return {...this.data, number: this.data.statementList.length}
},
items() {
return {
paymentTime: '预结(元)',
payableRecordStatusText: '已确认(元)',
number: '订单数(单)',
}
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment