<!doctype html>
<html>
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <title>个人信息</title>
  <meta name="description" content="" />
  <meta name="keywords" content="" />
  <link rel="stylesheet" href="css/morris.css" />
  <link rel="stylesheet" href="css/global.css" />
  <style>
    .button_qzone span, .button_tqq span, .button_tsina span{
        background:none;
    }
    .col-3{width:33.3%!important;}
    .col-2{width:50%!important;}
  </style>
  <!--[if gt IE 6]><!-->
    <script type="text/javascript">
    !function(t){t.loadScript(["http://szhuodong.duowan.com/feq/lolbox/yy-f2e-header-lolbox.min"])}(function(){function t(t){var e=n(t);document.write(e)}function n(t){for(var n,r="",c=0;n=t[c];c++)r+=e(n);return r}function e(t){var n=[unescape("%3Cscript%20type%3D%22text/javascript%22%20src%3D%22"),"",unescape("%22%3E%3C/script%3E")],e=new Date;return e.setSeconds(0),e.setMilliseconds(0),e=e.getTime(),t+="?t_="+e,n[1]=t,n.join("")}return{loadScript:function(n){n&&n.length&&n instanceof Array&&t(n)}}}())
    </script>
<!--<![endif]-->
  <script src="js/jquery-1.11.1.min.js"></script>
  <script src="js/jquery-migrate-1.2.1.min.js"></script>
  <script src="js/raphael-min.js"></script>
  <script src="js/morris.min.js"></script>
  <script src="js/jquery.nicescroll.min.js"></script>
  <script src="js/jquery.cookie.js"></script>
  <script src="js/underscore.js"></script>
  <script type="text/javascript" src="http://sz.duowan.com/s/ya/ya.1.3.1-min.js"></script>
  <!--[if IE 7]>
    <style>
      .personal .box-bd .com-hero .more{margin-top:-20px;}
      .huya-ad-v2{margin-top:-25px;}
      .personal-tabs{margin-top:-18px;}
      .top-message .more-info .refresh i, .personal-top .more-info .refresh i{margin-top:2px;}
      .top-message .more-info, .personal-top .more-info{margin-top:-30px;}
      .hero-nav{behavior: url(js/PIE.htc);}
      .personal .box-bd .intro{height:100px!important;margin-top:-10px;}
      .da-ye-bd LI P{position:relative;}
      .mod-top{z-index:9;}
      .nav-top-bottom I{vertical-align:8px!important;}
      .ad-wrap{top:260px;bottom:auto!important;}
      .col-2{width:49%!important;}
      .top-message{
        clear:both;z-index:999;
      }
      .more-info{
        clear:both;z-index:999;
      }
    </style>
  <![endif]-->
