<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>首页</title>
    <meta name="Keywords" content="" />
    <meta name="Description" content="" />
    <link href="/Public/Mobile/css/mui.min.css" rel="stylesheet"/>

    <link href="/Public/Agent/Mobile/css/css.css" rel="stylesheet" type="text/css" />
    <!--<script src="/Public/Mobile/js/zepto_1.1.3.js"></script>-->
    <script type="text/javascript" src="/Public/Agent/Mobile/js/jquery-3.1.1.min.js"></script>
    <script src="/Public/js/commons.js"></script>
    <!--<script src="/Public/Mobile/js/mui.min.js"></script>-->
    <script src="/Public/js/layer/layer.js"></script>
    <script src="/Public/Mobile/js/logout.js"></script>
    <script src="/Public/Mobile/js/mui.min.js"></script>
    <script src="/Public/Mobile/js/vue.js"></script>
    <script src="/Public/Mobile/js/vue.min.js"></script>
    <script src="/Public/Agent/Mobile/js/jquery.pagination.js"></script>
</head>
<body>
<div class="qtx_head">
    <div class="qtx_head_top">
        <div class="qtx_logo"></div>
        <div class="qtx_head_word">
            <div class="qtx_head_user"><img src="/Public/Agent/Mobile/img/img14.png"><span v-text="user.agent_user"></span></div>
            <div class="qtx_head_grade"><span>等级:<span v-text="user.grade"></span></span></div>
            <div class="qtx_head_loginout" onclick="logout()">退出</div>
        </div>
        <div class="qtx_clear"></div>
    </div>
    <div class="qtx_head_nav">
        <div id="nav1" class="qtx_head_nav_list "><a href="/mobile-agent/index">代理首页</a></div>
        <div id="nav2" class="qtx_head_nav_list"><a href="/mobile-agent/userList">客户管理</a></div>
        <div id="nav3" class="qtx_head_nav_list"><a href="/mobile-agent/Invite">推广中心</a></div>
        <div id="nav4" class="qtx_head_nav_list"><a href="/Mobile-SelfCenter/Index">个人中心</a></div>
        <div id="nav5" class="qtx_clear"></div>
    </div>
</div>
<script src="/Public/Agent/Mobile/js/checkagent.js"></script>
<script>
    $(function(){
        var Wwidth = $(window).width();
        var Hheight = $(window).height();
        //计算宽度
        $(".qtx_agent_amount_list").width((Wwidth-30)/2);
        $(".qtx_grade_name_list").height($(".qtx_grade_name_list").width());

        /*function initAgent(data) {
//            mui.alert(data.msg);
            if (kaiYou.Agent) {
                $("#zc").hide();
            }
        }*/
    });

    $(function () {
        $('.picname_y').on('click',function () {
            $(".userdetails").toggle();
        });
        apiAgentAjax('/api-agent/GetAgent',{},function(data) {
            console.log(data);
            header.user=data.data;
        });
        //高亮
        var id=localStorage.getItem('hightLight');
        $('.qtx_head_nav_list').removeClass('qtx_active');
        if(id){
            $('#'+id).addClass('qtx_active');
        }else{
            $('#nav1').addClass('qtx_active');
        }
    })
    var header=new Vue({
        el:'.qtx_head_word',
        data:{
            user:[]
        }
    });
    //高亮
    $('.qtx_head_nav_list').click(function (e) {
        var val=$(this).attr("id");
        localStorage.setItem('hightLight', val);
    })

</script>