Toggle navigation
Toggle navigation
This project
Loading...
Sign in
오윤석
/
maplespec.ga
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
4
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
오윤석
2020-06-25 20:56:50 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
280c417a50acb8b4c787b579835e9283aa1a7c4e
280c417a
2 parents
7daef913
5ef1c7fa
Merge branch 'master' into develop
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
app/node/model/character.js
app/node/routes/character.js
app/web/src/routes/Character.svelte
app/node/model/character.js
View file @
280c417
...
...
@@ -119,6 +119,10 @@ const getCharacterInfo = async function(nickname, characterCode) {
}
});
if
(
stats
.
major
==
0
)
{
throw
new
Error
(
"no_major_stats"
)
}
return
{
character
:
character
,
stats
:
stats
...
...
@@ -129,6 +133,8 @@ const getCharacterInfo = async function(nickname, characterCode) {
return
-
1
;
else
if
(
error
.
message
==
"game_checking"
)
return
-
2
;
else
if
(
error
.
message
==
"no_major_stats"
)
return
-
3
;
else
return
-
999
;
}
...
...
app/node/routes/character.js
View file @
280c417
...
...
@@ -28,6 +28,10 @@ module.exports = {
// 점검중
res
.
status
(
503
).
send
();
return
;
}
else
if
(
characterInfo
==
-
3
)
{
// 데이터를 받아오지 못함
res
.
status
(
502
).
send
();
return
;
}
else
if
(
characterInfo
<
0
)
{
res
.
status
(
400
).
send
();
return
;
...
...
@@ -64,6 +68,12 @@ module.exports = {
}
};
if
(
result
.
analysis
.
default
.
stats
.
major
.
pure
==
null
)
{
// 데이터를 받아오지 못해 분석 실패
res
.
status
(
502
).
send
();
return
;
}
console
.
log
(
JSON
.
stringify
(
result
));
res
.
send
(
result
);
}
...
...
app/web/src/routes/Character.svelte
View file @
280c417
...
...
@@ -113,6 +113,10 @@
}
}).then(function(response) {
character = response.data;
if(character.analysis.default.stats.major.pure == null) {
M.toast({html:"메이플스토리로부터 데이터를 받아오지 못했습니다.<br><br>잠시 후에 시도해주세요."});
push('/');
}
isCharacterLoading = true;
}).catch(function(error) {
switch(error.response.status) {
...
...
@@ -125,6 +129,9 @@
window.open("https://maplestory.nexon.com/MyMaple/Account/Character/Visibility");
}, 2000);
break;
case 502:
M.toast({html:"메이플스토리로부터 데이터를 받아오지 못했습니다.<br><br>잠시 후에 시도해주세요."});
break;
case 503:
M.toast({html:"메이플스토리가 점검중입니다."});
break;
...
...
Please
register
or
login
to post a comment