<template>
	<div class="user-profile-container">
		<div class="profile-header">
			<img :src="userStore().doctorUserInfo.img" alt="User Avatar" class="profile-avatar" />
			<h2 class="profile-name">{{ userStore().doctorUserInfo.nickName }}</h2>
			<p class="profile-position">{{ userStore().doctorUserInfo.position }}</p>
		</div>
		<div class="profile-details">
			<div class="profile-item">
				<label>用户名:</label>
				<span>{{ userStore().doctorUserInfo.userName }}</span>
			</div>
			<div class="profile-item">
				<label>性别:</label>
				<span>{{ userStore().doctorUserInfo.sex === 1 ? '男' : '女' }}</span>
			</div>
			<div class="profile-item">
				<label>工作经验:</label>
				<span>{{ userStore().doctorUserInfo.yearsExperience }} 年</span>
			</div>
			<div class="profile-item">
				<label>毕业学校:</label>
				<span>{{ userStore().doctorUserInfo.graduationSchool }}</span>
			</div>
			<div class="profile-item">
				<label>电话:</label>
				<span>{{ userStore().doctorUserInfo.phone }}</span>
			</div>
			<div class="profile-item">
				<label>专长:</label>
				<span>{{ userStore().doctorUserInfo.specialty }}</span>
			</div>
			<div class="profile-item">
				<label>简介:</label>
				<span>{{ userStore().doctorUserInfo.intro }}</span>
			</div>
			<div class="profile-item">
				<label>挂号费用:</label>
				<span>{{ userStore().doctorUserInfo.amount }} 元</span>
			</div>
		</div>

<!--		<el-button class="edit-btn" @click="handleEdit">编辑信息</el-button>-->
	</div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
// 编辑按钮处理
const handleEdit = () => {
	useRouter().push('/edit-profile')
}
</script>

<style scoped>
.user-profile-container {
	padding: 30px;
	max-width: 900px;
	margin: 0 auto;
	background-color: #f9f9f9;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	font-family: 'Arial', sans-serif;
	color: #333;
}

.profile-header {
	text-align: center;
	margin-bottom: 20px;
}

.profile-avatar {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #4b90e6; /* 添加边框 */
	margin-bottom: 15px;
}

.profile-name {
	font-size: 24px;
	font-weight: bold;
	color: #333;
}

.profile-position {
	font-size: 16px;
	color: #777;
	margin-bottom: 10px;
}

.profile-details {
	background-color: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.profile-item {
	display: flex;
	justify-content: space-between;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}

.profile-item:last-child {
	border-bottom: none;
}

.profile-item label {
	font-size: 16px;
	font-weight: 600;
	color: #4b90e6; /* 医疗行业常用的蓝色 */
}

.profile-item span {
	font-size: 16px;
	color: #555;
}

.el-button {
	background-color: #4b90e6;
	color: #fff;
	padding: 10px 20px;
	border-radius: 6px;
	width: 100%;
	font-size: 16px;
	margin-top: 30px;
}

.el-button:hover {
	background-color: #3577b7;
	border-color: #3577b7;
}

.el-button:focus {
	outline: none;
}
</style>


<route lang="json">
{
"meta": {
"layout": "doctor"
}
}
</route>
