diff --git a/components/mine/order-item/index.vue b/components/mine/order-item/index.vue index 75fac3d..7c02123 100644 --- a/components/mine/order-item/index.vue +++ b/components/mine/order-item/index.vue @@ -8,7 +8,7 @@ {{ state }} - + {{ goods.goods_name }} diff --git a/pageE/order/Index.vue b/pageE/order/Index.vue index 4222680..f45a2bb 100644 --- a/pageE/order/Index.vue +++ b/pageE/order/Index.vue @@ -7,7 +7,7 @@ - + @@ -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;