personalInfo.tmpl 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!-- 用户信息渲染模板 -->
  2. <%
  3. var tierName = data.tier_rank.tier['const'] > 0 ? data.tier_rank.tier.name_cn + data.tier_rank.rank.name : '无段位'
  4. %>
  5. <div class="info">
  6. <div class="avatar">
  7. <a href="<%=data.global.href%>" class="stat-sign" stat-sign="stand" stat-desc="点击/战绩页">
  8. <img src="<%= staticImg + '/profile_icons/' + data.icon + '.jpg' %>" />
  9. </a>
  10. <div class="p_level"><%=data.level%></div>
  11. <!--<img src="img/achievement/placeholder.png" class="userMedal">-->
  12. </div>
  13. <div class="text">
  14. <div class="name-info clearfix">
  15. <a class="name" href="javascript:;" title="<%=data.pn%>"><%=data.pn%></a>
  16. <span class="name-info__nameServer">(<%=data.game_zone.alias%>)</span>
  17. <span class="userInfo-common__focus <%=data.isSelf ? 'hide' : ''%>">
  18. <%if(data.followed) {%>
  19. <a class="attention already" data-action="removeFocus"></a>
  20. <%} else {%>
  21. <a class="attention" data-action="addFocus"></a>
  22. <%} %>
  23. <a class="btn-copy" id="copy-button" data-clipboard-text="<%=data.pn%>">复制名字</a>
  24. </span>
  25. </div>
  26. <div class="more-info">
  27. <span><%=tierName%></span>
  28. <span class="line-small"></span>
  29. <span>点赞 <%=data.like%></span>
  30. <span class="line-small"></span>
  31. <span class="blacklist-content2">
  32. <label>拉黑 <%=data.unlike%></label>
  33. </span>
  34. <!-- <span class="blacklist">隐藏拉黑</span> -->
  35. </div>
  36. </div>
  37. </div>
  38. <!-- 段位信息 -->
  39. <div class="duan-wei clearfix">
  40. <div class="icon-fighting"></div>
  41. <p class="duan-wei-msg"><%=data.box_score%></p>
  42. </div>
  43. <!-- 常用英雄列表 -->
  44. <div class="user-hero__box">
  45. <div class="user-hero__header clearfix">
  46. <h3>常用英雄</h3>
  47. <!-- 更多常用英雄URL -->
  48. <%
  49. var moreHeroURL = ['championsStat.html?serverName=', data.game_zone.server_name, '&playerName=', data.pn, '&userId=', data.user_id, '&gameZone=', data.game_zone.pinyin].join('');
  50. var historyRecordURL = ['historyRecord.html?serverName=', data.game_zone.server_name, '&playerName=', data.pn, '&userId=', data.user_id, '&gameZone=', data.game_zone.pinyin].join('');
  51. %>
  52. <a href="<%= moreHeroURL %>">更多》</a>
  53. </div>
  54. <ul class="user-hero__list clearfix">
  55. <% var heroListData = data.champion_performance_list.slice(0,5);
  56. _.each(heroListData, function(item, i){ %>
  57. <li>
  58. <a href="<%= historyRecordURL %>&championId=<%= item.champion.id %>">
  59. <img src="<%= staticImg + '/champions/' + item.champion.name + '_40x40.jpg' %>">
  60. <div class="user-hero__mask"></div>
  61. <div class="user-hero__info">
  62. <p class="user-hero__info--title">胜率</p>
  63. <p><%= item.win_rate %>%</p>
  64. <div class="user-hero__info--tips">
  65. <p>最近场次: <%= item.times %></p>
  66. </div>
  67. </div>
  68. </a>
  69. </li>
  70. <% }); %>
  71. </ul>
  72. </div>