</head>
<body style="overflow:hidden;" scroll="no">
  <div class="top-message personal-top">
   <a href="playerSearch.html">玩家查询</a>
   <i>&gt;</i>&nbsp; <a id="currentNav"></a>
   <i>&gt;</i>&nbsp;<span>玩家详情</span>
   <div class="more-info">  
     <a class="icons refresh" href="javascript:location.reload();"><i></i></a>
     <div class="share">
        <a class="icons" href="javascript:void(0);"><i></i></a>
    </div>
    <div class="links">
        <a class="button_tsina" href="#"><i class="sina"></i><span>新浪微博</span></a>
        <a class="button_tqq" href="#"><i class="tencent"></i><span>腾讯微博</span></a>
        <a class="button_qzone" href="#"><i class="qq"></i><span>QQ空间</span></a>
        <a href="javascript:window.clipboardData.setData('Text',window.location.href);alert('链接复制成功');" style="color:#408bcb;"><i class="copy-link"></i><span>复制链接</span></a>
    </div> 

    <script>
        var hoverTimeout = null, leaveTimeout = null, mode = 'hide';
        $('.more-info .share').on('mouseenter', function(e) {
            clearTimeout(hoverTimeout);
            clearTimeout(leaveTimeout);
            hoverTimeout = setTimeout(function() {
              $('.links').show();
            }, 150);
        }).on('mouseleave', function(e) {
            clearTimeout(hoverTimeout);
            clearTimeout(leaveTimeout);
            leaveTimeout = setTimeout(function() {
              if(mode == 'hide') $('.links').hide();
            }, 200);

            $('.links').on('mouseenter', function(e) {
              mode = 'show';
            }).on('mouseleave', function(e) {
              mode = 'hide';
              clearTimeout(leaveTimeout);
              leaveTimeout = setTimeout(function() {
                $('.links').hide();
              }, 200);
            });
        });
    </script>
   </div>
  </div>
  <div class="box personal" style="width:600px;padding:15px;overflow:hidden;">
    <div class="no-data-tip hide">
      <img src="img/clothes-commit-fail.png">
      <p></p>
    </div>
    <div class="box-bd clearfix hide">
      <div class="intro" id="personalInfo">
      </div>
      <script>
        $("body").delegate("#fightingQuestion", "mouseenter", function(e) {
            e.preventDefault();
            $(".rank-ul").toggle();
        });
        $("body").delegate("#fightingQuestion", "mouseleave", function(e) {
            e.preventDefault();
            $(".rank-ul").hide();
        });
      </script>
      <div class="mod-tabs clearfix personal-tabs">
        <div class="mod-tabs-hd">
          <ul class="mod-tabs-trigger J_nav" id="modeTabs">
            <li class="selected stat-sign" data-type="mode-1" stat-sign="zonghe" stat-desc="综合统计">综合统计</li>
            <li class="stat-sign" data-type="mode-2" stat-sign="common" stat-desc="常规模式">常规模式</li>
            <li class="stat-sign" data-type="mode-3" stat-sign="2015" stat-desc="stat-desc">排位模式</li>
            <!-- <li class="stat-sign" data-type="mode-4">手机盒子名片</li> -->
            <li class="stat-sign" data-type="mode-5" stat-sign="mobilehuya" stat-desc="手机虎牙" id="nav_mbox">手机虎牙</li>
          </ul>
        </div>
        <script>
        $("body").delegate("#modeTabs>li", "click", function(e) {
          e.preventDefault();
          var mode = $(this).attr("data-type");

          if(mode == "mode-5") {
            $(".no-phone-card").hide();
            $(".fan_he").hide();
            $(".phone-card").show();
          } else if(mode == 'mode-4') {
            $(".no-phone-card").hide();
            $(".phone-card").hide();
            $(".fan_he").show();
          } else {
            $(".mod-top").hide();
            $("."+mode).show();
            $(".phone-card").hide();
            $(".fan_he").hide();
            $(".no-phone-card").show();
          }
          $(this).addClass("selected").siblings().removeClass("selected");
        });
        </script>
        <div class="mod-tabs-bd">
          <div class="mod-tabs-content no-phone-card">
            <!--经典模式{-->
            <div class="mod-top mode-1 clearfix">
              <div class="clearfix da-ye-bd">
                <div class="split-line one"></div>
                <div class="split-line two"></div>
                <div class="da-ye-wrap">
                  <p>近一周场次：<span id="heroTime" style="color:#408bcb;"></span>次</p>
                  <div class="da-ye" id="daYe" style="font-size:30px!important;"></div>
                </div>
                <div id="kda"></div>
              </div>
            </div>
            <!--经典模式}-->
             <!--常规模式{-->
            <div class="mod-top mode-2 hide">
              <div class="clearfix" id="gameCount"></div>
            </div>
            <!--常规模式}-->
            <!--2015赛季{-->
            <div class="mod-top mode-3 hide">
              <div class="clearfix" id="gameCount2015"></div>
            </div>
            <!--2015赛季}-->
            <div class="mod-bottom">
              <div class="right-part">
                <div class="right-hd">
                  <h2>最近比赛</h2>
                 <!--  <span class="flag flag1"><i></i>三连胜</span>
                  <span class="flag flag2"><i></i>三连败</span>
                  <span class="flag flag3"><i></i>连胜王者</span>
                  <span class="flag flag4"><i></i>连跪衰神</span> -->
                  <span class="first-win">
                    <span id="firstMsg" class="first-msg"></span>
                    <div class="first-win-hover hide">
                      <i class="avatar-arrow"></i>
                      <span id="firstTime" class="first-time">首胜：<span class="f-time"></span></span>
                    </div>
                  </span>
                  <span id="flag"></span>
                  <a id="moreGameResult" class="more" style="padding-right:5px;">更多<i></i></a>
                </div>
                <div class="right-bd">
                  <ul id="history">
                  </ul>
                </div>
              </div>
              <div class="left-part clearfix">
                <div class="hero-tip"></div>
                <div class="com-hero" id="commonHeroContent">
                </div>
              </div>
              <div class="ad-wrap">
                <script src="http://gt.yy.com/api/g?loc=newhezia3"></script>
              </div>
            </div>
          </div>
          <!--手机虎牙{-->
          <div class="mod-tabs-content phone-card mobile-huya hide" id="content_mobile_huya_promotion">
            <!-- 虎牙推广 -->
            <div class="huya-ad-v2">
                <img src="http://assets.dwstatic.com/project/lolbox/2.12.2/img/huya/ad1.jpg" class="huya-ad-pic" id="huyaAdPic">
                <div class="huya-ad-info">
                    <div class="huya-ad-info-inner">
                        <div class="huya-top">
                          <img src="http://assets.dwstatic.com/project/lolbox/2.12.2/img/huya/code1.jpg" class="appCode" id="huyaAppCode">
                          <a href="http://kiwi.pad.yy.com/apk/live4pclbzhanji.apk" class="blue-btn stat-sign" stat-sign="click/download" stat-desc="点击/下载虎牙直播">下载虎牙直播</a>
                        </div>
                        <div class="txt-list">
                            <ul>
                                <li><i></i>大神美女全天候直播<b></b></li>
                                <li><i></i>千万网友吐槽互动，趣味竞猜<b></b></li>
                                <li><i></i>个性推送热门直播<b></b></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <!-- }虎牙推广 -->

            <script src="http://assets.dwstatic.com/project/lolbox/2.12.2/js/jquery.cookie.js"></script>
            <script src="http://assets.dwstatic.com/project/lolbox/2.12.2/js/huya_app_spread.js"></script> 
          </div>            
          <!--手机虎牙}-->
          <!--多玩饭盒{-->
          <div class="mod-tabs-content fan_he hide">
            多玩饭盒
          </div>
          <!--多玩饭盒}-->
        </div>
    </div>
  </div>
<script id="flagTemp" type="text/template">
  <%
    var flagClass = '', flagMsg = '';
    var largestNum = data.continuousNum;
    
    if(data.statCode == 0) {//败
      if(largestNum >= 10) {
        flagClass = "flag flag4";
        flagMsg = "连跪衰神";
      } else {
        flagClass = "flag flag2";
        flagMsg = translateToCh(largestNum) + "连败";
      }
    } else {//胜
      if(largestNum >= 10) {
        flagClass = "flag flag3";
        flagMsg = "连胜王者";
      } else {
        flagClass = "flag flag1";
        flagMsg = translateToCh(largestNum) + "连胜";
      }
    }

    function translateToCh(num) {
      var chname;

      if(num < 3) return;

      switch(num) {
        case 3: chname = "三";break;
        case 4: chname = "四";break;
        case 5: chname = "五";break;
        case 6: chname = "六";break;
        case 7: chname = "七";break;
        case 8: chname = "八";break;
        case 9: chname = "九";break;
      };

      return chname;
    }
  %>
  <span class="<%=flagClass%>"><i></i><%=flagMsg%></span>
</script>
<script id="personalInfoTemp" type="text/template">
      <%
        var level = data.level;
        var zdlData = data.tier_rank;
        var global = data.global;
        var tier = zdlData.tier;
        var duanwei = tier.name_cn;
        var url = (data.focus == "0") ? (global.aUrl + "addFocus") : (global.aUrl + "removeFocus");
      %>
      <div class="info">
        <div class="avatar">
          <a href="<%=global.href%>" class="stat-sign" stat-sign="stand" stat-desc="点击/战绩页">
           <img src="<%=data.url_img%>" />
          </a><div class="p_level"><%=level%></div>
        </div>
        <div class="text">
          <div class="name-info">
            <a class="name" href="#"><%=data.pn%></a>
            <a target="_blank" href="<%=global.qrcodeUrl%>" title="扫描二维码"><img src="img/qrcode.png" alt="扫描二维码"></a>
            <span class="<%=data.isSelf ? 'hide' : ''%>">
              <%if(data.followed) {%>
                <a class="attention already" data-action="removeFocus"></a>
              <%} else {%>
                <a class="attention" data-action="addFocus"></a>
              <%} %>
            </span>
          </div>
          <div class="more-info" style="margin-top:10px;">
            <span>点赞 <%=data.like%></span>
            <span class="blacklist-content2">
              <label>拉黑 <%=data.unlike%></label>
            </span>
          </div>
        </div> 
       </div>
      <div class="fighting">
        <div class="fight-block" id="fightingQuestion">
        <strong>战斗力</strong>
        <a class="question-mark" style="position:relative;"></a>
        <div class="rank-ul fight-rank">
         <h3>你的战斗力：<%=data.box_score%></h3>
        <!-- <p>详细计算方法如下：</p>
         <p><%=data.box_score%> = <%=zdlData.eloScore%>(基础分) + <%=zdlData.winRatioScore%>(胜率分) + <%=zdlData.winBattleScore%>(胜场分) </p>-->
         <p>请通过排位赛来提升个人战斗力</p>
         <p>详细请看：</p>
         <a class="combat-explain" stat-sign="combat" stat-desc="点击/战斗力查询解释" href="http://lol.duowan.com/1112/187633871943.html?&amp;openmode=default" target="_blank">2015赛季战斗力算法详细解释</a>
       </div>
       </div>
       <p><em><%=data.box_score%></em></p>
      </div>
      <%
        var tierName;
        if (zdlData && zdlData['tier'] && zdlData['tier']['const'] > 0) {
          tierName = zdlData['tier']['name_cn'];
          if ( zdlData['tier']['const'] < 6 ){
            tierName += ' ' + zdlData['rank']['name'];
          }
        } else {
          tierName = '-';
        }
        if(tier.name != 'unrated'){
      %>
        <div class="duan_wei clearfix">
          <img src="<%=zdlData.url_img%>">
          <p><%=tierName%></p>
        </div>
      <%}%>
