<template>
    <div class="menu">
        <img src="../assets/imgs/home_img_logo.png" alt="" class="logo">
        <div style="float:right;cursor: pointer;position:relative;" class="user_hover">
            <span class="user">用户</span>
            <img src="../assets/imgs/home_ic_user.png" alt="" class="user_pic">
            <div class="user_menu">
                <div v-for="(item,index) in user_arr" :key="index+700" @click="gotopage(index)">{{item}}</div>
            </div>
            <div class="sj"></div>
        </div>
        <div class="number">99+</div>
        <img src="../assets/imgs/home_ic_shop.png" alt="" class="car">
        
        <div style="float:right">
            <div v-for="(item,index) in menu_arr" :key="index+200" class="menu_box" @click="now_menu = index" :style="now_menu==index?{color:'#fff'}:{}">{{item}}
                 <div class="bottom_show" v-if="now_menu==index"></div>
            </div>
        </div>
       

    </div>
</template>

<script>
export default {
    data(){
        return{
            menu_arr:['工作台','技术支持','服务超市'],
            now_menu:0,
            user_arr:['个人档案','消息通知','收银中心','关于BD-aPaaS','退出登录'],
        }
    },
    methods:{
        gotopage(n){
            console.log(n);
        }
    }
}
</script>

<style scoped>
.menu{
    width: 100%;
    height: 84px;
    background-color: #0f2683;
    color: #8390ee;
    line-height: 84px;

}
.logo{
    float: left;
    margin: 30px 0 0 40px;
}
.user{
    float: right;
    margin-right: 113px;
    font-size: 16px;
}
.user_pic{
    float: right;
    margin-right: 15px;
    margin-top: 30px;
}
.number{
    float: right;
    margin-right: 43px;
    margin-top: 30px;
    width: 40px;
	height: 22px;
	background-color: #e56600;
    border-radius: 11px;
    color: #fcefd6;
    line-height: 22px;
    text-align: center;
}
.car{
    float: right;
    margin-right: 15px;
    margin-top: 30px;
}
.menu_box{
    float: right;
    width: 185px;
    text-align: center;
    cursor: pointer;
    position: relative;
}
.menu_box:nth-of-type(1){
    margin-right: 52px;
}
.bottom_show{
    width: 24px;
	height: 5px;
	background-color: #e56600;
    border-radius: 3px;
    position: absolute;
    bottom: 0px;
    left: calc(50% - 12px);
}
.user_menu{
    width: 135px;
	background-color: #ffffff;
	box-shadow: 0px 3px 6px 0px 
		#f4f7fc;
	border-radius: 8px;
    position: absolute;
    top: 80px;
    left: -20px;
    overflow: hidden;
    display: none;
    z-index: 1;
}
.user_hover:hover .user_menu{
    display: block;
}
.user_hover:hover .sj{
    display: block;
}
.user_menu div{
    width: 135px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    color: #0d1847;
}
.user_menu div:hover{
    background-color: #e56600;
    color: #fff;
}
.sj{
    width: 16px;
    height: 16px;
    background-color: #e56600;
    position: absolute;
    top: 72px;
    transform:rotate(45deg);
    display: none;
}
</style>