Toggle navigation
Toggle navigation
This project
Loading...
Sign in
황성연
/
lolinfo.gg
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
황성연
2020-06-21 16:36:25 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f1b289e0c30e5364f8e1aa89d89f4c8727ce950d
f1b289e0
1 parent
d25ad58e
대전기록 이미지 불러오기
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
9 deletions
lolinfo/router/mytest.js
lolinfo/router/mytest.js
View file @
f1b289e
...
...
@@ -241,7 +241,7 @@ module.exports = function(app){
var
spec_selectedChamp_image
=
new
Array
();
var
spec_summonerName
=
new
Array
();
var
spec_spellId
=
new
Array
();
var
spec_spellimage
=
new
Array
();
var
spec_spell
_
image
=
new
Array
();
for
(
var
i
=
0
;
i
<
10
;
i
++
){
spec_summonerName
.
push
(
spec_participants
[
i
].
summonerName
);
spec_spellId
.
push
(
spec_participants
[
i
].
spell1Id
);
...
...
@@ -262,7 +262,7 @@ module.exports = function(app){
for
(
var
i
=
0
;
i
<
20
;
i
++
)
{
for
(
key
in
spell
){
if
(
spell
.
hasOwnProperty
(
key
)
&&
spell
[
key
].
key
==
spec_spellId
[
i
]){
spec_spellimage
.
push
(
"http://ddragon.leagueoflegends.com/cdn/10.12.1/img/spell/"
+
spell
[
key
].
id
+
".png"
);
spec_spell
_
image
.
push
(
"http://ddragon.leagueoflegends.com/cdn/10.12.1/img/spell/"
+
spell
[
key
].
id
+
".png"
);
}
}
}
...
...
@@ -295,11 +295,12 @@ module.exports = function(app){
var
match1_selectedChamp
=
new
Array
();
var
match1_spellId
=
new
Array
();
var
match1_summonerName
=
new
Array
();
var
match1_kills
=
new
Array
();
var
match1_deaths
=
new
Array
();
var
match1_assists
=
new
Array
();
var
match1_kda
=
new
Array
();
var
match1_bannedChamp_image
=
new
Array
();
var
match1_selectedChamp_image
=
new
Array
();
var
match1_spell_image
=
new
Array
();
for
(
var
i
=
0
;
i
<
2
;
i
++
){
var
temp
=
match1_teams
[
i
].
bans
;
for
(
var
j
=
0
;
j
<
5
;
j
++
){
...
...
@@ -312,9 +313,6 @@ module.exports = function(app){
match1_spellId
.
push
(
match1_participants
[
i
].
spell1Id
);
match1_spellId
.
push
(
match1_participants
[
i
].
spell2Id
);
match1_summonerName
.
push
((
match1_participantIdentities
[
i
].
player
).
summonerName
);
match1_kills
.
push
((
match1_participants
[
i
].
stats
).
kills
);
match1_deaths
.
push
((
match1_participants
[
i
].
stats
).
deaths
);
match1_assists
.
push
((
match1_participants
[
i
].
stats
).
assists
);
var
obj
=
{
'k'
:
(
match1_participants
[
i
].
stats
).
kills
,
'd'
:
(
match1_participants
[
i
].
stats
).
deaths
,
...
...
@@ -324,7 +322,27 @@ module.exports = function(app){
}
console
.
log
(
match1_kda
);
for
(
var
i
=
0
;
i
<
10
;
i
++
)
{
for
(
key
in
champion
)
{
if
(
champion
.
hasOwnProperty
(
key
)
&&
champion
[
key
].
key
==
match1_bannedChamp
[
i
])
{
match1_bannedChamp_image
.
push
(
"http://ddragon.leagueoflegends.com/cdn/10.11.1/img/champion/"
+
champion
[
key
].
id
+
".png"
);
}
if
(
champion
.
hasOwnProperty
(
key
)
&&
champion
[
key
].
key
==
match1_selectedChamp
[
i
])
{
match1_selectedChamp_image
.
push
(
"http://ddragon.leagueoflegends.com/cdn/10.11.1/img/champion/"
+
champion
[
key
].
id
+
".png"
);
}
}
}
for
(
var
i
=
0
;
i
<
20
;
i
++
)
{
for
(
key
in
spell
){
if
(
spell
.
hasOwnProperty
(
key
)
&&
spell
[
key
].
key
==
match1_spellId
[
i
]){
match1_spell_image
.
push
(
"http://ddragon.leagueoflegends.com/cdn/10.12.1/img/spell/"
+
spell
[
key
].
id
+
".png"
);
}
}
}
console
.
log
(
match1_bannedChamp_image
);
console
.
log
(
match1_selectedChamp_image
);
console
.
log
(
match1_spell_image
);
var
match2Url
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
match_gameId
[
1
]
+
"?api_key="
+
apikey
;
...
...
Please
register
or
login
to post a comment