新首页,新护理站列表页,新护理站详情页和新护理项目详情页

This commit is contained in:
曹辉 2023-02-16 10:44:21 +08:00
parent 0b635ddcb1
commit 349e0d1698
17 changed files with 560 additions and 363 deletions

View File

@ -2,7 +2,7 @@ import request from "../request.js"
export function getAppStationItemInfo(stationId, stationItemId, stationItemPriceId) {
return request({
url: `/nurseApp/login/getAppStationItemInfo?stationId=${stationId}&stationItemId=${stationItemId}&stationItemPriceId=${stationItemPriceId}`,
url: `/nurseApplet/login/getStationItemInfo?stationId=${stationId}&stationItemId=${stationItemId}&stationItemPriceId=${stationItemPriceId}`,
method: 'GET'
})
}

9
api/homepage/index.js Normal file
View File

@ -0,0 +1,9 @@
import request from "../request.js"
export function informationCategoryList() {
return request({
url: `/nurseApplet/nearbyNursingStation/informationCategoryList?moduleType=HOME_PAGE_MODULE&&jumpType=HOME_PAGE&&informationCategoryType=HEALTH_NOUS`,
method: 'GET'
})
}

View File

@ -9,9 +9,9 @@ export function introductionList(id) {
}
export function itemList(id,pageSize,pageNum) {
export function itemList(id,pageSize,pageNum,nurseClassifyInfoId) {
return request({
url: `/nurseApplet/nearbyNursingStation/itemList?pageSize=${pageSize}&pageNum=${pageNum}&nurseStationId=${id}`,
url: `/nurseApplet/nearbyNursingStation/itemList?pageSize=${pageSize}&pageNum=${pageNum}&nurseStationId=${id}&nurseClassifyInfoId=${nurseClassifyInfoId}`,
method: 'GET'
})
}

View File

@ -1,11 +1,8 @@
import request from "../request.js"
export function nearbyList(pageSize,pageNum,longitude, latitude) {
export function nearbyList(pageSize, pageNum, longitude, latitude,nurseClassId,itemClassId) {
return request({
url: `/nurseApplet/nearbyNursingStation/nearbyList?pageSize=${pageSize}&pageNum=${pageNum}&homeLongitude=${longitude}&homeLatitude=${latitude}`,
url: `/nurseApplet/nearbyNursingStation/getNearbyNursingStationInfoList?pageSize=${pageSize}&pageNum=${pageNum}&homeLongitude=${longitude}&homeLatitude=${latitude}&nurseClassId=${nurseClassId}&itemClassId=${itemClassId}`,
method: 'GET'
})
}
@ -17,3 +14,11 @@ export function getPatientInfo(id) {
method: 'GET'
})
}
//护理站和护理项目分类
export function getNurseClassifyList() {
return request({
url: `/nurseApplet/nearbyNursingStation/getNurseClassifyList?moduleType=NURSE_AGENCY_MODULE`,
method: 'GET'
})
}

View File