</script>
<script>
  $("body").delegate(".combat-explain,.handles a", 'click', function(e) {
    var stat = $(this).attr("stat-sign") || '',
      yaDxinesc = $(this).attr("stat-desc") || '',
      yaCode = "click/"+stat;
    try {
      window.external.data_report(yaCode, yaDxinesc);
    } catch(err) {}
  });
</script>
<script id="kdaTemp" type="text/template">
    <%
      //场均KDA
      var statKda = data.stat_kda;
      var honor = statKda.best_kill_in_cn;

      //KDA中 胜负场及胜率
      var winNum = statKda.total_win;
      var loseNum = statKda.total_lose;
      var rate = winNum / (winNum + loseNum) * 100;

      //设置打野浮窗颜色
      var colorsArr = ['#fbb28f','#cea9d7','#fa9f9f','#80c989','#9dc7eb'], setColors = [], setData = [], i=0;
      var statPosition = data.stat_position;

      if(statPosition.total_game != 0) {
        for(var key in statPosition) {
          var value = statPosition[key];
          if(key != 'total_game' && value != 0) {
            var keyTxt = '';

            switch(key) {
              case 'adc': keyTxt = 'ADC';break;
              case 'jungler': keyTxt = '打野';break;
              case 'mid': keyTxt = '中单';break;
              case 'support': keyTxt = '辅助';break;
              case 'top': keyTxt = '上单';break;
            };

            setData.push({
              value: value,
              label: keyTxt
            });

            setColors.push(colorsArr[i++]);
          }
        }
      }

      //打野为0时的处理
      var daYeClass = statPosition.total_game != 0 ? 'hide' : '';

    %>
    <div class="arrow-hover-wrap daye-hover">
      <i class="avatar-arrow"></i>
      <p>近7天召唤师峡谷排位赛与匹配赛使用英雄统计：</p>
      <div class="arrow-hover-content">
        <div class="da-ye-types">
          <%
            _.each(setData, function(item, i) {
          %>
          <a><i style="background-color:<%=setColors[i]%>"></i><%=item.label%></a>
          <%});%>
        </div>
      </div>
    </div>
    <div class="arrow-hover-wrap kda-hover">
      <i class="avatar-arrow"></i>
      <div class="arrow-hover-top">
        <div class="win-lost">
          <p><%=winNum%>胜 / <%=loseNum%>负</p>
          <div class="win-line">
            <em style="width:<%=rate%>%;"></em>
          </div>
        </div>
      </div>
      <p>最近20场召唤师峡谷排位赛与匹配赛的数据表现：</p>
      <div class="arrow-hover-content">
        <div class="da-ye-types">
          <a>击杀（K）:  <span style="color:#408bcb;"><%=statKda.total_k%></span></a>
          <a>死亡（D）:  <span style="color:#408bcb;"><%=statKda.total_d%></span></a>
          <a>助攻（A）:  <span style="color:#408bcb;"><%=statKda.total_a%></span></a>
        </div>
        <div class="formula">
          计算公式：（K+A）/D*3
        </div>
      </div>
    </div>
    <div class="arrow-hover-wrap kill-hover"> 
      <i class="avatar-arrow"></i>
      <p>最近<span style="color:#408bcb;"><%=statKda.total_game%></span>场荣誉成就</p>
      <div class="arrow-hover-content">
        <div class="da-ye-types">
          <a>三杀 <span style="color:#408bcb;"><%=statKda.total_kill3%></span>次</a>
          <a>四杀 <span style="color:#408bcb;"><%=statKda.total_kill4%></span>次</a>
          <a>五杀 <span style="color:#408bcb;"><%=statKda.total_kill5%></span>次</a>
          <a>超神 <span style="color:#408bcb;"><%=statKda.total_brilliant_largest_killing_spree%></span>次</a>
        </div>
      </div>
      <p>自定义成就不显示</p>
    </div>
    <ul>
      <li class="da-ye2 <%=daYeClass%>">
        <div class="percent2">
          <h2>0</h2>
        </div>
      </li>
      <li class="kda-li">
        <p>近<%=statKda.total_game%>场均KDA</p>
        <div class="percent2">
          <h2><%=statKda.average_kda%></h2>
          <p><%=statKda.average_k%>/<%=statKda.average_d%>/<%=statKda.average_a%></p>
        </div>
      </li>
      <li class="kill-li">
        <p>近<%=statKda.total_game%>场荣誉</p>
        <div class="percent2">
          <h2><%=honor ? honor : '无'%></h2>
        </div>
      </li>
    </ul>
</script>

<script id="historyTemp" type="text/template">
     <%_.each(data, function(item) {
        var winClass = item.battle_result ? "" : "red";
        var resultName = item.battle_result ? "胜利" : "失败";
        var champion = item.champion;
        var localTime  = moment.utc(item.created).toDate();

        localTime = moment(localTime).format('YYYY-MM-DD HH:mm:ss');
        var timeArr = localTime.split(' ');
        var monDayArr = timeArr[0].split('-');
        var hourMinArr = timeArr[1].split(':');
        var time = monDayArr[1] + '-' + monDayArr[2] + ' ' + hourMinArr[0] + ':' + hourMinArr[1];
     %>
        <li class="clearfix history_li">
          <img src="http://img.lolbox.duowan.com/champions/<%=champion.name%>_40x40.jpg" title="<%=champion.title%>">
          <div class="history_info">
            <p class="type"><%=item.game_type.name_cn%></p>
            <p class="time"><%=time%></p>
          </div>
          <div class="result <%=winClass%>"><%=resultName%></div>
        </li>
    <%});%>
</script>

<script id="commonHeroTemp" type="text/template">
    <%
      var sn = data.game_zone.server_name;
      var pn = data.pn;
      var baseUrl = data.heroWindowUrl;
      // var data = data.mostUsedHeros;
      var userId = data.user_id;
      var gameZone = data.game_zone.pinyin;
      var keyDatas = data.champion_performance_list, data_len = keyDatas.length;
      var commonHeroUrl = 'championsStat.html?serverName='+encodeURI(sn)+'&playerName='+encodeURI(pn)+'&userId='+userId + '&gameZone='+gameZone;
    %>
    <ul class="mod-pic clearfix" id="commonHero">
     <%
      _.each(keyDatas, function(item, i) {
      var firstClass = i === 0 ? "first" : "";
      // var level = item.championLevel;
      var level = 0;
      var champion = item.champion;
      var championId = champion.id;
      var href = 'recordlist.html?serverName='+sn+'&playerName='+pn+'&hero='+champion.name +'&userId='+userId+'&gameZone=' + gameZone + '&championId=' + championId;
      // var chPoints = item.championLevelTitle;
      var chName = champion.display_name ? champion.display_name : '-';
     %>
        <li class="mod-pic-li <%=firstClass%> mod-pic-<%=i%>" data-right="72px" data-name="<%=champion.name%>" data-index="<%=i%>">
          <a class="core" href="<%=href%>">
            <div class="ch_level level_<%=level%>"></div>
            <img class="core-img" src="http://img.lolbox.duowan.com/champions/<%=champion.name%>.jpg">
            <p><%=chName%></p>
          </a>
        </li>
    <%});
    %>
    </ul>
    <a class="hero-nav h-r stat-sign" href="<%=commonHeroUrl%>" stat-sign="click/more hero" stat-desc="点击/更多常用英雄"><i></i></a>
</script>
<!-- <div class="ch_level level_<%=level%>"></div> -->
<script id="heroHoverTemp" type="text/template">
  <i class="avatar-arrow"></i>
  <div class="inner">
    <%
      var champion = data.champion, positions = champion.positions[0], statClass;

      switch(positions.position) {
        case 'support': statClass = 'fuzhu';break;
        case 'fighter': statClass = 'daye';break;
        case 'adc': statClass = 'adc';break;
        case 'mid': statClass = 'zhongdan';break;
        case 'top': statClass = 'shangdan';break;
      }
    %>
    <div class="hover-hd">
      <img src="http://img.lolbox.duowan.com/champions/<%=champion.name%>_40x40.jpg">
      <div class="info">
        <h3><%=champion.display_name%></h3>
        <p><span><%=data.win_rate%>%</span>胜/<%=data.times%>场</p>
        
        <div class="championStat">
          <a class="<%=statClass%>"></a>
        </div>
      </div>
    </div>
    <div class="hover-bd">
      <ul>
        <li>
          <i></i>
          <span class="first">场均战损：</span>
          <span><%=data.kda_score%></span>
        </li>
        <li>
          <i></i>
          <span class="first">场均杀死助：</span>
          <span><%=data.k%>/<%=data.d%>/<%=data.a%></span>
        </li>
        <li>
          <i></i>
          <span class="first">场均对英雄输出：</span>
          <span><%=data.ddpm%></span>
        </li>
        <li>
          <i></i>
          <span class="first">场均分钟经济：</span>
          <span><%=data.gpm%> </span>
        </li>
        <li>
          <i></i>
          <span class="first">10分钟场均补兵：</span>
          <span><%=data.mk10m%></span>
        </li>
      </ul>
      <div class="handles">
        <a href="javascript:void(0);" class="stat-sign copy" stat-sign="share" stat-desc="点击/分享">复制</a>&nbsp; <span>|</span>&nbsp;
        <a href="<%=data.shotUrl%>" class="stat-sign" target="_blank" stat-sign="share" stat-desc="点击/分享">截图</a>&nbsp; <span>|</span>&nbsp;
        分享到：
        <a stat-sign="share" stat-desc="点击/分享" class="button_tqq"><i class="share tencent"></i></a>
        <a stat-sign="share" stat-desc="点击/分享" class="button_tsina"><i class="share sina"></i></a>
        <a stat-sign="share" stat-desc="点击/分享" class="button_qzone"><i class="share qq"></i></a>
        <div class="copy-text hide"><%=champion.name%> <%=champion.display_name%>　<%=data.win_rate%>%胜/<%=data.times%>场　KDA:<%=data.k%>/<%=data.f%>/<%=data.a%>　分钟输出:<%=data.ddpm%> 分钟经济:<%=data.gpm%>十分钟补兵:<%=data.mk10m%>　来自L O L盒子</div>
      </div>
    </div>
  </div>
</script>
<script id="gameCountTemp" type="text/template">
    <%
      //经典模式
      var matchWin = data.total_win_normal;
      var matchLost = data.total_lose_normal;
      var matchTotal = matchWin + matchLost;
      var matchWinRatio = matchTotal != 0 ? Math.floor(matchWin / matchTotal * 100) : 0;
      var matchClass = getRatioBg(matchWinRatio);

      //大乱斗
      var aramWin = data.total_win_aram;
      var aramLost = data.total_lose_aram;
      var aramTotal = aramWin + aramLost;
      var aramWinRatio = aramTotal != 0 ? Math.floor(aramWin / aramTotal * 100) : 0;
      var aramClass = getRatioBg(aramWinRatio);

      //人机
      var botWin = data.total_win_bot;
      var botLost = data.total_lose_bot;
      var botTotal = botWin + botLost;
      var botWinRatio = botTotal != 0 ? Math.floor(botWin / botTotal * 100) : 0;
      var botClass = getRatioBg(botWinRatio);

      function getRatioBg(ratio) {
        var rClass;
        if(ratio == 0) {
          rClass = "p-0";
        } else if(ratio > 0 && ratio <= 5) {
          rClass = "p-5";
        } else if(ratio > 5 && ratio <= 10) {
          rClass = "p-10";
        } else if(ratio > 10 && ratio <= 20) {
          rClass = "p-20";
        } else if(ratio > 20 && ratio <= 30) {
          rClass = "p-30";
        } else if(ratio > 30 && ratio <= 40) {
          rClass = "p-40";
        } else if(ratio > 40 && ratio <= 50) {
          rClass = "p-50";
        } else if(ratio > 50 && ratio <= 60) {
          rClass = "p-60";
        } else if(ratio > 60 && ratio <= 70) {
          rClass = "p-70";
        } else if(ratio > 70 && ratio <= 80) {
          rClass = "p-80";
        } else if(ratio > 80 && ratio <= 90) {
          rClass = "p-90";
        } else if(ratio > 90 && ratio <= 95) {
          rClass = "p-95";
        } else if(ratio > 95) {
          rClass = "p-100";
        }

        return rClass;
      }
    %>
     <li class="col-2">
      <div class="percent <%=matchClass%>">
        <h2><%=matchWinRatio%>%</h2>
        <p>胜率</p>
      </div>
      <div class="game-info">
        <h3>经典模式</h3>
        <p><span class="win-blue">胜 <%=matchWin%></span>&nbsp;<span class="lost-red">负 <%=matchLost%></span></p>
        <p>总 <%=matchTotal%></p>
      </div>
    </li>
    <li class="col-2">
      <div class="percent <%=aramClass%>">
        <h2><%=aramWinRatio%>%</h2>
        <p>胜率</p>
      </div>
      <div class="game-info">
        <h3>大乱斗</h3>
        <p><span class="win-blue">胜 <%=aramWin%></span>&nbsp;<span class="lost-red">负 <%=aramLost%></span></p>
        <p>总 <%=aramTotal%></p>
      </div>
    </li>
    <li class="col-2">
      <div class="percent <%=botClass%>">
        <h2><%=botWinRatio%>%</h2>
        <p>胜率</p>
      </div>
      <div class="game-info">
        <h3>人机模式</h3>
        <p><span class="win-blue">胜 <%=botWin%></span>&nbsp;<span class="lost-red">负 <%=botLost%></span></p>
        <p>总 <%=botTotal%></p>
      </div>
    </li>
</script>
<script id="gameCount2015Temp" type="text/template">
    <%
      //段位
      var tier_rank = data.tier_rank;
      var tierObj = tier_rank.tier;
      var tier = tierObj['const'];
      var rank = tier_rank && tier_rank['rank'] ? tier_rank['rank']['const'] : 0;
      var tierMsg, tierNum, isTierExist = true, tierName;

      if (tier_rank && tier_rank['tier'] && tier_rank['tier']['const'] > 0) {
        tierName = tier_rank['tier']['name_cn'] + ' ' + tier_rank['rank']['name'];
      } else {
        isTierExist = false;
      }

      //胜点
      var league_points = tier_rank && tier_rank.league_points ? tier_rank.league_points : 0;

      //历史排位
      var historyRank = data.formatted_ranked_history;
      var historyHide = "",historyRankWin,historyRankLost,historyRankTotal,historyRankWinRatio,historyRankClass;

      //5v5单双排
      var ranked, rankedWin, rankedLost, rankedTotal, rankedWinRatio, rankedClass;

      if(historyRank && historyRank != "{}") {
        historyRankS6 = historyRank['s6'];
        historyRankS5 = historyRank['s5'];

        if(historyRankS6) {
          ranked = historyRankS6;
          historyRankWin = historyRankS6.w + historyRankS5 ? historyRankS5.w : 0;
          historyRankLost = historyRankS6.lo + historyRankS5 ? historyRankS5.lo : 0;
        } else if(historyRankS5) {
          ranked = historyRankS5;
          historyRankWin = historyRankS5.w;
          historyRankLost = historyRankS5.lo;
        }

        rankedWin = parseInt(ranked.w);
        rankedLost = parseInt(ranked.lo);
        rankedTotal = rankedWin + rankedLost;
        rankedWinRatio = rankedTotal != 0 ? Math.floor(rankedWin / rankedTotal * 100) : 0;
        rankedClass = getRatioBg(rankedWinRatio);

        historyRankTotal = historyRankWin + historyRankLost;
        
        historyRankWinRatio = historyRankTotal != 0 ? Math.floor(historyRankWin / historyRankTotal * 100) : 0;
        historyRankClass = getRatioBg(historyRankWinRatio);
      } else {
        historyHide = "hide";
      }

      function getRatioBg(ratio) {
        var rClass;

        if(ratio == 0) {
          rClass = "p-0";
        } else if(ratio > 0 && ratio <= 5) {
          rClass = "p-5";
        } else if(ratio > 5 && ratio <= 10) {
          rClass = "p-10";
        } else if(ratio > 10 && ratio <= 20) {
          rClass = "p-20";
        } else if(ratio > 20 && ratio <= 30) {
          rClass = "p-30";
        } else if(ratio > 30 && ratio <= 40) {
          rClass = "p-40";
        } else if(ratio > 40 && ratio <= 50) {
          rClass = "p-50";
        } else if(ratio > 50 && ratio <= 60) {
          rClass = "p-60";
        } else if(ratio > 60 && ratio <= 70) {
          rClass = "p-70";
        } else if(ratio > 70 && ratio <= 80) {
          rClass = "p-80";
        } else if(ratio > 80 && ratio <= 90) {
          rClass = "p-90";
        } else if(ratio > 90 && ratio <= 95) {
          rClass = "p-95";
        } else if(ratio > 95) {
          rClass = "p-100";
        }

        return rClass;
      }

      if(historyRank == '{}') {
    %>
      <div class="no-data">
        <img src="img/clothes-commit-fail.png">
        <div class="no-data-info">
          <p>亲，你还没打过排位哦~</p>
          <p>赶紧努力哦~</p>
        </div>
      </div>
    <%} else {%>
    <div class="content-2015">
      <ul class="clearfix ul-2015">
        <% if(isTierExist) {%>
        <li class="tier_<%=tier%> li-golden">
          <div class="tier_img_<%=tier%>"></div>
          <p><%=tierName%></p>
        </li>
        <%} else {%>
          <li>
            <p style="margin-top:23px;text-align:center;">-暂无段位-</p>
          </li>
        <%}%>
        <li>
          <div class="percent <%=rankedClass%>">
            <h2><%=rankedWinRatio%>%</h2>
            <p>胜率</p>
          </div>
        </li>
        <li style="width:46%!important;">
          <div class="percent <%=rankedClass%>">
            <h2><%=league_points%></h2>
            <p>胜点</p>
          </div>
          <div class="game-info">
            <h3>5v5单双排</h3>
            <p><span class="win-blue">胜 <%=rankedWin%></span>&nbsp;<span class="lost-red">负 <%=rankedLost%></span></p>
            <p>总 <%=rankedTotal%></p>
          </div>
        </li>
      </ul>
    </div>
    
    <div class="table-history">
      <table> 
        <thead>
          <tr>
            <th width="100">类型</th>
            <th width="100">场次</th>
            <th width="100">胜率</th>
            <th width="100">胜场</th>
            <th class="last" width="100">负场</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td width="100">历史排位</td>
            <td width="100"><%=historyRankTotal%></td>
            <td width="100"><%=historyRankWinRatio%>%</td>
            <td width="100"><%=historyRankWin%></td>
            <td class="last" width="100"><%=historyRankLost%></td>
          </tr>
        </tbody>
      </table>
    </div>
    <%}%>
</script>
<!--手机盒子名片-->
<script src="http://assets.dwstatic.com/sundry/mbox/mbox.js?v=32" type="text/javascript"></script>
<script>var playerMostUsedHero = null,jiathis_config;</script>
<!--广告位统计-->
<script src="http://sz.duowan.com/resource/adstat.1.0.0.js"></script>
<script src="js/moment.min.js"></script>
<script src="js/new_stat.js"></script>
<script type="text/javascript" src="js/sns_share.js" charset="utf-8"></script>
<script src="js/personal.js?t=2"></script>
<!--海度统计-->
<script type="text/javascript">_hiido_no=0;_hiido_wid=["lbox"];</script>
<script src="http://www.duowan.com/duowan.js" type="text/javascript"></script>
<!--百度统计-->
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?72772dda37b1e926733138415981abcf";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
<!--[if gt IE 6]><!-->
    <script type="text/javascript">
        window.onerror = function(a,b,c){ return true};!function(t){t.loadScript(["http://szhuodong.duowan.com/feq/lolbox/yy-f2e-lolbox.min"])}(function(){function t(e,a){var n=a[e];if(n){e++;var o=document.createElement("script");o.type="text/javascript",o.setAttribute("async","async"),o.onload=o.onreadystatechange=function(){return o.readyState&&"complete"!==o.readyState&&"loaded"!==o.readyState?!1:(o.onload=o.onreadystatechange=null,void t(e,a))};var c=new Date;c.setSeconds(0),c.setMilliseconds(0),c=c.getTime(),o.async=!0,o.src=n+"?_="+c,document.getElementsByTagName("head")[0].appendChild(o)}}return{loadScript:function(e){e&&e.length&&e instanceof Array&&t(0,e)}}}());
    </script>
<!--<![endif]-->
</body>
</html>



