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()