From ecc275426d26c4939b63690013b868e53a44f47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com> Date: Thu, 30 Mar 2023 00:59:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/apis.js | 2 ++ src/pages/service/detail.vue | 11 +++++++---- src/pages/worker/detail.vue | 7 +++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/core/apis.js b/src/core/apis.js index 2636f41..20ffbee 100644 --- a/src/core/apis.js +++ b/src/core/apis.js @@ -299,9 +299,11 @@ export default { list: { service: { url: "/wxapp/index/goodsevaluation", + showLoading: true, }, worker: { url: "/wxapp/orderb/allevaluation", + showLoading: true, } } }, diff --git a/src/pages/service/detail.vue b/src/pages/service/detail.vue index d2d9578..7abe2c0 100644 --- a/src/pages/service/detail.vue +++ b/src/pages/service/detail.vue @@ -9,7 +9,7 @@ - + - + { if (list.length > 0) { + if (this.currentAppraiseCate.page == 1) { + this.currentAppraiseCate.list = list; + } else { + this.currentAppraiseCate.list = this.currentAppraiseCate.list.concat(list); + } this.currentAppraiseCate.page++; - this.currentAppraiseCate.list = this.currentAppraiseCate.list.concat(list); } else { this.currentAppraiseCate.more = false; } diff --git a/src/pages/worker/detail.vue b/src/pages/worker/detail.vue index 85d362b..439b4d7 100644 --- a/src/pages/worker/detail.vue +++ b/src/pages/worker/detail.vue @@ -123,7 +123,6 @@ export default { * 切换评价分类 */ changeAppraiseCate(currentAppraiseCate, index) { - currentAppraiseCate.list = []; currentAppraiseCate.more = true; currentAppraiseCate.page = 1; this.currentAppraiseCate = currentAppraiseCate; @@ -142,8 +141,12 @@ export default { }) .then((list) => { if (list.length > 0) { + if (this.currentAppraiseCate.page == 1) { + this.currentAppraiseCate.list = list; + } else { + this.currentAppraiseCate.list = this.currentAppraiseCate.list.concat(list); + } this.currentAppraiseCate.page++; - this.currentAppraiseCate.list = this.currentAppraiseCate.list.concat(list); } else { this.currentAppraiseCate.more = false; }