|
|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<view class="order-page">
|
|
|
+ <view style="font-size:36upx;margin-top:20upx;">累计已结账:¥{{totalAmount}}</view>
|
|
|
<view scroll-y class="order-list">
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
<OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="gotoDetail(item)"></OrderItem>
|
|
|
@@ -22,17 +23,19 @@ export default {
|
|
|
},
|
|
|
mixins: [list],
|
|
|
data() {
|
|
|
- return {}
|
|
|
+ return {
|
|
|
+ totalAmount:0
|
|
|
+ }
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
this.resetList();
|
|
|
- this._list().then(res => {
|
|
|
+ this.getClearList().then(res => {
|
|
|
uni.stopPullDownRefresh();
|
|
|
});
|
|
|
},
|
|
|
onReachBottom() {
|
|
|
if (!this.list.finished) {
|
|
|
- this._list().then((res) => {
|
|
|
+ this.getClearList().then((res) => {
|
|
|
uni.stopPullDownRefresh();
|
|
|
});
|
|
|
} else {
|
|
|
@@ -41,17 +44,18 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async init() {
|
|
|
- this._list();
|
|
|
+ this.getClearList();
|
|
|
},
|
|
|
- _list() {
|
|
|
+ getClearList() {
|
|
|
let options = {
|
|
|
page: this.list.page,
|
|
|
pageSize: this.list.pageSize,
|
|
|
customId:this.option.customId
|
|
|
};
|
|
|
return getCustomClearList(options).then(res => {
|
|
|
- this.completes(res);
|
|
|
- }).catch(err => {});
|
|
|
+ this.totalAmount = res.data.totalAmount ? parseFloat(res.data.totalAmount) : 0
|
|
|
+ this.completes(res);
|
|
|
+ })
|
|
|
},
|
|
|
gotoDetail(item) {
|
|
|
uni.navigateTo({
|