|
|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<view class="order-page">
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
+ <view style="margin:15upx 0 15upx 20upx;font-size:36upx;font-weight:bold;">总金额:¥{{ totalPrice }}</view>
|
|
|
<view class="pay_list">
|
|
|
<OrderItem
|
|
|
v-for="(item, index) in list.data"
|
|
|
@@ -24,6 +25,7 @@ import OrderItem from "./orderItem";
|
|
|
import { list } from "@/mixins";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import { getMergePurchaseList } from "@/api/purchase/index";
|
|
|
+import { onLoad } from "@dcloudio/uni-app";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -33,8 +35,9 @@ export default {
|
|
|
mixins: [list],
|
|
|
data () {
|
|
|
return {
|
|
|
- id: 0,
|
|
|
- salt: ''
|
|
|
+ mergeId: 0,
|
|
|
+ salt: '',
|
|
|
+ totalPrice:0
|
|
|
}
|
|
|
},
|
|
|
onReachBottom () {
|
|
|
@@ -52,14 +55,17 @@ export default {
|
|
|
uni.stopPullDownRefresh()
|
|
|
})
|
|
|
},
|
|
|
- methods: {
|
|
|
- init () {
|
|
|
- this.id = this.option.id ? this.option.id : 0
|
|
|
+ onLoad () {
|
|
|
+ this.mergeId = this.option.mergeId ? this.option.mergeId : 0
|
|
|
this.salt = this.option.salt ? this.option.salt : ''
|
|
|
this.getOrderList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init () {
|
|
|
},
|
|
|
getOrderList () {
|
|
|
- return getMergePurchaseList({ id: this.id, salt: this.salt, page: this.list.page }).then(res => {
|
|
|
+ return getMergePurchaseList({ mergeId: this.mergeId, salt: this.salt}).then(res => {
|
|
|
+ this.totalPrice = res.data.totalPrice?res.data.totalPrice:0
|
|
|
this.completes(res)
|
|
|
})
|
|
|
},
|