Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김세윤
/
LOL_findgg
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김환
2020-11-26 23:35:16 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
2405bb4c8a3dae402c7d281fdffcda56ffb4ecfb
2405bb4c
2 parents
6002069c
d9037d2b
conflict 해결
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
RUTROLL/router/Test.js
RUTROLL/router/main.js
RUTROLL/views/index.ejs
RUTROLL/router/Test.js
View file @
2405bb4
...
...
@@ -4,6 +4,7 @@ var request = require("request");
var
urlenconde
=
require
(
'urlencode'
);
var
apikey
=
"RGAPI-e4aabf85-2067-48cb-82ab-39bdf7c07325"
//api
var
profileIconId
;
//아이콘 번호
var
revisionDate
;
//수정날짜
var
id
;
//소환사ID
...
...
@@ -149,7 +150,7 @@ var rotation_champ = new Array();
var
temp_name
;
var
temp_point
;
var
temp_pic
;
for
(
var
i
=
0
;
i
<
champ_id
.
length
-
1
;
i
++
){
for
(
var
i
=
0
;
i
<
champ_id
.
length
-
1
;
i
++
){
//챔피언 포인트 순으로 sorting
for
(
var
j
=
i
+
1
;
j
<
champ_id
.
length
-
1
;
j
++
)
if
(
champ_point
[
i
]
<
champ_point
[
j
]){
temp_id
=
champ_id
[
i
];
...
...
@@ -197,7 +198,7 @@ var rotation_champ = new Array();
res
.
render
(
'index'
,
{
title
:
req
.
params
.
username
,
res
.
render
(
'index'
,
{
title
:
req
.
params
.
username
,
//데이터를 ejs로 넘길 때 사용
c_id
:
champ_id
,
c_name
:
champ_name
,
c_point
:
champ_point
,
...
...
RUTROLL/router/main.js
View file @
2405bb4
...
...
@@ -2,7 +2,7 @@ module.exports = function(app){
var
request
=
require
(
"request"
);
var
urlenconde
=
require
(
'urlencode'
);
var
apikey
=
"RGAPI-
df870784-f399-4104-bfbb-1b209aeb597f
"
//api
var
apikey
=
"RGAPI-
4591bbaf-8e3f-4afa-91c2-359b66a402b7
"
//api
var
profileIconId
;
//아이콘 번호
var
revisionDate
;
//수정날짜
...
...
@@ -45,7 +45,7 @@ var matches; //경기정보
var
champ_pic
=
new
Array
();
var
champions_length
=
Object
.
keys
(
champions
).
length
;
for
(
var
i
=
0
;
i
<
champions_length
;
i
++
){
for
(
var
i
=
0
;
i
<
champions_length
;
i
++
){
//챔피언 포인트 계산 식
champ_point
[
i
]
=
(
champions
[
i
][
"stats"
][
"totalSessionsWon"
]
/
champions
[
i
][
"stats"
][
"totalSessionsPlayed"
]
*
200
)
+
((
champions
[
i
][
"stats"
][
"totalAssists"
]
+
champions
[
i
][
"stats"
][
"totalChampionKills"
])
/
champions
[
i
][
"stats"
][
"totalDeathsPerSession"
]
*
100
)
+
(
champions
[
i
][
"stats"
][
"totalSessionsPlayed"
]
*
3
);
...
...
RUTROLL/views/index.ejs
View file @
2405bb4
...
...
@@ -101,7 +101,7 @@
<div
class=
"center"
>
<img
src=
<%=c_pic[i]%
>
width=50, height=50>
<
%= c_name[i] %>
<
%= "point: " +
(1000000/c_point[i]).toFixed(2)
%>
<
%= "point: " +
c_point[i]
%>
<
% } %>
</div>
...
...
Please
register
or
login
to post a comment