回滚订单列表

This commit is contained in:
luofei 2023-07-07 17:59:40 +08:00
parent acb22b28da
commit 222d240bd7

View File

@ -21,7 +21,7 @@
<view>全部</view>
<view class='num'>{{orderData.all || 0}}</view>
</view>
<view class='item' :class='orderStatus==21 ? "on": ""' @click="statusClick(21)">
<view class='item' :class='orderStatus==0 ? "on": ""' @click="statusClick(0)">
<view>待付款</view>
<view class='num'>{{orderData.noPay || 0}}</view>
</view>
@ -59,7 +59,7 @@
<view class='list'>
<!-- 代付款 -->
<view v-if="orderList.length > 0">
<block v-if="orderStatus == 21">
<block v-if="orderStatus == 0">
<view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.group_order_id)'>
<view class='title acea-row row-between-wrapper'>
@ -416,8 +416,7 @@
id: ''
},
//
activity_type: '',
product_type:0,
activity_type: ''
};
},
computed: {
@ -499,10 +498,7 @@
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
if (options.product_type) this.product_type = options.product_type;
if (options.status) this.orderStatus = options.status;
},
/**
* 获取订单统计数据
@ -546,13 +542,10 @@
*
*/
goPay: function(pay_price, order_id) {
uni.navigateTo({
url: '/pages/users/payment/payment?order_id=' + order_id
});
// this.$set(this, 'pay_close', true);
// this.order_id = order_id;
// this.pay_order_id = order_id.toString()
// this.$set(this, 'totalPrice', pay_price);
this.$set(this, 'pay_close', true);
this.order_id = order_id;
this.pay_order_id = order_id.toString()
this.$set(this, 'totalPrice', pay_price);
},
/**
* 支付成功回调
@ -668,17 +661,37 @@
that.loadTitle = "加载更多";
if (that.isReady) {
that.isReady = false
getOrderList({
status: that.orderStatus-1,
if (that.orderStatus == 0) {
groupOrderList({
page: that.page,
limit: that.limit,
}).then(res => {
console.log(res);
that.isReady = true;
let list = res.data.list || [];
let loadend = list.length < that.limit;
// console.log(that.orderList)
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that
.orderList);
that.$set(that, 'orderList', that.orderList);
// console.log(that.orderList)
that.getProductCount();
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? "我也是有底线的" : '加载更多';
that.page = that.page + 1
})
} else {
getOrderList({
status: that.orderStatus - 1,
page: that.page,
limit: that.limit,
product_type:that.product_type
}).then(res => {
console.log(res);
let list = res.data.list || [];
let loadend = list.length < that.limit;
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that.orderList);
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that
.orderList);
that.$set(that, 'orderList', that.orderList);
that.getProductCount();
that.loadend = loadend;
@ -691,7 +704,7 @@
that.loadTitle = "加载更多";
})
}
}
},
/**
* 获取定金预售订单列表