From 2fdba74d87220bbd45b00c4d962c859b45a951bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E6=9C=89=E6=B8=85=E9=A6=99=E6=9C=88=E6=9C=89?= =?UTF-8?q?=E9=98=B4?= <185154740@qq.com> Date: Thu, 13 Jan 2022 14:52:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BF=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppEpidemicSituation/ErrorDetail.vue | 16 +++++++++++-- .../AppEpidemicSituation/HealthDetail.vue | 24 +++++++++++++++---- src/apps/AppEpidemicSituation/UserDetail.vue | 2 +- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/apps/AppEpidemicSituation/ErrorDetail.vue b/src/apps/AppEpidemicSituation/ErrorDetail.vue index 95f7810e..31120e71 100644 --- a/src/apps/AppEpidemicSituation/ErrorDetail.vue +++ b/src/apps/AppEpidemicSituation/ErrorDetail.vue @@ -108,6 +108,8 @@ export default { userList: [], data: [], datas: [], + size: 10, + current: 1, } }, computed: { @@ -152,7 +154,7 @@ export default { .post(`/app/appepidemichealthreport/list?memberId=${this.id}`) .then((res) => { if (res.code == 0) { - this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records + this.datas = res.data.records this.$hideLoading() } else { this.$hideLoading() @@ -167,7 +169,13 @@ export default { getRecord() { this.$loading() this.$http - .post(`/app/appepidemicunusuallog/list?recordId=${this.id}`) + .post(`/app/appepidemicunusuallog/list`, null, { + params: { + recordId: this.id, + size: this.size, + current: this.current, + }, + }) .then((res) => { if (res.code == 0) { this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records @@ -222,6 +230,10 @@ export default { uni.makePhoneCall({ phoneNumber: phone }) }, }, + onReachBottom() { + this.current++ + this.getRecord() + }, } diff --git a/src/apps/AppEpidemicSituation/HealthDetail.vue b/src/apps/AppEpidemicSituation/HealthDetail.vue index 81b326f8..ca1acb52 100644 --- a/src/apps/AppEpidemicSituation/HealthDetail.vue +++ b/src/apps/AppEpidemicSituation/HealthDetail.vue @@ -68,6 +68,8 @@ export default { userList: [], diffNum: '', today: '', + size: 10, + current: 1, } }, computed: { @@ -104,11 +106,19 @@ export default { }, getRecord() { - this.$http.post(`/app/appepidemichealthreport/list?memberId=${this.id}`).then((res) => { - if (res.code == 0) { - this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records - } - }) + this.$http + .post(`/app/appepidemichealthreport/list`, null, { + params: { + memberId: this.id, + size: this.size, + current: this.current, + }, + }) + .then((res) => { + if (res.code == 0) { + this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records + } + }) }, callPhone(phone) { @@ -127,6 +137,10 @@ export default { }) }, }, + onReachBottom() { + this.current++ + this.getRecord() + }, } diff --git a/src/apps/AppEpidemicSituation/UserDetail.vue b/src/apps/AppEpidemicSituation/UserDetail.vue index c75ed550..a9e6e8ef 100644 --- a/src/apps/AppEpidemicSituation/UserDetail.vue +++ b/src/apps/AppEpidemicSituation/UserDetail.vue @@ -179,7 +179,7 @@ export default { .post(`/app/appepidemicunusuallog/list?recordId=${this.userList.memberId}`) .then((res) => { if (res.code == 0) { - this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records + this.datas = res.data.records this.$hideLoading() } else { this.$hideLoading()