<!-- 登录后头部信息 -->
<div class="webtop clear wrap webtopNo" data-now=""  data-userphone="">
    <div class="mainWidth">
      <div class="webtop-left">
        <div class="adv">
          <span class="plate">广告主营销平台</span>
          <span class="theUserName">****</span>
          <img style="width:16px;display:none"  id="vipimg" src="" alt="">
          <a class="msg" href="{{url('/advert/message')}}"><img src="/images/letter01.png" alt="">
              <i class="smg-num message_" style="display: none" >0</i>
          </a>
          <a class="theUserExit" onclick="userExit()">退出</a>
        </div>
      </div>
      <div class="webtop-right">
        <div class="adv">
          <span class="tr dropMenu">我的订单
            <i class="jt-down"></i>
            <i class="whiteLine"></i>
            <div class="drops">
              @foreach($top_category as $item)
                @if($item->tag != 'redbook'||$item->tag != 'zimeiti')
                  <a href="/advert/member/order?type={{$item->tag}}">{{$item->name}}</a>
                @endif
              @endforeach
            </div>
          </span>
          <span class="tr dropMenu"><a href="{{ url('advert/member/pay/charge')}}">我的余额</a>
            <i class="jt-down"></i>
            <i class="whiteLine"></i>
            <div class="drops">
              <span class="s1">余额：￥<font class="myueYe">0</font></span>
              <span class="s3">冻结：￥<font class="myueFz">0</font></span>
            </div>
          </span>
        </div>
      </div>
    </div>
	</div>
	<div class="webtopYes webtop pcub pcub-pac wrap" style="">
		<span class="pcub-f1">您好， 欢迎来到   @if(isset($web_site)){{$web_site->company_name}}@endif！ （工作日9:00 - 18:00）</span> {{--客服电话： 4008-160-560 --}}
      <a class="qq clear" target="_blank" href="tencent://message/?Menu=yes&amp;uin={{isset($manager1)?$manager1->qq:'3055948641'}}&amp;Site=80fans&amp;Service=300&amp;sigT=45a1e5847943b64c6ff3990f8a9e644d2b31356cb0b4ac6b24663a3c8dd0f8aa12a545b1714f9d45" title="联系QQ：{{isset($manager1)?$manager1->qq:'3055948641'}}">QQ：{{isset($manager1)?$manager1->qq:'3055948641'}}</a>
	</div>
  <script type="text/javascript">
		if(localStorage.userType&&localStorage.userType==='1'){
			$('.webtopNo').show();
      $('.webtopYes').hide();
		}else{;
			$('.webtopNo').hide();
			$('.webtopYes').show();
		}
        function userExit(){
            localStorage.removeItem('userType')
            localStorage.removeItem('nick')
            var params = {};
            params.theUrl = allAPI.user.logout;
            doGetAjax(params,function(){
                window.location.href='/index';
            })
        }
        /**
         * 获取系统消息和余额
         */
        function  messageNumber() {
            $.ajax({
                url: "{{ url('/advert/message/number')}}",
                type: 'GET',
                headers: {
                    'X-CSRF-TOKEN': '{{csrf_token()}}',
                },
                dataType: "json",
                success: function (res) {
                    $(".myueYe").html(res.data.account.total_money)
                    $(".myueFz").html(res.data.account.freeze_money)
                    $(".theUserName").html(res.data.account.nick)
                    if(res.data.level_img)
                    {
                       $("#vipimg").show().attr('src',res.data.level_img);
                    }
                    if(res.data.has_new > 0)
                    {
                        if(res.data.login)
                        {
                          $(".webtopYes").hide();
                          $(".mainWidth").show();


                        }else{
                            $(".webtopYes").show();
                            $(".mainWidth").hide();
                        }

                        $(".message_").show().text(res.data.has_new)
                    }else{
                        $(".message_").remove()
                    }
                }
            })
        }
        messageNumber();
  </script>
