From 3bcbbf5d5ddb972f796072c3fc429cf6a933138c Mon Sep 17 00:00:00 2001 From: "@QQNZX" Date: Wed, 6 Dec 2023 09:41:19 +0800 Subject: [PATCH] =?UTF-8?q?12.06=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gasStation-uni/pages/my/my.vue | 14 ++++----- gasStation-uni/pagesMy/myorder/myorder.vue | 34 +++++++++++++++------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/gasStation-uni/pages/my/my.vue b/gasStation-uni/pages/my/my.vue index 9c6c11c6b..c42cd2634 100644 --- a/gasStation-uni/pages/my/my.vue +++ b/gasStation-uni/pages/my/my.vue @@ -44,7 +44,7 @@ - + @@ -54,7 +54,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -71,7 +71,7 @@ 已完成 - + @@ -172,9 +172,9 @@ tabbar }, methods: { - gomyorder() { + gomyorder(id) { uni.navigateTo({ - url: '/pagesMy/myorder/myorder' + url: '/pagesMy/myorder/myorder?id=' + id }) }, gotodaby() { @@ -405,4 +405,4 @@ .centenr-size { font-size: 14px; } - + \ No newline at end of file diff --git a/gasStation-uni/pagesMy/myorder/myorder.vue b/gasStation-uni/pagesMy/myorder/myorder.vue index 90cb97895..f36d4f0df 100644 --- a/gasStation-uni/pagesMy/myorder/myorder.vue +++ b/gasStation-uni/pagesMy/myorder/myorder.vue @@ -46,7 +46,7 @@ {{parseTime(item.payTime)}} {{item.createTime}} - + 评价有礼 @@ -102,8 +102,10 @@ scrollTop: 0, } }, - onLoad() { - this.getMyOrder() + onLoad(option) { + this.tapindex = option.id + this.getTapIndex(option.id) + // this.getMyOrder() this.getStores() this.getPayList() }, @@ -204,14 +206,21 @@ method: 'get', params: _this.map, }).then((res) => { - if (_this.map.page == 1) { - _this.orderList = res.data.records - _this.list = res.data.records - } else { - _this.orderList = _this.orderList.concat(res.data.records) - _this.list = _this.list.concat(res.data.records) + uni.showLoading({ + title: '加载中' + }); + if (res.code == 200) { + if (_this.map.page == 1) { + _this.orderList = res.data.records + _this.list = res.data.records + } else { + _this.orderList = _this.orderList.concat(res.data.records) + _this.list = _this.list.concat(res.data.records) + } + _this.total = res.data.total + uni.hideLoading(); } - _this.total = res.data.total + }) }, getTapIndex(index) { @@ -252,6 +261,11 @@ this.getMyOrder() } }, + goComment() { + uni.navigateTo({ + url: "/pagesMy/comment/comment" + }) + }, goBack() { uni.navigateBack() }