<template>
	<view class="main">
		<view class="content">
			<view class="top">
				<image :src="ip + item.avatar" mode="widthFix" class="avatar" v-if="item.avatar"></image>
				<view class="title">{{ item.name }}</view>
			</view>
			<view class="con">
				<u-divider text="人物介绍"></u-divider>
				<u-parse :content="item.introduce"></u-parse>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			ip: this.http.ip,
			item: {}
		};
	},
	onLoad(e) {
		this.http.request({
			url: '/app/doctor/detail/' + e.id,
			success: (res) => {
				this.item = res.data.data;
				this.item.introduce = res.data.data.introduce.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
			}
		});
	},
	methods: {}
};
</script>

<style lang="scss">
.main {
	padding: 0px 10px 10px 10px;
}
.content {
	padding: 15px;
	background-color: white;
	border-radius: 8px;
	.top {
		text-align: center;
		.avatar {
			width: 55%;
			border-radius: 5px;
		}
		.title {
			font-size: 18px;
			padding-top: 3px;
		}
	}
	.con {
		font-size: 14px;
		line-height: 23px;
		image {
			border-radius: 5px !important;
		}
	}
}
</style>
