Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tabulator-another-web
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
MyCard
tabulator-another-web
Commits
60951143
Commit
60951143
authored
Jun 04, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
4286fbcd
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
55 deletions
+60
-55
src/pages/tournament.vue
src/pages/tournament.vue
+38
-47
src/script/post.ts
src/script/post.ts
+16
-4
src/script/type.ts
src/script/type.ts
+6
-4
No files found.
src/pages/tournament.vue
View file @
60951143
This diff is collapsed.
Click to expand it.
src/script/post.ts
View file @
60951143
...
@@ -22,7 +22,7 @@ import {
...
@@ -22,7 +22,7 @@ import {
AllMatch
,
AllMatch
,
AllAPI
,
AllAPI
,
UserObject
,
UserObject
,
Tournament
AParticipan
t
Tournament
Ge
t
}
from
'
./type.ts
'
}
from
'
./type.ts
'
import
UniApp
from
'
./uniapp.ts
'
;
import
UniApp
from
'
./uniapp.ts
'
;
...
@@ -79,7 +79,7 @@ class TabulatorAPI {
...
@@ -79,7 +79,7 @@ class TabulatorAPI {
return
false
;
return
false
;
}
}
},
},
Find
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Tournament
AParticipan
t
>
=>
{
Find
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Tournament
Ge
t
>
=>
{
let
response
:
{
let
response
:
{
data
:
{
data
:
{
data
:
TournamentObject
;
data
:
TournamentObject
;
...
@@ -92,14 +92,22 @@ class TabulatorAPI {
...
@@ -92,14 +92,22 @@ class TabulatorAPI {
}
}
});
});
let
participants
:
Array
<
Participant
>
=
[];
let
participants
:
Array
<
Participant
>
=
[];
let
matches
:
Array
<
Match
>
=
[];
response
.
data
.
data
.
participants
.
forEach
((
i
:
ParticipantObject
)
=>
{
response
.
data
.
data
.
participants
.
forEach
((
i
:
ParticipantObject
)
=>
{
participants
.
push
(
new
Participant
(
i
));
participants
.
push
(
new
Participant
(
i
));
});
});
response
.
data
.
data
.
matches
.
forEach
((
i
:
MatchObject
)
=>
{
matches
.
push
(
new
Match
(
i
));
});
return
{
return
{
tournament
:
new
Tournament
(
response
.
data
.
data
),
tournament
:
new
Tournament
(
response
.
data
.
data
),
participant
:
{
participant
:
{
participants
:
participants
,
participants
:
participants
,
total
:
participants
.
length
total
:
participants
.
length
},
match
:
{
matches
:
matches
,
total
:
matches
.
length
}
}
};
};
}
}
...
@@ -110,6 +118,10 @@ class TabulatorAPI {
...
@@ -110,6 +118,10 @@ class TabulatorAPI {
participant
:
{
participant
:
{
participants
:
[],
participants
:
[],
total
:
0
total
:
0
},
match
:
{
matches
:
[],
total
:
0
}
}
};
};
}
}
...
@@ -496,14 +508,14 @@ class TabulatorAPI {
...
@@ -496,14 +508,14 @@ class TabulatorAPI {
})
})
return
{
return
{
total
:
response
.
data
.
total
,
total
:
response
.
data
.
total
,
matchs
:
matchs
match
e
s
:
matchs
};
};
}
}
catch
(
error
)
{
catch
(
error
)
{
console
.
error
(
error
);
console
.
error
(
error
);
return
{
return
{
total
:
0
,
total
:
0
,
matchs
:
[]
match
e
s
:
[]
};
};
}
}
},
},
...
...
src/script/type.ts
View file @
60951143
...
@@ -64,6 +64,7 @@ interface TournamentObject extends TournamentCreateObject {
...
@@ -64,6 +64,7 @@ interface TournamentObject extends TournamentCreateObject {
creator
:
number
;
creator
:
number
;
createdAt
:
string
;
createdAt
:
string
;
participants
:
Array
<
ParticipantObject
>
;
participants
:
Array
<
ParticipantObject
>
;
matches
:
Array
<
MatchObject
>
}
}
interface
TournamentFindObject
{
interface
TournamentFindObject
{
...
@@ -144,16 +145,17 @@ interface AllParticipant extends All {
...
@@ -144,16 +145,17 @@ interface AllParticipant extends All {
}
}
interface
AllMatch
extends
All
{
interface
AllMatch
extends
All
{
matchs
:
Array
<
Match
>
;
match
e
s
:
Array
<
Match
>
;
}
}
interface
AllAPI
extends
All
{
interface
AllAPI
extends
All
{
api
:
Array
<
ApiKey
>
;
api
:
Array
<
ApiKey
>
;
}
}
interface
Tournament
AParticipan
t
{
interface
Tournament
Ge
t
{
tournament
:
Tournament
|
undefined
;
tournament
:
Tournament
|
undefined
;
participant
:
AllParticipant
participant
:
AllParticipant
,
match
:
AllMatch
}
}
interface
UserObject
{
interface
UserObject
{
...
@@ -189,6 +191,6 @@ export {
...
@@ -189,6 +191,6 @@ export {
AllAPI
,
AllAPI
,
ruleSettings
,
ruleSettings
,
UserObject
,
UserObject
,
Tournament
AParticipan
t
,
Tournament
Ge
t
,
Deck
Deck
}
}
\ No newline at end of file
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