<template>
	<view class="app">
		<image src="../../static/pages/wenzhenbanner.png" mode="" class="banner"></image>
		<view class="card">
			<view class="topbar">
				<view class="item" @tap='goimagetextConsultation'>
					<image src="../../static/pagesB/tuwen.png" mode=""></image>
					<view class="text">
						图文问诊
					</view>
				</view>
				<view class="item" @tap='gomedicine'>
					<image src="../../static/pagesB/zhuanjia.png" mode=""></image>
					<view class="text">
						专家问诊
					</view>
				</view>
			</view>
			<view class="title">
				专家信息栏
			</view>
			<u-tabs :list="tabList" :current="tabcurrent" @change="tabchange" active-color='#26A888'
				:show-bar='false'></u-tabs>
			<view class="list">
				<view class="item" @tap="godoctordetails">
					<image src="../../static/messages.png" mode=""></image>
					<view class="name">
						张三
					</view>
					<view class="position">
						主任医师
					</view>
					<view class="text">
						山东大学齐鲁医院，主任医师， 从事甲状腺疾病等内分泌与代 谢病的诊治，擅长甲状腺结节 良恶性鉴。
					</view>
				</view>
				<view class="item" @tap="godoctordetails">
					<image src="../../static/messages.png" mode=""></image>
					<view class="name">
						张三
					</view>
					<view class="position">
						主任医师
					</view>
					<view class="text">
						山东大学齐鲁医院，主任医师， 从事甲状腺疾病等内分泌与代 谢病的诊治，擅长甲状腺结节 良恶性鉴。
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabcurrent: 0,
				tabList: [{
					name: '健康常识'
				}],
			};
		},
		methods: {
			tabchange() {},
			//专家问诊
			gomedicine() {
				uni.navigateTo({
					url: '/pagesB/medicine/medicine'
				})
			},
			//图文问诊
			goimagetextConsultation() {
				uni.navigateTo({
					url: '/pagesB/imagetextConsultation/imagetextConsultation'
				})
			},
			//医生详情
			godoctordetails() {
				uni.navigateTo({
					url: '/pagesB/doctordetails/doctordetails'
				})
			},
		}
	}
</script>

<style lang="scss">
.app {

		.card {
			background-color: #fff;
			width: 94%;
			margin: 0 auto;
			padding-top: 35rpx;
			padding-bottom: 200rpx;
			border-radius: 0 0 10rpx 10rpx;

			.list {
				margin-top: 20rpx;
				width: 100%;
				display: flex;
				justify-content: space-around;

				.item {
					width: 46%;
					height: 382rpx;
					background: #FFFFFF;
					border: 1px solid #26A888;
					border-radius: 5rpx;
					position: relative;

					image {
						position: absolute;
						width: 100rpx;
						top: 20rpx;
						left: 20rpx;
						height: 100rpx;
					}

					.name {
						position: absolute;
						top: 40rpx;
						left: 140rpx;
						font-size: 26rpx;
						font-weight: 400;
						color: #000000;
					}

					.position {
						position: absolute;
						top: 84rpx;
						left: 140rpx;
						font-size: 22rpx;
						color: #666666;
					}

					.text {
						word-break: break-all;
						width: 90%;
						margin: 150rpx auto 0;
						font-size: 20rpx;
						color: #666666;
						line-height: 33rpx;
						text-overflow: -o-ellipsis-lastline;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-line-clamp: 8; //行数需设置
						line-clamp: 8;
						-webkit-box-orient: vertical;
						text-align: justify;
					}
				}
			}

			::v-deep .u-tabs {
				padding-top: 30rpx;
			}

			.title {
				width: 94%;
				margin: 0 auto;
				border-bottom: 2rpx solid #CDC9C9;
				font-size: 34rpx;
				font-weight: 500;
				color: #000000;
				margin-top: 40rpx;
				padding-bottom: 30rpx;
			}

			.topbar {
				width: 100%;
				display: flex;
				justify-content: space-around;
				color: #fff;

				.item {
					width: 46%;
					height: 180rpx;
					background: #26A888;
					border-radius: 5rpx;
					position: relative;

					.text {
						position: absolute;
						top: 50%;
						left: 40%;
						transform: translateY(-50%);
						display: inline-block;
						font-size: 34rpx;
						font-weight: 500;
					}

					image {
						position: absolute;
						top: 50%;
						left: 20%;
						transform: translateY(-50%);
						width: 48rpx;
						height: 41rpx;
					}
				}

				.item:nth-child(2) {
					background: #FFA115;
				}
			}
		}

		.banner {
			display: block;
			width: 94%;
			height: 350rpx;
			margin: 20rpx auto 0;
		}
	}
</style>
