From 13258b3b634010afd5facae443156f4358ce123c Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Sat, 5 Sep 2020 16:11:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/mine/order-item/index.vue | 2 +- pageE/order/Index.vue | 32 +++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 6 deletions(-) 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;