xinelu-applet-ui/pagesB/myfamilydoctorteam/myfamilydoctorteam.vue
2023-10-12 15:54:10 +08:00

177 lines
3.3 KiB
Vue

<template>
<view class="app">
<view class="teamname">
<image src="../../static/pagesB/myfamilydoctorteam.png" mode=""></image>
<view class="name">
{{list?list[0].teamName:''}}
</view>
</view>
<view class="list">
<view class="item" v-for='item in list'>
<image src="../../static/docHead.png" mode=""></image>
<view class="name">
{{item.realname?item.realname:''}}
</view>
<view class="phone">
{{item.mobilePhone?item.mobilePhone:''}}
</view>
<view class="title">
{{item.teamMemberTypeName?item.teamMemberTypeName:''}}
</view>
<view class="zixunbtn" @tap='goseekadvicefrom'>
咨询
</view>
</view>
</view>
</view>
</template>
<script>
import {
getDoctorList
} from '@/api/pagesB/myfamilydoctorteam/index.js'
export default {
data() {
return {
pageNum: 1,
pageSize: 10,
teamNo: null,
list: null,
total: 0,
};
},
onLoad(options) {
this.teamNo = options.teamNo
this.info()
},
methods: {
info() {
getDoctorList(this.pageNum, this.pageSize, this.teamNo, '1').then(res => {
this.list = res.rows
this.total = res.total
})
},
//咨询
goseekadvicefrom() {
uni.navigateTo({
url: `/pagesB/imagetextConsultation/imagetextConsultation`
})
},
},
onReachBottom() { //上滑加载
if (this.list.length >= this.total) {} else {
this.pageNum++;
getDoctorList(this.pageNum, this.pageSize, this.teamNo, '1').then(res => {
res.rows.forEach(e => {
this.list.push(e)
})
this.total = res.total
})
}
},
onPullDownRefresh() { //下拉刷新
this.pageNum = 1;
this.info()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
.app {
width: 96%;
margin: 20rpx auto;
background-color: #fff;
.list {
width: 100%;
.item {
width: 96%;
margin: 0 auto;
padding-bottom: 60rpx;
border-bottom: 2rpx solid #E6E6E6;
position: relative;
height: 300rpx;
.zixunbtn {
width: 169rpx;
height: 61rpx;
background: #26A888;
border-radius: 5rpx;
font-size: 28rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 61rpx;
text-align: center;
position: absolute;
top: 65%;
right: 10rpx;
}
.title {
position: absolute;
top: 70%;
left: 210rpx;
font-size: 18rpx;
font-weight: 500;
color: #FFA733;
line-height: 30rpx;
height: 30rpx;
background: #FFFFFF;
border: 1px solid #FFA115;
border-radius: 5rpx;
text-align: center;
padding: 0 15rpx;
}
.phone {
position: absolute;
top: 38%;
left: 210rpx;
font-size: 28rpx;
font-weight: 400;
color: #959595;
}
.name {
position: absolute;
font-size: 28rpx;
font-weight: 500;
color: #333333;
top: 20%;
left: 210rpx;
}
image {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 5rpx;
width: 180rpx;
height: 180rpx;
}
}
}
.teamname {
padding: 20rpx 0 0 30rpx;
display: flex;
align-items: flex-end;
image {
width: 40rpx;
height: 36rpx;
}
.name {
padding-left: 15rpx;
font-size: 28rpx;
font-weight: 500;
color: #000000;
}
}
}
</style>