<template>
	<view class="">
		<view class="p-2">
			<view class="p-32 white">
				<view class="flex-row">
					<u-image width="96rpx" height="96rpx" shape="circle" :src="avatar">
						<u-loading slot="loading"></u-loading>
					</u-image>
					<view class="flex-col flex-jus-sp m-l-32">
						<d-text :text="info.name" :bold="true"></d-text>
						<d-text :text="info.idcard.replace(/\d{4}$/, '****')"   >
						</d-text>
					</view>
				</view>
				<view class="organization m-t-32">
					<d-text text="执业机构" color="#31353D" :bold="true"></d-text>
					<d-text className="content-c m-t08" :text="`${info.idcard.replace(/^\d{2}/, '**')} （${info.yardes[0].name}）`">
					</d-text>
				</view>
			</view>
			<view class="p-32 white m-t-12">
				<wx-bind-entry ref="wxBindEntry" />
			</view>
			<view class="p-32 white m-t-12" @click="$go('../../subPackages/sub_pharmacist/pharmacist_info?avatar='+avatar+'&info='+JSON.stringify(info))">
				<view class="flex-row flex-jus-sp flex-ali-center">
					<u-icon margin-left="20" label-size="32" label-color="#31353D"
						:name="require('../../static/image/grzl.png')" label="个人资料" size="30"></u-icon>
					<u-icon name="arrow-right" size="32" color="#A7ABB0"></u-icon>
				</view>
			</view>
			<view class="p-32 white m-t-2" @click="$go('../../subPackages/sub_pharmacist/pharmacist_setInfo')">
				<view class="flex-row flex-jus-sp flex-ali-center">
					<u-icon margin-left="20" label-size="32" label-color="#31353D"
						:name="require('../../static/image/set.png')" label="设置" size="30"></u-icon>
					<u-icon name="arrow-right" size="32" color="#A7ABB0"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import WxBindEntry from '@/components/wx-bind-entry/wx-bind-entry.vue'
	export default {
		components: { WxBindEntry },
		props:{
			avatar:{
				type:String,
				default:''
			},
			info:{
				type:Object,
				default:()=>{
					return {}
				}
			}
		},
		data() {
			return {
				
			};
		},
		onLoad() {

		},
		mounted() {
			this.refreshWxBind()
		},
		methods: {
			refreshWxBind() {
				if (this.$refs.wxBindEntry) {
					this.$refs.wxBindEntry.refresh()
				}
			},
		}
	};
</script>
<style>
	page {
		background-color: #F9FAFB;
	}
</style>
<style lang="scss" scoped>
	.organization {
		background-color: #F9FAFB;
		padding: 16rpx;
	}
</style>
