Showing
2 changed files
with
9 additions
and
0 deletions
... | @@ -151,6 +151,13 @@ var rotation_champ = new Array(); | ... | @@ -151,6 +151,13 @@ var rotation_champ = new Array(); |
151 | var gameId = info_matchList["matches"][0]["gameId"]; | 151 | var gameId = info_matchList["matches"][0]["gameId"]; |
152 | var championId = info_matchList["matches"][0]["champion"]; | 152 | var championId = info_matchList["matches"][0]["champion"]; |
153 | console.log(champ_name[0]); | 153 | console.log(champ_name[0]); |
154 | + for (var i = 0; i < champ_id.length; i++) { | ||
155 | + for (j in champion) { | ||
156 | + if (champion[j]["key"] == championId) { | ||
157 | + picture = "http://ddragon.leagueoflegends.com/cdn/9.23.1/img/champion/" + champion[j]["id"] + ".png"; | ||
158 | + } | ||
159 | + } | ||
160 | + } | ||
154 | } | 161 | } |
155 | 162 | ||
156 | var matchUrl = "https://kr.api.riotgames.com/lol/match/v4/matches/" + urlenconde(gameId) + "?api_key=" + apikey; | 163 | var matchUrl = "https://kr.api.riotgames.com/lol/match/v4/matches/" + urlenconde(gameId) + "?api_key=" + apikey; |
... | @@ -238,6 +245,7 @@ var rotation_champ = new Array(); | ... | @@ -238,6 +245,7 @@ var rotation_champ = new Array(); |
238 | c_kills : kills, | 245 | c_kills : kills, |
239 | c_deaths : deaths, | 246 | c_deaths : deaths, |
240 | c_assists : assists, | 247 | c_assists : assists, |
248 | + c_picture : picture | ||
241 | }); | 249 | }); |
242 | }); | 250 | }); |
243 | }); | 251 | }); | ... | ... |
... | @@ -54,6 +54,7 @@ | ... | @@ -54,6 +54,7 @@ |
54 | <img src= <%=c_rotation[i]%> width=50, height=50> | 54 | <img src= <%=c_rotation[i]%> width=50, height=50> |
55 | <% } %> | 55 | <% } %> |
56 | <br></br> | 56 | <br></br> |
57 | + <img src = <%= c_picture%> width = 50, height = 50> | ||
57 | <%= c_kills + " / " + c_deaths + " / " + c_assists %> | 58 | <%= c_kills + " / " + c_deaths + " / " + c_assists %> |
58 | </div> | 59 | </div> |
59 | </body> | 60 | </body> | ... | ... |
-
Please register or login to post a comment