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

防止后台给的total不准确

parent 958b2ff9
...@@ -261,7 +261,7 @@ ...@@ -261,7 +261,7 @@
self.orderList = [] self.orderList = []
} }
self.orderList.push(...res.data.list); 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 { } else {
......
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
if (self.list[self.types[res.data.type]]) { if (self.list[self.types[res.data.type]]) {
self.list[self.types[res.data.type]].total = res.data.total 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 { } else {
console.log(res.message, "获取订单数量失败!"); console.log(res.message, "获取订单数量失败!");
......
...@@ -3,35 +3,42 @@ ...@@ -3,35 +3,42 @@
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="收入流水" titleColor="#333333" <u-navbar back-icon-color="#333333" background="#F4F5F7" title="收入流水" titleColor="#333333"
:border-bottom="false"></u-navbar> :border-bottom="false"></u-navbar>
<view class="statement-content-view"> <view class="statement-content-view">
<view class="head-view">
<view class="head-top-view">
</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> </view>
</template> </template>
<script> <script>
export default { export default {
props: {
data: {
type: Object,
default () {
return {
paymentTime: '预结',
payableRecordStatusText: '已确认',
payableRecordNumber: '订单数',
statementList: [] // count是总数
}
}
}
},
data() { data() {
return { return {
} }
}, },
computed: { computed: {
info() {
return {...this.data, number: this.data.statementList.length}
},
items() {
return {
paymentTime: '预结(元)',
payableRecordStatusText: '已确认(元)',
number: '订单数(单)',
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
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