<template>
	<view class="">
		<view class="index_personal bg-rgba-255 r-20 bor-f1 row-justify-sb center p-40">
			<view class="center">
				<image class="wh-100 r-circle" src="/static/img/index/index-avatar.png" mode="">
				</image>
				<view class="m-l20">
					<text class="text-color-fff">HI，李亮</text>
					<view class="text-color-fff size-24 text-center r-20 line-30 p-tb6 p-lr20 m-t10 "
						style="background-color: rgba(0, 0, 0, 0.2);opacity: 0.6;">
						{{is_admin?'管理员':'业务员'}}
					</view>
				</view>
			</view>
			<image class="wh-80 r-circle is-hover" src="/static/img/index/index-system.png" @click="onSystemShow">
			</image>
		</view>
		<uni-popup background-color="#fff" ref="popup" type="left" border-radius="10px 10px 0 0"
			@touchmove.stop.prevent="moveHandle">
			<SystemPopup ref="system" @onCloseSystem="onCloseSystem"></SystemPopup>
		</uni-popup>
	</view>
</template>

<script>
	import SystemPopup from "@/common/system_popup/system_popup.vue"

	export default {
		name: 'index_personal',
		components: {
			SystemPopup
		},
		props: {
			is_admin: {
				type: Boolean,
				default: true
			},
			data: {
				type: Object,
				default: () => {}
			},
		},
		methods: {
			onSystemShow() {
				this.$refs.popup.open('left')
			},
			moveHandle() {
				return false
			},
		}
	}
</script>

<style>
	.index_personal {
		box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
	}
</style>