From e450469daadd8804a95cd88e5582e6db1f2af3ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com> Date: Thu, 14 Nov 2024 16:36:12 +0800 Subject: [PATCH] xg --- api/pagesB/Healthknowledge/index.js | 4 ++-- pages/medicalservice/medicalservice.vue | 2 +- .../consultationplatform/consultationplatform.vue | 15 +++++---------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/api/pagesB/Healthknowledge/index.js b/api/pagesB/Healthknowledge/index.js index 456923d..e888a21 100644 --- a/api/pagesB/Healthknowledge/index.js +++ b/api/pagesB/Healthknowledge/index.js @@ -1,8 +1,8 @@ import request from "@/api/request.js" -export function getHeathHousingList(pageNum, pageSize) { +export function getHeathHousingList(pageNum, pageSize, idCard) { return request({ - url: `/nurseApplet/nearbyNursingStation/getHeathHousingList?pageNum=${pageNum}&pageSize=${pageSize}&informationCategoryType=HEALTH_NOUS`, + url: `/nurseApplet/nearbyNursingStation/getHeathHousingList?pageNum=${pageNum}&pageSize=${pageSize}&informationCategoryType=HEALTH_NOUS&idCard=${idCard}`, method: 'get', header: { Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'), diff --git a/pages/medicalservice/medicalservice.vue b/pages/medicalservice/medicalservice.vue index f049f55..635fd10 100644 --- a/pages/medicalservice/medicalservice.vue +++ b/pages/medicalservice/medicalservice.vue @@ -130,7 +130,7 @@ }, // 健康常识 getHeathHousing() { - getHeathHousingList(this.pageNum, this.pageSize).then(res => { + getHeathHousingList(this.pageNum, this.pageSize, uni.getStorageSync('userinfo').cardNo).then(res => { if (res.rows) { res.rows.forEach(e => { e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl diff --git a/pagesB/consultationplatform/consultationplatform.vue b/pagesB/consultationplatform/consultationplatform.vue index 129d76e..a56d98c 100644 --- a/pagesB/consultationplatform/consultationplatform.vue +++ b/pagesB/consultationplatform/consultationplatform.vue @@ -21,7 +21,7 @@ - + @@ -68,7 +68,7 @@ pageNum: 1, pageSize: 10, departmentId: null, - HospitalPersonlist: null, + HospitalPersonlist: [], HospitalPersontotal: 0, hospitalDepartmentList: null, cardNo: '', @@ -94,7 +94,7 @@ selectHospitalPersonInfo() { var status = '1' selectHospitalPerson(this.pageNum, this.pageSize, this.departmentId, status).then(res => { - this.HospitalPersonlist = res.rows + this.HospitalPersonlist = [...this.HospitalPersonlist, ...res.rows] this.HospitalPersontotal = res.total }) }, @@ -159,17 +159,12 @@ onReachBottom() { //下滑加载 if (this.HospitalPersonlist.length >= this.HospitalPersontotal) {} else { this.pageNum++ - getHeathHousingList(this.pageNum, this.pageSize).then(res => { - if (res.rows) { - res.rows.forEach(e => { - this.HospitalPersonlist.push(e) - }) - } - }) + this.selectHospitalPersonInfo(); } }, onPullDownRefresh() { //下拉刷新 this.pageNum = 1; + this.HospitalPersonlist = [] this.selectHospitalPersonInfo(); setTimeout(function() { uni.stopPullDownRefresh();