Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
37f3c1bb
Commit
37f3c1bb
authored
Jun 05, 2017
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
尝试修复匹配积分不正确的问题
parent
132eef84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
app/apps.service.ts
app/apps.service.ts
+5
-3
app/ygopro.component.ts
app/ygopro.component.ts
+9
-7
No files found.
app/apps.service.ts
View file @
37f3c1bb
...
...
@@ -83,10 +83,12 @@ export class AppsService {
let
appsURL
=
'
https://api.mycard.moe/apps.json
'
;
let
keysURL
=
'
https://api.mycard.moe/keys
'
;
try
{
let
params
=
new
URLSearchParams
();
params
.
set
(
'
user_id
'
,
this
.
loginService
.
user
.
email
);
let
data
=
await
this
.
http
.
get
(
appsURL
).
map
((
response
)
=>
response
.
json
()).
toPromise
();
let
keys_data
=
await
this
.
http
.
get
(
keysURL
,
{
search
:
params
}).
map
((
response
)
=>
response
.
json
()).
toPromise
();
let
keys_data
=
await
this
.
http
.
get
(
keysURL
,
{
search
:
{
user_id
:
this
.
loginService
.
user
.
email
}
}).
map
((
response
)
=>
response
.
json
()).
toPromise
();
for
(
let
item
of
keys_data
)
{
let
app
=
data
.
find
((
app
:
any
)
=>
app
.
id
===
item
.
app_id
);
if
(
app
)
{
...
...
app/ygopro.component.ts
View file @
37f3c1bb
...
...
@@ -385,10 +385,12 @@ export class YGOProComponent implements OnInit, OnDestroy {
this
.
replays
=
await
this
.
get_replays
();
// https://mycard.moe/ygopro/api/user?username=ozxdno
let
params
=
new
URLSearchParams
();
params
.
set
(
'
username
'
,
this
.
loginService
.
user
.
username
);
try
{
let
points
=
await
this
.
http
.
get
(
'
https://mycard.moe/ygopro/api/user
'
,
{
search
:
params
})
let
points
=
await
this
.
http
.
get
(
'
https://mycard.moe/ygopro/api/user
'
,
{
search
:
{
username
:
this
.
loginService
.
user
.
username
}
})
.
map
((
response
)
=>
response
.
json
())
.
toPromise
();
this
.
points
.
emit
(
points
);
...
...
@@ -586,14 +588,14 @@ export class YGOProComponent implements OnInit, OnDestroy {
let
headers
=
new
Headers
();
headers
.
append
(
'
Authorization
'
,
'
Basic
'
+
Buffer
.
from
(
this
.
loginService
.
user
.
username
+
'
:
'
+
this
.
loginService
.
user
.
external_id
).
toString
(
'
base64
'
));
let
search
=
new
URLSearchParams
();
search
.
set
(
'
arena
'
,
arena
);
search
.
set
(
'
locale
'
,
this
.
settingsService
.
getLocale
());
match_started_at
=
new
Date
();
this
.
matching_arena
=
matching_arena
=
arena
;
this
.
matching
=
matching
=
this
.
http
.
post
(
'
https://api.mycard.moe/ygopro/match
'
,
null
,
{
headers
:
headers
,
search
:
search
search
:
{
arena
,
locale
:
this
.
settingsService
.
getLocale
()
}
}).
map
(
response
=>
response
.
json
())
.
subscribe
((
data
)
=>
{
this
.
join
(
data
[
'
password
'
],
{
address
:
data
[
'
address
'
],
port
:
data
[
'
port
'
]
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment