<template>
	<div class="fast-menu">
		<div class="menu-list">
			<!-- <a v-for="(fastMenu,index) in fastMenu" @click="backToMainPage" :href="fastMenu.path" :key="index" class="header-right">
				<!-- <span><i class="iconfont" :class="fastMenu.icon"></i><el-badge :value="fastMenu.msValue" :max="99" class="item">{{fastMenu.name}}</el-badge></span> -->
			<!-- 	<span><i :class="fastMenu.icon"></i>{{fastMenu.name}}</span> -->
			<!-- </a> -->
			<a  @click="backToMainPage" class="header-right">
				<!-- <span><i class="iconfont" :class="fastMenu.icon"></i><el-badge :value="fastMenu.msValue" :max="99" class="item">{{fastMenu.name}}</el-badge></span> -->
				<span><i class="el-icon-s-home"></i>返回首页</span>
			</a>
			<a  @click="backToMainPage" class="header-right">
				<!-- <span><i class="iconfont" :class="fastMenu.icon"></i><el-badge :value="fastMenu.msValue" :max="99" class="item">{{fastMenu.name}}</el-badge></span> -->
				<span><i class="el-icon-monitor"></i>管理端</span>
			</a>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				// fastMenu: [{
				// 		name: '返回首页',
				// 		path: '/',
				// 		icon: 'el-icon-s-home',
				// 		// msValue: 1
				// 	},
				// 	{
				// 		name: '管理端',
				// 		path: '/',
				// 		icon: 'sj-icon-rwzx',
				// 		// msValue: 2
				// 	},
				// ],

			}
		},
		methods:{
			backToMainPage(){
			  let href = window.location.href
			  let protacal = href.substr(0,href.indexOf("://")+3)
			  let mo = href.lastIndexOf(":") > 6  ? href.lastIndexOf(":") : href.lastIndexOf("/")
			  let ip = href.substr(href.indexOf("://")+3,mo);
			  let url =href.substr(0,mo)
			  let toUrl = url +":15001/index58"
			  window.location.href = toUrl
			},
		},
		computed: {},
		

	}
</script>

<style rel="stylesheet/scss" lang="scss">
	@import '@/assets/styles/base.scss';


	.fast-menu {
		right: 0.5rem;
		position: absolute;
		display: flex;

		.menu-list {
			margin-left: 20px;
			display: flex;
			align-items: center;

			span {
				// min-width: 4.625rem;
				font-size: 12px;
				display: flex;
				align-items: center;
				justify-content: center;
				padding: 10px 15px;
				color: $fBlue;
				height: 100%;
				cursor: pointer;
				text-align: center;

				i {
					padding-right: 3px;
				}
			}

			span:hover {
				color: $fBlueHover;
				background-color: #032530;
			}
		}

		.el-badge__content.is-fixed {
			right: 3px;
		}

		.el-badge__content {
			border: 0;
		}

	}
</style>
