|
|
|
|
@@ -7,7 +7,7 @@
|
|
|
|
|
<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
|
|
|
|
|
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom" class="order-scroll">
|
|
|
|
|
<view v-if="orderList[index]">
|
|
|
|
|
<view class="item-container" v-for="order in orderList[index]" :key="order.order_id">
|
|
|
|
|
<view class="item-container" v-for="(order,index) in orderList[index]" :key="index">
|
|
|
|
|
<OrderItem :order="order" @refreshOrderList="refreshOrderList" v-if="current != 4"></OrderItem>
|
|
|
|
|
<TryOrderItem :order="order" @refreshOrderList="refreshOrderList" v-else></TryOrderItem>
|
|
|
|
|
</view>
|
|
|
|
|
@@ -129,13 +129,30 @@ export default {
|
|
|
|
|
page: this.page,
|
|
|
|
|
type: type,
|
|
|
|
|
})
|
|
|
|
|
console.log(load)
|
|
|
|
|
res.data.forEach(element => {
|
|
|
|
|
element.extend_order_goods.forEach(i=>{
|
|
|
|
|
console.log(i)
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
this.timer = true;
|
|
|
|
|
uni.stopPullDownRefresh(); // 结束刷新
|
|
|
|
|
if(res.errCode == 0) {
|
|
|
|
|
if(load == 'reload') this.orderList[this.current] = res.data;
|
|
|
|
|
else if(load == 'loadmore') this.orderList[this.current].push(...res.data);
|
|
|
|
|
if(load == 'reload'){
|
|
|
|
|
this.orderList[this.current] = []
|
|
|
|
|
this.orderList[this.current] = res.data;
|
|
|
|
|
|
|
|
|
|
}else if(load == 'loadmore'){
|
|
|
|
|
this.orderList[this.current].push(...res.data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.orderList[this.current].forEach(element => {
|
|
|
|
|
element.extend_order_goods.forEach(i=>{
|
|
|
|
|
console.log(i)
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
this.$forceUpdate();
|
|
|
|
|
|
|
|
|
|
// console.log(this.orderList);
|
|
|
|
|
return res.data.length;
|
|
|
|
|
},
|
|
|
|
|
@@ -156,11 +173,16 @@ export default {
|
|
|
|
|
const res = await this.$u.api.goodsTryOrderList({
|
|
|
|
|
page: this.page,
|
|
|
|
|
})
|
|
|
|
|
console.log(res)
|
|
|
|
|
uni.stopPullDownRefresh(); // 结束刷新
|
|
|
|
|
this.timer = true;
|
|
|
|
|
if(res.errCode == 0) {
|
|
|
|
|
if(load == 'reload') this.orderList[this.current] = res.data.list;
|
|
|
|
|
else if(load == 'loadmore') this.orderList[this.current].push(...res.data.list);
|
|
|
|
|
if(load == 'reload') {
|
|
|
|
|
this.orderList[this.current] = []
|
|
|
|
|
this.orderList[this.current] = res.data.list;
|
|
|
|
|
}else if(load == 'loadmore'){
|
|
|
|
|
this.orderList[this.current].push(...res.data.list);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.$forceUpdate();
|
|
|
|
|
return res.data.list.length;
|
|
|
|
|
|