recordDataLayer.tmpl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. <%
  2. var idx = 1;
  3. data = data.player_game_list[0];
  4. %>
  5. <div id="data-layer" class="data-layer">
  6. <%
  7. var win = data.team_win.player_champions;
  8. if(win && win.length > 0) {
  9. _.each(win, function(player) {
  10. var summonerNameFiltered, summonerTitle, leaverFlag, urlAvatar, urlSkill1, urlSkill2,MVPEva,isMVP;
  11. var playerInfo = player.player;
  12. var champion = player.champion;
  13. var spells = player.spells;
  14. // 实际是 playerName
  15. summonerNameFiltered = playerInfo.pn;
  16. summonerTitle =champion.display_name;
  17. leaverFlag = player.is_deserter ? "<span class='red'>(逃)</span>" : "";
  18. urlAvatar = staticImg + '/champions/' + champion.name + '_40x40.jpg';
  19. if (spells[0] && spells[0].id) {
  20. urlSkill1 = spells[0].url_img;
  21. } else {
  22. urlSkill1 = null;
  23. }
  24. if (spells[1] && spells[1].id) {
  25. urlSkill2 = spells[1].url_img;
  26. } else {
  27. urlSkill2 = null;
  28. }
  29. var TOTAL_KILLED = player.total_killed;
  30. var TOTAL_DEATH = player.total_death;
  31. var TOTAL_ASSIST = player.total_assist;
  32. var GOLD_EARNED = player.gold_earned_in_k;
  33. var TOTAL_TIME_SPENT_DEAD = player.total_time_spent_dead;
  34. var PHYSICAL_DAMAGE_TAKEN = player.physical_damage_taken;
  35. var MAGIC_DAMAGE_TAKEN = player.magic_damage_taken;
  36. var TRUE_DAMAGE_TAKEN = player.true_damage_taken;
  37. var TOTAL_DAMAGE_DEALT_TO_BUILDINGS = player.total_damage_dealt_to_buildings;
  38. var MINIONS_KILLED = player.total_minions_killed;
  39. var TOTAL_TIME_CROWD_CONTROL_DEALT = player.total_neutral_minions_killed;
  40. var SIGHT_WARDS_BOUGHT_IN_GAME = player.sight_wards_bought_in_game;
  41. var TURRETS_KILLED = player.total_turrets_killed;
  42. var BARRACKS_KILLED = player.total_barracks_killed;
  43. var WARD_PLACED = player.total_ward_placed;
  44. var WARD_KILLED = player.total_ward_killed;
  45. var LARGEST_KILLING_SPREE = player.largest_killing_spree;
  46. var LARGEST_MULTI_KILL = player.largest_multi_kill;
  47. var LARGEST_CRITICAL_STRIKE = player.largest_critical_strike || '-';
  48. var TOTAL_HEAL = player.total_heal || '-';
  49. var TOTAL_DAMAGE_DEALT = player.total_damage_dealt;
  50. var TOTAL_DAMAGE_TAKEN = player.total_damage_taken;
  51. var TOTAL_DAMAGE_DEALT_TO_CHAMPIONS = player.total_damage_dealt_to_champions;
  52. var PHYSICAL_DAMAGE_DEALT_TO_CHAMPIONS = player.total_physical_damage_dealt_to_champions;
  53. var MAGIC_DAMAGE_DEALT_TO_CHAMPIONS = player.total_magic_damage_dealt_to_champions;
  54. var TRUE_DAMAGE_DEALT_TO_CHAMPIONS = player.total_true_damage_dealt_to_champions;
  55. var NEUTRAL_MINIONS_KILLED_TOTAL = player.total_neutral_minions_killed;
  56. MVPEva = player.evaluate_in_game;
  57. isMVP = player['flag_mvp_carry'] == 1 ? true : false;
  58. isHope = player['flag_mvp_carry'] == 2 ? true : false;
  59. var isMVPOrHope = '';
  60. if (isHope) {
  61. isMVPOrHope = 'tip-big-avatar--stronger';
  62. } else if (isMVP) {
  63. isMVPOrHope = 'tip-big-avatar--mvp';
  64. }
  65. idx ++;
  66. %>
  67. <div class="layer">
  68. <div class="mod-tips-top">
  69. <div class="tip-topleft">
  70. <p class="tip-user-name">
  71. <%=summonerNameFiltered%>
  72. </p>
  73. <a href="javascript:;"
  74. class="tip-big-avatar <%=isMVPOrHope%>"><i></i><img
  75. src="<%=urlAvatar%>"></a>
  76. <div class="tip-user-detail">
  77. <span class="tip-tip-user-name2"><%=summonerTitle%></span>
  78. <%
  79. if (player['is_bot']) {} else {
  80. %>
  81. <p class="tip-small-avatar">
  82. <% if (urlSkill1) { %>
  83. <img src="<%=urlSkill1%>" />
  84. <% } %>
  85. <% if (urlSkill2) { %>
  86. <img src="<%=urlSkill2%>" />
  87. <% } %>
  88. </p>
  89. <% } %>
  90. </div>
  91. </div>
  92. <div class="tip-topright-wrap">
  93. <div class="tip-topright">
  94. <p>
  95. <em class="zj-zdl zj-s"></em>...
  96. </p>
  97. <p class="zj-blue">...</p>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="mod-tips-main">
  102. <table class="mod-tips-data">
  103. <% if (MVPEva) { %>
  104. <tr>
  105. <td class="label" style="color: #ff9900;">战局评分:</td>
  106. <td colspan="3" style="color: #ff9900;"><%=MVPEva%></td>
  107. </tr>
  108. <% } %>
  109. <tr>
  110. <td class="label">击杀:</td>
  111. <td><%=TOTAL_KILLED%></td>
  112. <td class="label">死亡:</td>
  113. <td><%=TOTAL_DEATH%></td>
  114. </tr>
  115. <tr>
  116. <td class="label">助攻:</td>
  117. <td><%=TOTAL_ASSIST%></td>
  118. <td class="label">金钱:</td>
  119. <td><%=GOLD_EARNED%></td>
  120. </tr>
  121. <tr>
  122. <td class="label">最高连杀:</td>
  123. <td><%=LARGEST_KILLING_SPREE%></td>
  124. <td class="label">最高多杀:</td>
  125. <td><%=LARGEST_MULTI_KILL%></td>
  126. </tr>
  127. <tr>
  128. <td class="label">最大暴击:</td>
  129. <td><%=LARGEST_CRITICAL_STRIKE%></td>
  130. <td class="label">总治疗:</td>
  131. <td><%=TOTAL_HEAL%></td>
  132. </tr>
  133. <tr>
  134. <td class="label">击杀小兵:</td>
  135. <td><%=MINIONS_KILLED%></td>
  136. <td class="label">击杀野怪:</td>
  137. <td><%=NEUTRAL_MINIONS_KILLED_TOTAL%></td>
  138. </tr>
  139. <tr>
  140. <td class="label">推塔:</td>
  141. <td><%=TURRETS_KILLED%></td>
  142. <td class="label">兵营:</td>
  143. <td><%=BARRACKS_KILLED%></td>
  144. </tr>
  145. <tr>
  146. <td class="label">对建筑伤害:</td>
  147. <td><%=TOTAL_DAMAGE_DEALT_TO_BUILDINGS%></td>
  148. <td class="label">购买真眼:</td>
  149. <td><%=SIGHT_WARDS_BOUGHT_IN_GAME%></td>
  150. </tr>
  151. <tr>
  152. <td class="label">放眼数:</td>
  153. <td><%=WARD_PLACED%></td>
  154. <td class="label">排眼数:</td>
  155. <td><%=WARD_KILLED%></td>
  156. </tr>
  157. </table>
  158. <p>
  159. <span class="label">给对方英雄造成总伤害:</span>
  160. <%=TOTAL_DAMAGE_DEALT_TO_CHAMPIONS%>
  161. </p>
  162. <p>
  163. <span class="label">承受伤害:</span>
  164. <%=TOTAL_DAMAGE_TAKEN%>
  165. </p>
  166. <!-- <div class="tip-btn-group">
  167. <a href="http://www.huya.com/g/lol" target="_blank">直播</a>
  168. <a href="http://db.duowan.com/static/lolnewcz/list.html?name=<%=champion.name%>&flag=1&p=1">出装</a>
  169. </div> -->
  170. </div>
  171. </div>
  172. <%
  173. });
  174. }
  175. %>
  176. <%
  177. var loser = data.team_lose.player_champions;
  178. if(loser && loser.length > 0) {
  179. _.each(loser, function(player) {
  180. var summonerNameFiltered, summonerTitle, leaverFlag, urlAvatar, urlSkill1, urlSkill2,MVPEva,isMVP;
  181. var playerInfo = player.player;
  182. var champion = player.champion;
  183. var spells = player.spells;
  184. // 实际是 playerName
  185. summonerNameFiltered = playerInfo.pn;
  186. summonerTitle =champion.display_name;
  187. leaverFlag = player.is_deserter ? "<span class='red'>(逃)</span>" : "";
  188. urlAvatar = staticImg + '/champions/' + champion.name + '_40x40.jpg';
  189. if (spells[0] && spells[0].id) {
  190. urlSkill1 = spells[0].url_img;
  191. } else {
  192. urlSkill1 = null;
  193. }
  194. if (spells[1] && spells[1].id) {
  195. urlSkill2 = spells[1].url_img;
  196. } else {
  197. urlSkill2 = null;
  198. }
  199. var TOTAL_KILLED = player.total_killed;
  200. var TOTAL_DEATH = player.total_death;
  201. var TOTAL_ASSIST = player.total_assist;
  202. var GOLD_EARNED = player.gold_earned_in_k;
  203. var TOTAL_TIME_SPENT_DEAD = player.total_time_spent_dead;
  204. var PHYSICAL_DAMAGE_TAKEN = player.physical_damage_taken;
  205. var MAGIC_DAMAGE_TAKEN = player.magic_damage_taken;
  206. var TRUE_DAMAGE_TAKEN = player.true_damage_taken;
  207. var TOTAL_DAMAGE_DEALT_TO_BUILDINGS = player.total_damage_dealt_to_buildings;
  208. var MINIONS_KILLED = player.total_minions_killed;
  209. var TOTAL_TIME_CROWD_CONTROL_DEALT = player.total_neutral_minions_killed;
  210. var SIGHT_WARDS_BOUGHT_IN_GAME = player.sight_wards_bought_in_game;
  211. var TURRETS_KILLED = player.total_turrets_killed;
  212. var BARRACKS_KILLED = player.total_barracks_killed;
  213. var WARD_PLACED = player.total_ward_placed;
  214. var WARD_KILLED = player.total_ward_killed;
  215. var LARGEST_KILLING_SPREE = player.largest_killing_spree;
  216. var LARGEST_MULTI_KILL = player.largest_multi_kill;
  217. var LARGEST_CRITICAL_STRIKE = player.largest_critical_strike || '-';
  218. var TOTAL_HEAL = player.total_heal || '-';
  219. var TOTAL_DAMAGE_DEALT = player.total_damage_dealt;
  220. var TOTAL_DAMAGE_TAKEN = player.total_damage_taken;
  221. var TOTAL_DAMAGE_DEALT_TO_CHAMPIONS = player.total_damage_dealt_to_champions;
  222. var PHYSICAL_DAMAGE_DEALT_TO_CHAMPIONS = player.total_physical_damage_dealt_to_champions;
  223. var MAGIC_DAMAGE_DEALT_TO_CHAMPIONS = player.total_magic_damage_dealt_to_champions;
  224. var TRUE_DAMAGE_DEALT_TO_CHAMPIONS = player.total_true_damage_dealt_to_champions;
  225. var NEUTRAL_MINIONS_KILLED_TOTAL = player.total_neutral_minions_killed;
  226. MVPEva = player.evaluate_in_game;
  227. isMVP = player['flag_mvp_carry'] == 1 ? true : false;
  228. isHope = player['flag_mvp_carry'] == 2 ? true : false;
  229. var isMVPOrHope = '';
  230. if (isHope) {
  231. isMVPOrHope = 'tip-big-avatar--stronger';
  232. } else if (isMVP) {
  233. isMVPOrHope = 'tip-big-avatar--mvp';
  234. }
  235. idx ++;
  236. %>
  237. <div class="layer">
  238. <div class="mod-tips-top">
  239. <div class="tip-topleft">
  240. <p class="tip-user-name">
  241. <%=summonerNameFiltered%>
  242. </p>
  243. <a href="javascript:;"
  244. class="tip-big-avatar <%=isMVPOrHope%>"><i></i><img
  245. src="<%=urlAvatar%>"></a>
  246. <div class="tip-user-detail">
  247. <span class="tip-tip-user-name2"><%=summonerTitle%></span>
  248. <%
  249. if (player['is_bot']) {} else {
  250. %>
  251. <p class="tip-small-avatar">
  252. <% if (urlSkill1) { %>
  253. <img src="<%=urlSkill1%>" />
  254. <% } %>
  255. <% if (urlSkill2) { %>
  256. <img src="<%=urlSkill2%>" />
  257. <% } %>
  258. </p>
  259. <% } %>
  260. </div>
  261. </div>
  262. <div class="tip-topright-wrap">
  263. <div class="tip-topright">
  264. <p>
  265. <em class="zj-zdl zj-s"></em>...
  266. </p>
  267. <p class="zj-blue">...</p>
  268. </div>
  269. </div>
  270. </div>
  271. <div class="mod-tips-main">
  272. <table class="mod-tips-data">
  273. <% if (MVPEva) { %>
  274. <tr>
  275. <td class="label" style="color: #ff9900;">战局评分:</td>
  276. <td colspan="3" style="color: #ff9900;"><%=MVPEva%></td>
  277. </tr>
  278. <% } %>
  279. <tr>
  280. <td class="label">击杀:</td>
  281. <td><%=TOTAL_KILLED%></td>
  282. <td class="label">死亡:</td>
  283. <td><%=TOTAL_DEATH%></td>
  284. </tr>
  285. <tr>
  286. <td class="label">助攻:</td>
  287. <td><%=TOTAL_ASSIST%></td>
  288. <td class="label">金钱:</td>
  289. <td><%=GOLD_EARNED%></td>
  290. </tr>
  291. <tr>
  292. <td class="label">最高连杀:</td>
  293. <td><%=LARGEST_KILLING_SPREE%></td>
  294. <td class="label">最高多杀:</td>
  295. <td><%=LARGEST_MULTI_KILL%></td>
  296. </tr>
  297. <tr>
  298. <td class="label">最大暴击:</td>
  299. <td><%=LARGEST_CRITICAL_STRIKE%></td>
  300. <td class="label">总治疗:</td>
  301. <td><%=TOTAL_HEAL%></td>
  302. </tr>
  303. <tr>
  304. <td class="label">击杀小兵:</td>
  305. <td><%=MINIONS_KILLED%></td>
  306. <td class="label">击杀野怪:</td>
  307. <td><%=NEUTRAL_MINIONS_KILLED_TOTAL%></td>
  308. </tr>
  309. <tr>
  310. <td class="label">推塔:</td>
  311. <td><%=TURRETS_KILLED%></td>
  312. <td class="label">兵营:</td>
  313. <td><%=BARRACKS_KILLED%></td>
  314. </tr>
  315. <tr>
  316. <td class="label">对建筑伤害:</td>
  317. <td><%=TOTAL_DAMAGE_DEALT_TO_BUILDINGS%></td>
  318. <td class="label">购买真眼:</td>
  319. <td><%=SIGHT_WARDS_BOUGHT_IN_GAME%></td>
  320. </tr>
  321. <tr>
  322. <td class="label">放眼数:</td>
  323. <td><%=WARD_PLACED%></td>
  324. <td class="label">排眼数:</td>
  325. <td><%=WARD_KILLED%></td>
  326. </tr>
  327. </table>
  328. <p>
  329. <span class="label">给对方英雄造成总伤害:</span>
  330. <%=TOTAL_DAMAGE_DEALT_TO_CHAMPIONS%>
  331. </p>
  332. <p>
  333. <span class="label">承受伤害:</span>
  334. <%=TOTAL_DAMAGE_TAKEN%>
  335. </p>
  336. <!--<div class="tip-btn-group">
  337. <a href="http://www.huya.com/g/lol" target="_blank">直播</a>
  338. <a href="http://db.duowan.com/static/lolnewcz/list.html?name=<%=champion.name%>&flag=1&p=1">出装</a>
  339. </div>-->
  340. </div>
  341. </div>
  342. <%
  343. });
  344. }
  345. %>
  346. </div>