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: [],
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()
},
}
</script>

View File

@@ -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()
},
}
</script>

View File

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