<template>
	<view class="content">
		<view class="imgs">
			<view class="img" v-for="(img,index) in imgs">
				<image @click="showImg(index)"  :src="img"></image>
			</view>
		</view>
	</view>
</template>
<script>
	import {getDoctorDetails} from '@/api/doctor.js'
	export default {
		data() {
			return {
				imgs:[]
			}
		},
		onLoad(options) {
			this.doctorId=options.doctorId;
			
		},
		onShow() {
			this.getDoctorDetails();
			 
		},
		methods: {
			showImg(index){
				uni.previewImage({
					current:index,
					urls: this.imgs
				});
			},
			getDoctorDetails() {
				//联网加载数据
				var that = this;
				var data = {
					doctorId: this.doctorId
				};
				this.imgs=[];
				getDoctorDetails(data).then(res => {
					if(res.code==200){
						this.doctor=res.data.doctor;
						if(this.doctor.certificateImages!=null){
							this.imgs.concat(this.doctor.certificateImages)
						}
						if(this.doctor.practiseImages!=null){
							this.imgs.concat(this.doctor.practiseImages)
						}
						console.log(this.imgs)
					}else{
						uni.showToast({
							icon:'none',
							title: "请求失败",
						});
					}
				});
			},
		}
	}
</script>
<style scoped lang="scss">
	.content{
		height: 100%;
		position: relative;
		.imgs{
			padding: 15rpx;
			width: 100%;
			image{
				width: 100%;
				margin-bottom: 15rpx;
				
			}
			
		}
		.cont{
			top:50rpx;
			position: relative;
			padding: 0rpx 20rpx;
			z-index: 999;
			width: 100%;
			display: flex;
			flex-direction: column;
			.doc-box{
				margin-bottom: 20rpx;
				padding: 30rpx;
				box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
				background-color: #fff;
				border-radius: 15rpx;
				display: flex;
				align-items: center;
				justify-content: flex-start;
				.left{
					width: 190upx;
					height: 190upx;
					border-radius: 8upx;
					image{
						width: 190upx;
						height: 190upx;
					}
				}
				.right{
					display: flex;
					flex-direction: column;
					justify-content: flex-start;
					margin-left: 20rpx;
					height:190upx;
					width: calc(100% - 210upx);
					.doc-name-box{
						display: flex;
						align-items: center;
						justify-content: flex-start;
						position: relative;
						.doc-name{
							font-size: 38rpx;
							font-weight: bold;
						}
						.doc-ping{
							margin-left: 10rpx;
						}
						.doc-star{
							position: absolute;
							top:5rpx;
							right:0rpx;
							width:32rpx;
							height:32rpx;
							image{
								width:100%;
								height:100%;
							}
						}
					}
					.doc-dept-box{
						display: flex;
						align-items: center;
						justify-content: flex-start;
						margin-top: 15rpx;
						font-size: 28upx;
						font-family: PingFang SC;
						color: #2d2b36;
						 
					}
					.doc-his-box{
						display: flex;
						align-items: center;
						justify-content: flex-start;
						margin-top: 15rpx;
						font-size: 28upx;
						font-family: PingFang SC;
						color: #9a9a9c;
						 
					}
					.doc-spec-box{
						width: 100%;
						display: flex;
						align-items: center;
						justify-content: space-between;
						margin-top: 15rpx;
						.spec-left{
							width: 80%;
							display: flex;
							align-items: center;
							justify-content: flex-start;
							.title{
								font-size: 28upx;
								font-family: PingFang SC;
								color: #9a9a9c;
							}
							.spec{
								// margin-left: 10rpx;
								font-size: 28upx;
								font-family: PingFang SC;
								color: #9a9a9c;
							}
						}
						.spec-right{
							.btn{
								font-size: 28upx;
								font-family: PingFang SC;
								color: #2583EB;
							}
						}
						
					}
				}
				
			}
			.price-box{
				margin-bottom: 20rpx;
				padding: 15rpx;
				box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
				background-color: #fff;
				border-radius: 15rpx;
				.title-box{
					display: flex;
					flex-direction: row;
					align-items: center;
					justify-content: flex-start;
					.title{
						font-size: 32upx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #111111;
					}
					.line{
						margin-right: 15rpx;
						height: 30rpx;
						width: 6rpx;
						background-color: #2583EB;
						
					}
					 
				}
				.price-list{
					display: flex;
					flex-direction: column;
					align-items: flex-start;
					justify-content: flex-start;
					margin-top: 15rpx;
					padding: 15rpx;
					.price-item{
						margin-bottom: 15rpx;
						padding: 15rpx;
						width: 100%;
						display: flex;
						align-items: center;
						justify-content: space-between;
						border-radius: 15rpx;
						background-color: #f1f6fc;
						.left{
							.price-name{
								font-size: 32upx;
								font-family: PingFang SC;
								color: #111111;
								display: flex;
								align-items: center;
								justify-content: flex-start;
								.price{
									margin-left: 15rpx;
									font-size: 32upx;
									font-family: PingFang SC;
									color: #fe9460;
									
								}
							}
							.price-desc{
								margin-top: 20rpx;
								font-size: 28upx;
								font-family: PingFang SC;
								color: #9a9a9c;
							}
							
						}
						.right{
							.btn{
								padding: 15rpx 30rpx;
								background-color: #ff9561;
								color: #fff;
								font-size: 28rpx;
								border-radius: 15rpx;
							}
						}
					}
				}
			}
			.his-box{
				margin-bottom: 20rpx;
				padding: 15rpx;
				box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
				background-color: #fff;
				border-radius: 15rpx;
				.title-box{
					display: flex;
					flex-direction: row;
					align-items: center;
					justify-content: flex-start;
					.title{
						font-size: 32upx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #111111;
					}
					.line{
						margin-right: 15rpx;
						height: 30rpx;
						width: 6rpx;
						background-color: #2583EB;
						
					}
					 
				}
				.his{
					display: flex;
					align-items: center;
					justify-content: space-between;
					margin-top: 15rpx;
					.left{
						display: flex;
						flex-direction: column;
						align-items: flex-start;
						justify-content: center;
						.his-name{
							font-size: 32upx;
							font-family: PingFang SC;
							color: #111111;
						}
						.his-desc{
							margin-top: 15rpx;
							font-size: 28upx;
							font-family: PingFang SC;
							color: #9a9a9c;
						}
					}
					.right{
						image{
							width:30rpx;
							height:30rpx;
						}
					}
				}
			}
			.desc-box{
				margin-bottom: 20rpx;
				padding: 15rpx;
				box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
				background-color: #fff;
				border-radius: 15rpx;
				.title-box{
					display: flex;
					flex-direction: row;
					align-items: center;
					justify-content: flex-start;
					.title{
						font-size: 32upx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #111111;
					}
					.line{
						margin-right: 15rpx;
						height: 30rpx;
						width: 6rpx;
						background-color: #2583EB;
						
					}
					 
				}
				.desc{
					margin-top: 15rpx;
					font-size: 28upx;
					font-family: PingFang SC;
					color: #9a9a9c;
				}
			}
			.ping-box{
				margin-bottom: 20rpx;
				padding: 15rpx;
				box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
				background-color: #fff;
				border-radius: 15rpx;
				.title-box{
					display: flex;
					flex-direction: row;
					align-items: center;
					justify-content: space-between;
					.left{
						display: flex;
						align-items: center;
						justify-content: center;
						.title{
							font-size: 32upx;
							font-family: PingFang SC;
							font-weight: bold;
							color: #111111;
						}
						.line{
							margin-right: 15rpx;
							height: 30rpx;
							width: 6rpx;
							background-color: #2583EB;
							
						}
					}
					.more{
						display: flex;
						align-items: center;
						justify-content: center;
						font-size: 28upx;
						font-family: PingFang SC;
						color: #9a9a9c;
						image{
							margin-left: 10rpx;
							width: 30rpx;
							height:30rpx;
						}
					}
					
					 
				}
				.ping-list{
					display: flex;
					flex-direction: column;
					align-items: flex-start;
					justify-content: flex-start;
					margin-top: 15rpx;
					padding: 15rpx;
					.ping-item{
						padding: 20rpx 0rpx;
						border-bottom: 1rpx solid #efefef;
						width: 100%;
						display: flex;
						align-items: flex-start;
						justify-content: flex-start;
						&:last-child{
							padding-bottom: 0rpx;
							border-bottom: none;
						}
						.left{
							image{
								width:80rpx;
								height:80rpx;
								border-radius: 50%;
							}
						}
						.right{
							width: 100%;
							margin-left: 15rpx;
							.user-name-box{
								display: flex;
								align-items: center;
								justify-content: space-between;
								font-size: 28upx;
								font-family: PingFang SC;
								font-weight: bold;
								color: #111111;
							}
							.ping-cont{
								margin-top: 10rpx;
								font-size: 28upx;
								font-family: PingFang SC;
								color: #9a9a9c;
							}
							.ping-time{
								margin-top: 10rpx;
								font-size: 28upx;
								font-family: PingFang SC;
								color: #9a9a9c;
							}
							 
						}
					}
				}
			}
		}
	}
	 
</style>