@ -9,6 +9,13 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}, {
"path": "pages/ProjectDetails/ProjectDetails",
"style": {
"navigationBarTitleText": "护理项目详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //
}
}, {
"path": "pages/modifyAddress/modifyAddress",
"style": {
@ -38,13 +45,6 @@
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //
}
}, {
"path": "pages/ProjectDetails/ProjectDetails",
"style": {
"navigationBarTitleText": "护理项目详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //
}
}, {
"path": "pages/goodsorderRate/goodsorderRate",
"style": {
@ -276,7 +276,7 @@
{
"path": "pages/site/site",
"style": {
"navigationBarTitleText": "附近护理站",
"navigationBarTitleText": "护理站",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff", //
"onReachBottomDistance": 40, // px

View File

@ -1,6 +1,6 @@
.app {
height: 100%;
padding: 2% 2% 150rpx 2%;
padding: 0 0 0 0;
padding-top: 10rpx;
font-size: 34rpx;
position: relative;
@ -49,11 +49,23 @@
}
}
}
.bottomcontent{
position: fixed;
width: 100%;
height: 100rpx;
bottom: 0;
background-color: #FFFFFF;
.appoinprice{
padding-left: 20rpx;
font-size: 48rpx;
color: #F44B2F;
line-height: 70rpx;
}
.appointment {
width: 120rpx;
width: 200rpx;
height: 70rpx;
background: #4C7BC9;
border-radius: 26rpx;
background: #F44B2F;
border-radius: 30rpx;
color: #ffffff;
text-align: center;
line-height: 70rpx;
@ -61,89 +73,45 @@
bottom:20rpx;
right:5%;
}
}
.detailtitle {
position: relative;
width: 94%;
width: 100%;
height: 100%;
margin: 0 auto;
background: #FFFFFF;
border-radius: 20rpx;
margin-top: 3%;
font-size: 31rpx;
padding: 3%;
padding-bottom: 50rpx;
padding-bottom: 150rpx;
.textInfo {
word-break:break-all;
font-size: 29rpx;
text-indent: 2rem;
line-height: 42rpx;
color: #666666;
padding-top: 30rpx;
/deep/ .richPic {
width: 100% !important;
height: 100% !important;
}
}
.Introduction {
font-size: 31rpx;
color: #333333;
line-height: 12rpx;
margin-left: -3%;
padding: 3%;
padding: 3% 3% 3% 0;
font-size: 32rpx;
}
}
.item {
width: 95%;
height: 100%;
margin: 0 auto;
width: 100%;
height: 200rpx;
background: #FFFFFF;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin: 20rpx auto 0;
padding: 3% 3% 40rpx 3%;
line-height: 60rpx;
position: relative;
image {
width: 170rpx;
height: 170rpx;
margin-left: 3%;
}
.servicetime {
color: #999999;
line-height: 37rpx;
font-size: 30rpx;
position: absolute;
top: 35%;
left: 35%;
}
.price {
color: red;
font-size: 32rpx;
position: absolute;
top: 65%;
left: 35%;
}
.product {
color: #000000;
width: 60%;
position: absolute;
top: 14%;
left: 32%;
font-size: 28rpx;
}
.huanyao {
color: #000000;
position: absolute;
top: 10%;
left: 35%;
width: 60%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.text{
padding: 40rpx 20% 0 40rpx;
width: 100%;
height: 81rpx;
font-size: 38rpx;
font-weight: 500;
}
}

View File

@ -1,30 +1,36 @@
<template>
<view class="app">
<u-swiper v-if="lbinfo" :list="lbinfo" height="350" style='background-size: 100%;' mode='none'></u-swiper>
<view class="item">
<image :src="list.itemPictureUrl"></image>
<view class="huanyao" v-if='list.nurseItemName'>{{list.nurseItemName}}
<view class="text" v-if='list.nurseItemName'>{{list.nurseItemName}}
</view>
<view class="huanyao" v-else>暂无
<view class="text" v-else>暂无
</view>
<view class="classtype">
</view>
<!-- <view class="pingfen">
<u-rate :count="5" value="2"></u-rate>
</view> -->
<view class="servicetime">服务时长:{{list.serveDurationUnit?list.serveDurationUnit:'0'}}</view>
<view class="price">{{list.nurseItemPrice==null?'0':list.nurseItemPrice}}</view>
</view>
<view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情:
<!-- <view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情:
<span>{{list.consumableTotalPrice==null?'0':list.consumableTotalPrice}}</span>
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
·{{item.consumableDetail}}
<span>{{item.consumableCount}}{{item.consumableUnit}}/{{item.consumablePrice}}</span>
</view>
</view>
</view> -->
<view class="detailtitle">
<view class="Introduction">服务详情:</view>
<view class="textInfo" v-html="list.nurseItemContent">
<view class="textInfo" v-if="list.nurseItemContent" v-html="list.nurseItemContent">
</view>
</view>
<view class="appointment" @tap.stop='goappointments(item)'>预约</view>
<view class="bottomcontent">
<view class="appoinprice" v-if="list.totalPrice">
{{list.totalPrice}}
</view>
<view class="appointment" @tap.stop='goappointments(item)'>立即预约</view>
</view>
<u-toast ref="uToast" />
<u-mask :show="usershow" class='mask'>
<view class="information">
@ -53,11 +59,11 @@
export default {
data() {
return {
lbinfo: [], //
baseurl: '',
list: {},
orderNo: '',
usershow: false, //
list: [], //list
list: {}, //list
timer: null,
stationId: null,
stationItemId: null,
@ -87,7 +93,7 @@
if (res.data.loginFlag) {
that.usershow = false
uni.navigateTo({
url: `/pages/appointmenttime/appointmenttime?stationId=${this.list.stationId}&stationItemId=${this.list.stationItemId}&stationItemPriceId=${this.list.stationItemPriceId}`,
url: `/pages/appointmenttime/appointmenttime?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`,
})
} else {
that.usershow = true
@ -143,6 +149,15 @@
res.data.nurseItemContent = res.data.nurseItemContent.replace(/\<img/gi,
"<br/> <img class='richPic'")
}
if (res.data.poserInfoList) {
res.data.poserInfoList.forEach(e => {
e.posterPictureUrl = baseurl + e.posterPictureUrl
var obj = {
image: e.posterPictureUrl
}
this.lbinfo.push(obj)
})
}
res.data.itemPictureUrl = baseurl + res.data.itemPictureUrl
this.list = res.data
})

View File

@ -49,7 +49,7 @@
.concent {
width: 701rpx;
height: 850rpx;
height: 900rpx;
background: #4C7BC9;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
@ -80,7 +80,7 @@
.detailed {
width: 657rpx;
padding: 0 42rpx;
padding: 0 20rpx;
line-height: 56rpx;
}

View File

@ -42,32 +42,12 @@
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="list">
<view class="item">
<view class="item" v-for="(item,index) in informationCategoryVOList" :key="index">
<view class="text">
医疗资讯医疗资讯医疗 资讯医疗资讯
{{item.informationTitle}}
</view>
<view class="author">
信赖保障
</view>
<image src="../../static/kefu.png" mode=""></image>
</view>
<view class="item">
<view class="text">
医疗资讯医疗资讯医疗 资讯医疗资讯
</view>
<view class="author">
信赖保障
</view>
<image src="../../static/kefu.png" mode=""></image>
</view>
<view class="item">
<view class="text">
医疗资讯医疗资讯医疗资讯医疗资讯
</view>
<view class="author">
信赖保障
</view>
<image src="../../static/kefu.png" mode=""></image>
<view class="author"></view>
<image :src="item.leadThumbnailUrl" mode=""></image>
</view>
</view>
</view>
@ -76,18 +56,34 @@
</template>
<script>
import {
informationCategoryList
} from '@/api/homepage/index.js'
import baseurl from '../../api/baseurl';
export default {
data() {
return {
swiperImgUrls: [
'../../static/zixun.png',
'../../static/zixun.png',
'../../static/zixun.png',
],
swiperImgUrls: [],
currentIndex: 0,
informationCategoryVOList: [], //
};
},
onLoad() {
this.informationCategoryinfo()
},
methods: {
informationCategoryinfo() {
informationCategoryList().then(res => {
res.data.informationCategoryVOList.forEach(e => {
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
})
this.informationCategoryVOList = res.data.informationCategoryVOList
res.data.poserInfoList.forEach(e => {
e.posterPictureUrl = baseurl + e.posterPictureUrl
this.swiperImgUrls.push(e.posterPictureUrl)
})
})
},
swiperChange(event) {
this.currentIndex = event.detail.current
},
@ -142,6 +138,7 @@
top: 40rpx;
height: 46rpx;
width: 30%;
.title {
position: absolute;
right: 30rpx;

View File

@ -50,9 +50,14 @@
.content {
font-size: 36rpx;
padding-bottom: 10rpx;
margin-top: -80rpx;
z-index: 999;
::v-deep .u-tabs{
background-color: #F4F5F7 !important;
padding-bottom: 10rpx;
}
.tive {
width: 94%;
background-color: #ffffff;
margin: 20rpx auto;
border-radius: 11rpx;
padding-bottom: 60rpx;
@ -74,30 +79,35 @@
width: 100%;
height: 100%;
position: relative;
padding: 30rpx 30rpx;
background-color: #fff;
padding: 30rpx 0;
margin: 10rpx auto;
border-radius: 20rpx;
color: #000000;
image {
width: 170rpx;
height: 170rpx;
margin-left: 3%;
}
.servicetime {
color: #999999;
line-height: 37rpx;
font-size: 30rpx;
position: absolute;
top:35%;
left:35%;
}
// .servicetime {
// color: #999999;
// line-height: 37rpx;
// font-size: 30rpx;
// position: absolute;
// top:35%;
// left:35%;
// }
.appointment {
font-size: 30rpx;
width: 120rpx;
height: 70rpx;
background: #4C7BC9;
height: 52rpx;
border-radius: 26rpx;
color: #ffffff;
background: #F44B2F;
text-align: center;
line-height: 70rpx;
line-height: 52rpx;
position: absolute;
top:40%;
top:55%;
right:5%;
}
.buy{
@ -105,25 +115,26 @@
top: 55%;
}
.price {
color: red;
font-size: 32rpx;
height: 52rpx;
color: #F44B2F;
line-height: 52rpx;
font-size: 36rpx;
position: absolute;
top:65%;
top:55%;
left:35%;
}
.product {
color: #000000;
width: 60%;
position: absolute;
top:14%;
left:32%;
font-size: 28rpx;
overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
top:15%;
left:35%;
width: 60%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.huanyao {
color: #000000;
position: absolute;
top:10%;
top:15%;
left:35%;
width: 60%;
overflow: hidden;
@ -167,28 +178,18 @@
}
}
}
.Nursestationconfiguration {
width: 94%;
height: 100%;
background: #FFFFFF;
border-radius: 20rpx;
padding-bottom: 30rpx;
margin: 20rpx auto;
.configuration {
font-size: 31rpx;
color: #333333;
padding: 3%;
margin:0 30rpx;
padding-bottom: 30rpx;
border-bottom: 1rpx solid #CDC9C9;
.text {
margin-top: 10rpx;
background: #F8D7D1;
border-radius: 15rpx;
display: inline-block;
padding: 10rpx 20rpx;
margin-right: 18rpx;
line-height: 40rpx;
background-color: #f6f6f6;
border-radius: 34rpx;
font-size: 24rpx;
color: #666666;
}
margin-right: 10rpx;
font-size: 18rpx;
color: #F44B2F;
}
}
.detail {
@ -229,17 +230,29 @@
border-radius: 20rpx;
margin: 10px auto;
padding-bottom: 20rpx;
.picture {
position: absolute;
width: 170rpx;
height: 170rpx;
margin-left: 5%;
margin-top: 5%;
.time{
font-size: 27rpx;
margin: 10rpx 0;
color: #666666;
.timeday{
display: inline-block;
}
.text{
margin:0 10rpx 0 30rpx;
display: inline-block;
}
.texttime{
margin:0 20rpx 0 30rpx;
view{
display: inline-block;
margin-right: 20rpx;
}
}
}
.title {
margin-left: 35%;
line-height: 49px;
font-size: 33rpx;
padding-top: 40rpx;
margin:0 0 0 30rpx;
line-height: 59rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@ -290,14 +303,31 @@
}
}
.address {
font-size: 25rpx;
margin-left: 35%;
color: #999999;
line-height: 37rpx;
font-size: 27rpx;
color: #666666;
margin:40rpx 0 10rpx 30rpx;
word-break:break-all;
line-height: 40rpx;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
position: relative;
.distance{
position: absolute;
right:30rpx;
top:50%;
transform: translateY(-50%);
}
.text{
padding-left: 40rpx;
}
image{
position: absolute;
top:50%;
transform: translateY(-50%);
width: 28rpx;
height: 35rpx;
}
}
}
}

View File

@ -1,50 +1,65 @@
<template>
<view class="app">
<u-swiper v-if="lbinfo" :list="lbinfo" height="400" style='background-size: 100%;' mode='none'></u-swiper>
<view class="content">
<view class="righttext">
<image class="picture" :src="list.stationIntroducePcitureUrl"></image>
<view class="title" v-if="list.nurseStationName">
{{list.nurseStationName}}
</view>
<view class="title" v-else>
暂无
</view>
<view class="address" v-if="list.address">{{list.address}} </view>
<view class="address" v-else>
暂无
<view class="time">
<view class="text">
{{list.businessStatus}}
</view>
<view class="call">
<view class="callme" @tap="gophone()">
<u-icon class='icon' name="phone-fill" color="#ffffff" size="30"></u-icon>
<view class="text">联系我们</view>
<view class="timeday">
{{list.openingHoursDescribe}}
</view>
<!-- <view class="Navigation">
<image src="/static/daohang.png" mode="">导航</image>
</view> -->
<view class="texttime">
<view class="">
上午{{list.morningOpenStartTime}}-{{list.morningOpenEndTime}}
</view>
<view class="">
下午{{list.afternoonOpenStartTime}}-{{list.afternoonOpenEndTime}}
</view>
</view>
<view class="detail">
<view class="Introduction">机构简介</view>
<view class="textInfo" v-html="list.agencyIntroduce">
</view>
</view>
<view class="Nursestationconfiguration">
<view class="configuration">
护理站配置
<view class="" style="margin-top: 30rpx;">
<view class="text" v-for="(item,index) in nurseStationLabelList" :key="index">
{{item.labelDescription}}
</view>
</view>
<view class="address" v-if="list.address">
<image src="../../static/locatinsmall.png" mode=""></image>
<view class="text">
{{list.address}}
</view>
<view class="distance">
{{distance}}KM
</view>
</view>
<view class="address" v-else>
暂无
</view>
<view class="address" v-if="list.dutyPhone" style="margin: 20rpx 0 0 33rpx;" @tap='gophone'>
<image src="../../static/phone.png" mode=""></image>
<view class="text">
{{list.dutyPhone}}
</view>
</view>
<view class="address" v-else style="margin: 0 0 0 30rpx;">
暂无
</view>
</view>
<view class="tive">
<view class="tab-box">
<!-- <view class="tab-box">
<view class="tab-item" @tap="testTabClick(index)" v-for="(item,index) in tabList" :key="index"
:class="tabIndex == index?'active':''">
{{item.name}}
</view>
{{item.classifyName}}
</view>
</view> -->
<u-tabs :list="tabList" :current="classifycurrent" @change="change"></u-tabs>
<view class="" v-if="servelist.length>0&&choicetab==false">
<view class="item" v-for="item in servelist" :key="" v-show='choicetab==false'
@click.stop='goProjectDetails(item)'>
@ -54,7 +69,7 @@
<!-- <view class="pingfen">
<u-rate :count="5" value="2"></u-rate>
</view> -->
<view class="servicetime">服务时长:{{item.serveDurationUnit?item.serveDurationUnit:'0'}}</view>
<!-- <view class="servicetime">服务时长:{{item.serveDurationUnit?item.serveDurationUnit:'0'}}</view> -->
<view class="appointment" @tap.stop='goappointments(item)'>预约</view>
<view class="price">{{item.nurseItemPrice==null?'0':item.nurseItemPrice}}</view>
</view>
@ -69,9 +84,11 @@
<view class="item" v-show='choicetab' v-for="(item,index) in productlist" :key="index">
<image :src="item.goodsPictureUrl"></image>
<view class="product">{{item.goodsName}}</view>
<view class="product" style="top:38%;font-size: 24rpx;color: #999999;">{{item.attributeDetailsName}}</view>
<!-- <view class="product" style="top:38%;font-size: 24rpx;color: #999999;">
{{item.attributeDetailsName}}
</view> -->
<view class="buy appointment" @tap="goCommodityDetails(item)">购买</view>
<view class="price" style="left:32%">{{item.goodsPrice==null?'0':item.goodsPrice}}</view>
<view class="price">{{item.goodsPrice==null?'0':item.goodsPrice}}</view>
</view>
</view>
<view class="noorder" v-if="productlist.length==0&&choicetab">
@ -113,6 +130,7 @@
export default {
data() {
return {
lbinfo: [], //list
usershow: false, //
choicetab: false, //
list: [], //list
@ -126,13 +144,14 @@
nurseStationId: '',
pageNum: 1,
pageSize: 10,
tabIndex: 0,
timer: null,
tabList: [{
name: "服务项目"
}, {
name: "产品"
}, ]
name: '全部',
id: ''
}], //
classifycurrent: 0, //
distance: null, //
nurseClassifyInfoId: '', //id
}
},
onShow() {
@ -141,8 +160,20 @@
},
onLoad(options) {
this.nurseStationId = options.nurseStationId
this.distance = options.distance
},
methods: {
//
change(index) {
this.classifycurrent = index;
this.nurseClassifyInfoId = this.tabList[index].id
this.serveinfo()
if (this.tabList[index].name == '产品') {
this.choicetab = true
} else {
this.choicetab = false
}
},
goappointments(item) {
let that = this
try {
@ -199,12 +230,31 @@
if (res.code == 200) {
this.serveinfo()
this.productinfo()
res.data.morningOpenStartTime = res.data.morningOpenStartTime.slice(0, 5)
res.data.morningOpenEndTime = res.data.morningOpenEndTime.slice(0, 5)
res.data.afternoonOpenStartTime = res.data.afternoonOpenStartTime.slice(0, 5)
res.data.afternoonOpenEndTime = res.data.afternoonOpenEndTime.slice(0, 5)
res.data.stationIntroducePcitureUrl = baseurl + res.data.stationIntroducePcitureUrl
if (res.data.agencyIntroduce) {
res.data.agencyIntroduce = res.data.agencyIntroduce.replace(/\<img/gi,
"<br/><img class='richPic'")
}
res.data.nurseClassifyInfoList.forEach(e => {
e.name = e.classifyName
this.tabList.push(e)
})
var obj = {
name: '产品'
}
this.tabList.push(obj)
this.list = res.data
res.data.poserInfoList.forEach(e => {
e.posterPictureUrl = baseurl + e.posterPictureUrl
var obj = {
image: e.posterPictureUrl
}
this.lbinfo.push(obj)
})
if (res.data.nurseStationLabelList) {
this.nurseStationLabelList = res.data.nurseStationLabelList
}
@ -213,7 +263,7 @@
},
serveinfo() {
this.pageNum = 1
itemList(this.nurseStationId, this.pageSize, this.pageNum).then(res => {
itemList(this.nurseStationId, this.pageSize, this.pageNum, this.nurseClassifyInfoId).then(res => {
uni.removeStorageSync('Refresh');
res.rows.forEach(e => {
e.itemPictureUrl = baseurl + e.itemPictureUrl
@ -233,10 +283,6 @@
this.producttotal = res.total
})
},
testTabClick(index) {
this.tabIndex = index
this.choicetab = this.tabIndex
},
//
goCommodityDetails(item) {
uni.navigateTo({
@ -280,8 +326,8 @@
});
}
},
onReachBottom() { //
if (this.choicetab == 0) {
onReachBottom() { //
if (!this.choicetab) {
if (this.servelist.length >= this.servetotal) {} else {
this.pageNum++
itemList(this.nurseStationId, this.pageSize, this.pageNum).then(res => {
@ -305,7 +351,7 @@
},
onPullDownRefresh() { //
this.pageNum = 1;
if (this.choicetab == 0) {
if (!this.choicetab) {
itemList(this.nurseStationId, this.pageSize, this.pageNum).then(res => {
res.rows.forEach(e => {
e.itemPictureUrl = baseurl + e.itemPictureUrl

View File

@ -1,46 +1,174 @@
//护理站列表
.app{
padding: 0 0 5rpx 0;
padding: 0;
background-color: #fff;
}
::v-deep .u-tabs{
background-color: #F4F5F7 !important;
padding-bottom: 20rpx;
}
.swiper-block {
height: 200rpx;
width: 94%;
padding: 30rpx 3% 10rpx;
background-color: #F4F5F7;
}
.swiper-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
}
.slide-image {
height: 200rpx;
width: 100%;
margin: 0 auto;
border-radius: 20rpx;
}
.Classificationlist{
margin: 30rpx 0 0;
width: 100%;
height: 380rpx;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
text-align: center;
.itemclass{
color: #4C7BC9;
width: 25%;
height: 190rpx;
image{
display: block;
margin: 0 auto;
width: 100rpx;
height: 100rpx;
}
.title{
padding: 0 10rpx;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 30rpx;
font-weight: 600;
line-height: 70rpx;
}
}
.item{
width: 25%;
height: 190rpx;
image{
display: block;
margin: 0 auto;
width: 100rpx;
height: 100rpx;
}
.title{
padding: 0 10rpx;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 30rpx;
font-weight: 500;
line-height: 70rpx;
}
}
}
.inputs {
border: 1px solid #f0f0f0;
width: 90%;
height: 65rpx;
margin: 0 0 10rpx 50%;
transform: translateX(-50%);
border-radius: 20rpx;
background-color: #F4F5F7;
z-index: 999;
.input {
margin: 0 auto;
position: absolute;
height: 65rpx;
// top: 8%;
left: 10%;
width: 90%;
font-size: 26rpx;
color: #000000;
}
.icon {
background: url(@/static/sousuo.png) no-repeat;
width: 30rpx;
height: 28rpx;
background-size: cover;
position: absolute;
top: 30%;
left: 3%;
}
}
.conNew {
width: 96%;
// z-index: 999;
// position: fixed;
// top: 450rpx;
margin: 0 auto;
// left: 2%;
height: 100%;
.addressContent {
background-color: #F4F5F7;
width: 100%;
padding: 30rpx 0 50rpx;
margin: 0 auto;
height: 100%;
.title{
font-size: 32rpx;
font-weight: bold;
padding-left: 2%;
}
.addressContent {
width: 96%;
background-color: #ffffff;
margin: 0 auto;
}
.lists {
background-color: #ffffff;
width: 100%;
height: 240rpx;
height: 300rpx;
margin-bottom: 14rpx;
border-radius: 20rpx;
position: relative;
.nurse {
font-size: 28rpx;
background-color: #ffffff;
.tags{
display: flex;
position: absolute;
top: 15%;
top: 55%;
left: 35%;
text-overflow: -o-ellipsis-lastline;
width: 65%;
flex-wrap: wrap;
.tag{
background: #F8D7D1;
opacity: 0.8;
margin: 0 10rpx 10rpx 0;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
white-space: nowrap;
padding: 0 10rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
border-radius: 10rpx;
font-size: 22rpx;
color: #F44B2F;
}
}
.nurse {
font-size: 32rpx;
position: absolute;
top: 12%;
left: 35%;
width: 63%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.distance {
position: absolute;
bottom: 20%;
font-size: 24rpx;
top: 32%;
left:35%;
font-size: 27rpx;
color: #666666;
}
@ -74,20 +202,6 @@
display: block;
margin: 10% auto;
}
.understand {
font-size: 28rpx;
color: #ffffff;
width: 160rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
background-color: #4C7BC9;
position: absolute;
bottom: 10%;
right: 1%;
border-radius: 35rpx;
}
}
}

View File

@ -1,10 +1,36 @@
<template>
<view class="app">
<view class="map" style="height:35vh;">
<map style="width:100%; height:100%" scale="17" :latitude="latitude" :longitude="longitude"
:markers="markers"></map>
<view class="inputs">
<i class="icon"></i>
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="请输入">
</view>
<view class="Classificationlist">
<view v-for="(item,index) in nurseItemClassifyInfoList" :key="index" @tap='tapitemclass(item)'
:class="item.id == itemClassId?'itemclass':'item'">
<image :src="item.classifyPictureUrl" mode=""></image>
<view class="title">
{{item.classifyName}}
</view>
</view>
<view class="item" v-if='nurseItemClassifyInfoList.length>8'>
<image src="../../static/gd.png" mode=""></image>
<view class="title">
更多
</view>
</view>
</view>
<swiper class="swiper-block" :indicator-dots="true" :autoplay="true" :interval="5000" :duration="3000"
circular='true' current='0'>
<swiper-item class="swiper-item" v-for="(item,index) in lbinfo">
<image :src="item.image" class="slide-image">
</image>
</swiper-item>
</swiper>
<view class="conNew">
<view class="title">
周边医养机构
</view>
<u-tabs :list="nurseAgencyClassifyInfoList" :current="conNewcurrent" @change="change"></u-tabs>
<view class="addressContent" v-for="(item,index) in nursestationlist" :key="index">
<view class="lists" @tap='godetails(item)'>
<view class="nurse">{{item.nurseStationName}}</view>
@ -12,8 +38,10 @@
v-show="homeLatitudeLongitude.homeLatitude&&homeLatitudeLongitude.homeLongitude">
距离您{{item.distance}}KM</view>
<image class="background" :src="item.stationPictureUrl" mode=""></image>
<view class="understand">
点击了解
<view class="tags">
<view class="tag" v-for="uitem in item.nurseStationClassifyList">
{{uitem.classifyName}}
</view>
</view>
</view>
</view>
@ -37,26 +65,70 @@
<script>
import {
nearbyList,
getPatientInfo
getPatientInfo,
getNurseClassifyList
} from '@/api/site/site.js';
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
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
nursestationlist: [],
mask: false,
pageNum: 1,
pageSize: 10,
total: 0,
//map
id: 0, // 使 marker id
latitude: 39.90374,
longitude: 116.397827,
markers: [],
homeLatitudeLongitude: null,
nurseClassId: '', //id
itemClassId: '', //id
}
},
methods: {
//
tapitemclass(item) {
if (this.itemClassId == item.id) {
this.itemClassId = ''
} else {
this.itemClassId = item.id
}
this.requestinfo()
},
//
getNurseClassifyinfo() {
getNurseClassifyList().then(res => {
this.nurseAgencyClassifyInfoList.push({
name: '全部',
id: '',
})
res.data.nurseAgencyClassifyInfoList.forEach(e => {
e.name = e.classifyName
this.nurseAgencyClassifyInfoList.push(e)
})
res.data.nurseItemClassifyInfoList.forEach(e => {
e.classifyPictureUrl = baseurl + e.classifyPictureUrl
})
this.nurseItemClassifyInfoList = res.data.nurseItemClassifyInfoList.slice(0, 7)
})
},
change(index) {
this.conNewcurrent = index;
this.nurseClassId = this.nurseAgencyClassifyInfoList[index].id
this.requestinfo()
},
getlocation(value) {
var that = this
uni.openSetting({
@ -67,14 +139,6 @@
// success: function(res) {
// that.latitude = res.latitude
// that.longitude = res.longitude
// that.markers.push({
// id: 3,
// latitude: res.Latitude,
// longitude: res.Longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.mask = false
// }
// });
@ -84,11 +148,13 @@
},
requestinfo() {
this.pageNum = 1;
nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseTypeCode).then(res => {
nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseClassId, this.itemClassId)
.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
@ -98,7 +164,7 @@
},
godetails(item) {
uni.navigateTo({
url: `/pages/nursestation/nursestation?nurseStationId=${item.nurseStationId}`
url: `/pages/nursestation/nursestation?nurseStationId=${item.nurseStationId}&distance=${item.distance}`
})
},
cancel() {
@ -108,13 +174,14 @@
})
},
},
onReachBottom() {
onReachBottom() { //
if (this.nursestationlist.length >= this.total) {} else {
this.pageNum++;
nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseTypeCode, this.iptVal)
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)
})
})
@ -122,13 +189,7 @@
},
onPullDownRefresh() { //
this.pageNum = 1;
nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseTypeCode, this.iptVal)
.then(res => {
res.rows.forEach(e => {
e.stationPictureUrl = baseurl + e.stationPictureUrl
})
this.nursestationlist = res.rows
})
this.requestinfo()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
@ -139,6 +200,8 @@
},
},
onShow() {
this.nurseClassId = ''
this.itemClassId = ''
var that = this
const value = uni.getStorageSync('patientId');
if (value) {
@ -148,32 +211,14 @@
if (res.data.homeLatitude && res.data.homeLongitude) {
that.latitude = res.data.homeLatitude
that.longitude = res.data.homeLongitude
that.markers.push({
id: 3,
latitude: res.data.homeLatitude,
longitude: res.data.homeLongitude,
width: 20,
height: 25,
iconPath: "../../static/locatinsmall.png"
})
that.requestinfo();
} else {
that.latitude = that.latitude
that.longitude = that.longitude
that.requestinfo();
// uni.getLocation({
// type: 'wgs84',
// success: function(resp) {
// that.latitude = resp.latitude
// that.longitude = resp.longitude
// that.markers.push({
// id: 3,
// latitude: resp.latitude,
// longitude: resp.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.requestinfo();
// },
// fail(err) {
@ -181,51 +226,17 @@
// }
// });
}
} else if (res.code == 9999) {
} else {
that.latitude = that.latitude
that.longitude = that.longitude
} else if (res.code == 9999) {} else {
that.requestinfo();
// that.markers.push({
// uni.getLocation({
// type: 'wgs84',
// success: function(resh) {
// that.latitude = resh.latitude
// that.longitude = resh.longitude
// that.markers.push({
// id: 3,
// latitude: resh.latitude,
// longitude: resh.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.requestinfo();
// },
// fail(err) {
// that.mask = true;
// }
// });
}
})
} else {
that.latitude = that.latitude
that.longitude = that.longitude
that.requestinfo();
// uni.getLocation({
// type: 'wgs84',
// success: function(res) {
// that.latitude = res.latitude
// that.longitude = res.longitude
// that.markers.push({
// id: 3,
// latitude: res.latitude,
// longitude: res.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.requestinfo();
// },
// fail(err) {
@ -234,7 +245,9 @@
// });
}
},
onLoad() {},
onLoad() {
this.getNurseClassifyinfo();
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();

BIN
static/gd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 990 B

BIN
static/phone.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB