heroTop10Players.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  6. <title>英雄高手榜详情</title>
  7. <meta name="description" content="" />
  8. <meta name="keywords" content="" />
  9. <link rel="stylesheet" href="css/global.css" />
  10. <style>
  11. body { height: 527px; overflow: hidden; }
  12. </style>
  13. <!--[if IE 7]>
  14. <style>
  15. .heroRankCrumbs .fnMenu{margin-top:-27px;}
  16. .list-table{margin-top:36px;}
  17. </style>
  18. <![endif]-->
  19. <!--[if gt IE 6]><!-->
  20. <script type="text/javascript">
  21. !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)}}}())
  22. </script>
  23. <!--<![endif]-->
  24. <script src="js/jquery-1.11.1.min.js"></script> <script src="js/jquery-migrate-1.2.1.min.js"></script>
  25. <script src="js/jquery.nicescroll.min.js"></script>
  26. <script src="js/heroesList.js" type="text/javascript"></script>
  27. </head>
  28. <body scroll="no" style="overflow:hidden;">
  29. <div class="heroRankCrumbs">
  30. <a href="playerSearch.html">战绩查询</a> &gt; <a href="heroesRank.html">英雄胜率榜详情</a> &gt; <span id="currentHero"></span>
  31. <div class="fnMenu">
  32. <a class="icons back" href="javascript:history.back();"><i></i></a>
  33. <a class="icons refresh" href="javascript:location.reload();"><i></i></a>
  34. </div>
  35. </div>
  36. <div class="box heroRanksWrap">
  37. <div class="box-bd heroRanks-tc">
  38. <div class="mod-tabs clearfix">
  39. <div class="mod-tabs-bd hero-rank">
  40. <div class="mod-tabs-content">
  41. <div class="choose-type">
  42. <ul class="mod-tabs-trigger">
  43. <li><a class="stat-sign" stat-sign="master" href="rankScoreRank.html">排位榜</a></li>
  44. <li><a class="stat-sign" stat-sign="action list" href="zdlRank.html">战斗力榜</a></li>
  45. <li class="selected stat-sign"><a stat-sign="hero ace" href="heroesRank.html">英雄胜率榜</a></li>
  46. </ul>
  47. </div>
  48. <div id="dataLists" class="hero-detail-list">
  49. <ul class="thead-simulate">
  50. <li class="col-60">排名</li>
  51. <li class="col-100">玩家名称</li>
  52. <li style="width:110px;">服务器</li>
  53. <li class="col-110">使用此英雄胜率</li>
  54. <li class="col-100">最近使用场次</li>
  55. <li style="width:73px;padding-right:13px;">段位/胜点</li>
  56. <li style="width:66px;">相关比赛</li>
  57. </ul>
  58. <div class="list-table" id="scrollContent">
  59. <table cellspacing="0" cellpadding="0" border="0" width="100%">
  60. <tbody id="heroDetail" class="hero-detail">
  61. </tbody>
  62. </table>
  63. </div>
  64. </div>
  65. <div class="detail" style="margin-top:-12px;"></span>
  66. </div>
  67. <div id="pages" class="page-nav"></div>
  68. </div>
  69. <div class="mod-tabs-content hide">
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <script id="heroDetailTemplate" type="text/template">
  76. <%_.each(data, function(item, k) {
  77. var player = item.player;
  78. var gameZone = player.game_zone;
  79. var tierRank = player.tier_rank;
  80. var href = "historyRecord.html?userId="+player.user_id+"&gameZone="+gameZone.pinyin + "&playerName=" + player.pn + "&serverName=" + gameZone.server_name;
  81. var tierNameCn = tierRank['tier']['name_cn'];
  82. var rankName = tierRank['rank'] ? tierRank['rank']['name'] : 0;
  83. %>
  84. <tr>
  85. <td width="50">
  86. <% if(item.idx == 1){%>
  87. <i class="rank-type rank-1"></i>
  88. <%} else if(item.idx == 2){%>
  89. <i class="rank-type rank-2"></i>
  90. <%} else if(item.idx == 3) {%>
  91. <i class="rank-type rank-3"></i>
  92. <%} else {%>
  93. <%=item.idx%>
  94. <%}%>
  95. </td>
  96. <td width="110"><%=player.pn%></td>
  97. <td width="110"><%=gameZone.alias%>&nbsp;<%=gameZone.server_name%></td>
  98. <td width="90"><%=item.win_rate%>%</td>
  99. <td width="90"><%=item.used_times%></td>
  100. <td width="90"><%=tierNameCn%> <%=rankName%>/<%=player.league_points%></td>
  101. <td width="90"><a href="<%=href%>" style="color:#408bcb;">查看比赛</a></td>
  102. </tr>
  103. <%});%>
  104. </script>
  105. <script src="js/jquery-1.11.1.min.js"></script>
  106. <script src="js/jquery-migrate-1.2.1.min.js"></script>
  107. <script src="js/underscore.js"></script>
  108. <script>
  109. $(function() {
  110. var HeroDetail = function() {
  111. this.baseUrl = "http://api.lolbox.duowan.com/api/v2/rank/win_rate/";
  112. this.$currentHero = $("#currentHero");
  113. this.heroEnname = getURLParam("hero");
  114. this.$heroDetail = $("#heroDetail");
  115. this.$heroDetailTemplate = $("#heroDetailTemplate");
  116. };
  117. HeroDetail.prototype = {
  118. constructor: HeroDetail,
  119. init: function() {
  120. var self = this;
  121. var hero = heroesList[this.heroEnname];
  122. this.$currentHero.html(hero.title + "(" + hero.displayName + ")");
  123. this._getData().done(function(data) {
  124. var list = data.results;
  125. if(list && list.length > 0) {
  126. self._render(list);
  127. $(".detail").html(data.rank_desc);
  128. }
  129. }).fail(function() {});
  130. },
  131. _getData: function() {
  132. var url = this.baseUrl + this.heroEnname + '/';
  133. return $.ajax({
  134. url: url,
  135. type: 'GET',
  136. dataType: 'jsonp'
  137. });
  138. },
  139. _render: function(data) {
  140. var template = _.template(this.$heroDetailTemplate.html());
  141. this.$heroDetail.html(template({
  142. data: data
  143. }));
  144. }
  145. };
  146. function getURLParam(name) {
  147. var value = location.search.match(new RegExp("[?&]" + name + "=([^&]*)(&?)","i"));
  148. return value ? decodeURIComponent(value[1]) : value;
  149. }
  150. new HeroDetail().init();
  151. });
  152. $("#scrollContent").niceScroll({cursorcolor:"#D9D9D9",cursorwidth:"8",cursoropacitymin:1,cursorborder:'none'});
  153. </script>
  154. <!--海度统计-->
  155. <script type="text/javascript">_hiido_no=0;_hiido_wid=["lbox"];</script>
  156. <script src="http://www.duowan.com/duowan.js" type="text/javascript"></script>
  157. <!--百度统计-->
  158. <script>
  159. var _hmt = _hmt || [];
  160. (function() {
  161. var hm = document.createElement("script");
  162. hm.src = "//hm.baidu.com/hm.js?72772dda37b1e926733138415981abcf";
  163. var s = document.getElementsByTagName("script")[0];
  164. s.parentNode.insertBefore(hm, s);
  165. })();
  166. </script>
  167. <!--[if gt IE 6]><!-->
  168. <script type="text/javascript">
  169. 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)}}}());
  170. </script>
  171. <!--<![endif]-->
  172. </body>
  173. </html>