From 1f105b765518983d3bda3e1bdb894b1a8f5a4876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Fri, 17 Feb 2023 10:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/site/site.js | 4 +- pages/login/login.scss | 3 +- pages/site/site.scss | 14 ++++++ pages/site/site.vue | 96 +++++++++++++++++++++++------------------- 4 files changed, 71 insertions(+), 46 deletions(-) diff --git a/api/site/site.js b/api/site/site.js index e794ad9..e02608c 100644 --- a/api/site/site.js +++ b/api/site/site.js @@ -1,8 +1,8 @@ import request from "../request.js" -export function nearbyList(pageSize, pageNum, longitude, latitude,nurseClassId,itemClassId) { +export function nearbyList(pageSize, pageNum, longitude, latitude,ClassifyInfoId,itemClassId,searchName) { return request({ - url: `/nurseApplet/nearbyNursingStation/getNearbyNursingStationInfoList?pageSize=${pageSize}&pageNum=${pageNum}&homeLongitude=${longitude}&homeLatitude=${latitude}&nurseClassId=${nurseClassId}&itemClassId=${itemClassId}`, + url: `/nurseApplet/nearbyNursingStation/nearbyList?pageSize=${pageSize}&pageNum=${pageNum}&homeLongitude=${longitude}&homeLatitude=${latitude}&nurseClassifyInfoId=${ClassifyInfoId}&nurseItemClassifyInfoId=${itemClassId}&searchName=${searchName}`, method: 'GET' }) } diff --git a/pages/login/login.scss b/pages/login/login.scss index abec627..43988db 100644 --- a/pages/login/login.scss +++ b/pages/login/login.scss @@ -3,6 +3,7 @@ color: #C3C1C1; font-weight: 400; height:100vh; + background-color: #ffffff; .title{ position: absolute; top:20%; @@ -17,7 +18,7 @@ } image{ width: 200rpx; - height: 100rpx; + height: 200rpx; } } diff --git a/pages/site/site.scss b/pages/site/site.scss index d7ef0df..629d197 100644 --- a/pages/site/site.scss +++ b/pages/site/site.scss @@ -94,6 +94,20 @@ padding: 30rpx 0 50rpx; margin: 0 auto; height: 100%; + .noorder{ + margin-top: 90rpx; + image{ + display: block; + margin: 0 auto; + width: 100rpx; + height: 120rpx; + } + view{ + text-align: center; + font-size: 36rpx; + color: #BFBFBF; + } + } .title{ font-size: 32rpx; font-weight: bold; diff --git a/pages/site/site.vue b/pages/site/site.vue index 2d5d57e..a484c6e 100644 --- a/pages/site/site.vue +++ b/pages/site/site.vue @@ -2,7 +2,7 @@ - + - - - {{item.nurseStationName}} - - 距离您{{item.distance}}KM - - - - {{uitem.classifyName}} + + + + {{item.nurseStationName}} + + 距离您{{item.distance}}KM + + + + {{uitem.classifyName}} + + + + + 暂无护理站 + + @@ -69,16 +77,7 @@ nurseAgencyClassifyInfoList: [], //护理站分类 conNewcurrent: 0, nurseItemClassifyInfoList: [], //护理项目分类 - lbinfo: [{ - image: 'http://192.168.16.30:8088/profile/goodsPictureUrl/2023/02/15/2ff771a32e9e218b7a375437f3912a4_20230215094755A00126dbdd9a1d.png', - }, - { - image: 'http://192.168.16.30:8088/profile/goodsPictureUrl/2023/02/15/2ff771a32e9e218b7a375437f3912a4_20230215094755A00126dbdd9a1d.png', - }, - { - image: 'http://192.168.16.30:8088/profile/goodsPictureUrl/2023/02/15/2ff771a32e9e218b7a375437f3912a4_20230215094755A00126dbdd9a1d.png', - } - ], //轮播list + lbinfo: [], //轮播list nursestationlist: [], mask: false, pageNum: 1, @@ -89,6 +88,7 @@ homeLatitudeLongitude: null, nurseClassId: '', //护理站分类id itemClassId: '', //护理项目分类id + searchName: '', //通用名称 } }, methods: { @@ -115,6 +115,12 @@ res.data.nurseItemClassifyInfoList.forEach(e => { e.classifyPictureUrl = baseurl + e.classifyPictureUrl }) + res.data.poserInfoList.forEach(e => { + var obj = { + image: baseurl + e.posterPictureUrl + } + this.lbinfo.push(obj) + }) this.nurseItemClassifyInfoList = res.data.nurseItemClassifyInfoList.slice(0, 7) }) }, @@ -142,18 +148,19 @@ }, requestinfo() { this.pageNum = 1; - nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseClassId, this.itemClassId) + nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseClassId, this.itemClassId, + this.searchName) .then(res => { - if (res.total > 0) { - uni.removeStorageSync('Refresh'); - res.rows.forEach(e => { - e.stationPictureUrl = baseurl + e.stationPictureUrl - e.nurseStationClassifyList = e.nurseStationClassifyList.slice(0, 2) - }) - this.nursestationlist = res.rows - this.mask = false - this.total = res.total - } + uni.removeStorageSync('Refresh'); + res.rows.forEach(e => { + e.stationPictureUrl = baseurl + e.stationPictureUrl + if (e.classifyInfoList.length >= 1) { + e.classifyInfoList = e.classifyInfoList.slice(0, 2) + } + }) + this.nursestationlist = res.rows + this.mask = false + this.total = res.total }) }, godetails(item) { @@ -171,26 +178,29 @@ onReachBottom() { //上滑加载 if (this.nursestationlist.length >= this.total) {} else { this.pageNum++; - nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseClassId, this.itemClassId) - .then(res => { - res.rows.forEach(e => { - e.stationPictureUrl = baseurl + e.stationPictureUrl - e.nurseStationClassifyList = e.nurseStationClassifyList.slice(0, 2) - this.nursestationlist.push(e) - }) - }) + // nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseClassId, this.itemClassId, + // this.searchName) + // .then(res => { + // res.rows.forEach(e => { + // e.stationPictureUrl = baseurl + e.stationPictureUrl + // if (e.classifyInfoList.length >= 1) { + // e.classifyInfoList = e.classifyInfoList.slice(0, 2) + // } + // this.nursestationlist.push(e) + // }) + // }) } }, onPullDownRefresh() { //下拉刷新 this.pageNum = 1; - this.requestinfo() + // this.requestinfo() setTimeout(function() { uni.stopPullDownRefresh(); }, 1000); }, watch: { - iptVal() { - // this.requestinfo() + searchName() { + this.requestinfo() }, }, onShow() {