This commit is contained in:
花有清香月有阴
2022-01-13 14:52:28 +08:00
parent 64b816b648
commit 2fdba74d87
3 changed files with 34 additions and 8 deletions

View File

@@ -108,6 +108,8 @@ export default {
userList: [], userList: [],
data: [], data: [],
datas: [], datas: [],
size: 10,
current: 1,
} }
}, },
computed: { computed: {
@@ -152,7 +154,7 @@ export default {
.post(`/app/appepidemichealthreport/list?memberId=${this.id}`) .post(`/app/appepidemichealthreport/list?memberId=${this.id}`)
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records this.datas = res.data.records
this.$hideLoading() this.$hideLoading()
} else { } else {
this.$hideLoading() this.$hideLoading()
@@ -167,7 +169,13 @@ export default {
getRecord() { getRecord() {
this.$loading() this.$loading()
this.$http 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) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
@@ -222,6 +230,10 @@ export default {
uni.makePhoneCall({ phoneNumber: phone }) uni.makePhoneCall({ phoneNumber: phone })
}, },
}, },
onReachBottom() {
this.current++
this.getRecord()
},
} }
</script> </script>

View File

@@ -68,6 +68,8 @@ export default {
userList: [], userList: [],
diffNum: '', diffNum: '',
today: '', today: '',
size: 10,
current: 1,
} }
}, },
computed: { computed: {
@@ -104,7 +106,15 @@ export default {
}, },
getRecord() { getRecord() {
this.$http.post(`/app/appepidemichealthreport/list?memberId=${this.id}`).then((res) => { this.$http
.post(`/app/appepidemichealthreport/list`, null, {
params: {
memberId: this.id,
size: this.size,
current: this.current,
},
})
.then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
} }
@@ -127,6 +137,10 @@ export default {
}) })
}, },
}, },
onReachBottom() {
this.current++
this.getRecord()
},
} }
</script> </script>

View File

@@ -179,7 +179,7 @@ export default {
.post(`/app/appepidemicunusuallog/list?recordId=${this.userList.memberId}`) .post(`/app/appepidemicunusuallog/list?recordId=${this.userList.memberId}`)
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records this.datas = res.data.records
this.$hideLoading() this.$hideLoading()
} else { } else {
this.$hideLoading() this.$hideLoading()