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
43c8d847
Commit
43c8d847
authored
Jun 20, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9ae485d8
Pipeline
#37881
passed with stages
in 4 minutes and 49 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
18 deletions
+22
-18
src/pages/tabulator.vue
src/pages/tabulator.vue
+2
-0
src/pages/tournament.vue
src/pages/tournament.vue
+2
-4
src/script/participant.ts
src/script/participant.ts
+1
-1
src/script/post.ts
src/script/post.ts
+16
-12
src/script/uniapp.ts
src/script/uniapp.ts
+1
-1
No files found.
src/pages/tabulator.vue
View file @
43c8d847
...
...
@@ -445,6 +445,7 @@
emitter
.
on
(
Const
.
tournamentReload
,
tournament
.
init
);
// @ts-ignore
emitter
.
on
(
Const
.
updateRounds
,
tournament
.
updateRounds
);
// @ts-ignore
emitter
.
on
(
Const
.
createOff
,
creator
.
off
);
window
.
addEventListener
(
'
hashchange
'
,
loading
);
});
...
...
@@ -462,6 +463,7 @@
emitter
.
off
(
Const
.
tournamentReload
,
tournament
.
init
);
// @ts-ignore
emitter
.
off
(
Const
.
updateRounds
,
tournament
.
updateRounds
);
// @ts-ignore
emitter
.
off
(
Const
.
createOff
,
creator
.
off
);
window
.
removeEventListener
(
'
hashchange
'
,
loading
);
});
...
...
src/pages/tournament.vue
View file @
43c8d847
...
...
@@ -70,14 +70,13 @@
:is-full =
'true'
:title =
'`参与者:$
{participant.total}`'
>
<view
id =
'round'
>
<view
id =
'round'
v-show =
"tournament.this.status == 'Finished'"
>
<div>
前
<uni-number-box
v-model =
'participant.copyValue'
:min =
'0'
:max =
'participant.array.length'
v-show =
"tournament.this.status == 'Finished'"
></uni-number-box>
名
</div>
...
...
@@ -85,7 +84,7 @@
<view
class =
'button'
@
click =
'tournament.operatorChk(participant.copy)'
v-show =
"tournament.this.status == 'Finished'"
>
复制排名
</view>
...
...
@@ -93,7 +92,6 @@
class =
'button'
id =
'newTournament'
@
click =
'tournament.operatorChk(tournament.new)'
v-show =
"tournament.this.rule == 'Swiss' && tournament.this.status == 'Finished'"
>
新建单淘赛
</view>
...
...
src/script/participant.ts
View file @
43c8d847
...
...
@@ -12,7 +12,7 @@ class Participant {
deck
:
YGOProDeck
|
undefined
;
constructor
(
obj
:
ParticipantObject
)
{
this
.
name
=
new
TextDecoder
(
'
utf-8
'
).
decode
(
new
Uint8Array
([...
obj
.
name
].
map
(
c
=>
c
.
charCodeAt
(
0
))))
;
this
.
name
=
obj
.
name
;
this
.
tournamentId
=
obj
.
tournamentId
;
this
.
id
=
obj
.
id
;
this
.
score
=
obj
.
score
;
...
...
src/script/post.ts
View file @
43c8d847
...
...
@@ -133,6 +133,7 @@ class TabulatorAPI {
data
:
Array
<
TournamentObject
>
;
}
};
console
.
log
(
token
)
try
{
response
=
await
this
.
url
.
get
(
`/api/tournament`
,
{
params
:
{
...
...
@@ -246,20 +247,23 @@ class TabulatorAPI {
},
UpdateYdk
:
async
(
token
:
string
,
id
:
number
,
res
:
UniApp
.
ChooseFileSuccessCallbackResult
)
:
Promise
<
Boolean
>
=>
{
let
response
:
{
data
:
string
data
:
{
success
:
boolean
}
};
try
{
// @ts-ignore
const
files
:
Array
<
UniApp
.
UploadFileOptionFiles
>
=
res
.
tempFiles
.
map
(
file
=>
({
name
:
'
files
'
,
uri
:
file
.
path
,
type
:
file
.
type
}));
response
=
await
UniApp
.
uploadFile
(
`
${
this
.
url
.
defaults
.
baseURL
}
/api/tournament/
${
id
}
/upload-ydk`
,
files
,
{
'
x-user-token
'
:
token
}
)
const
data
=
JSON
.
parse
(
response
.
data
)
return
data
.
success
;
let
formData
=
new
FormData
();
for
(
let
i
=
0
;
i
<
res
.
tempFilePaths
.
length
;
i
++
)
{
let
f
=
await
fetch
(
res
.
tempFilePaths
[
i
]);
let
blob
=
await
f
.
blob
();
formData
.
append
(
'
files
'
,
blob
,
res
.
tempFiles
[
i
].
name
.
replace
(
'
.ydk
'
,
''
));
}
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/upload-ydk`
,
formData
,
{
headers
:
{
'
x-user-token
'
:
token
}
});
return
response
.
data
.
success
;
}
catch
(
error
)
{
console
.
error
(
error
);
...
...
src/script/uniapp.ts
View file @
43c8d847
...
...
@@ -19,7 +19,7 @@ class UniappFuncs {
return
uni
.
uploadFile
({
url
:
url
,
files
:
files
,
header
:
header
,
header
:
header
});
}
...
...
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