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
9f52027c
Commit
9f52027c
authored
May 17, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d3e9eefb
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
391 additions
and
231 deletions
+391
-231
src/pages/main.vue
src/pages/main.vue
+88
-143
src/pages/tournament.vue
src/pages/tournament.vue
+176
-63
src/script/const.ts
src/script/const.ts
+6
-2
src/script/mycard.ts
src/script/mycard.ts
+1
-1
src/script/post.ts
src/script/post.ts
+26
-10
src/script/type.ts
src/script/type.ts
+6
-1
src/style/page.scss
src/style/page.scss
+2
-2
src/style/tournament.scss
src/style/tournament.scss
+35
-8
src/style/transition.scss
src/style/transition.scss
+50
-0
src/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue
...dules/uni-list/components/uni-list-item/uni-list-item.vue
+1
-1
No files found.
src/pages/main.vue
View file @
9f52027c
This diff is collapsed.
Click to expand it.
src/pages/tournament.vue
View file @
9f52027c
This diff is collapsed.
Click to expand it.
src/script/const.ts
View file @
9f52027c
const
selectTournament
=
'
selectTournament
'
;
const
selectTournament
=
'
1
'
;
const
tournamentInfo
=
'
2
'
;
const
tournamentExit
=
'
3
'
;
export
{
export
{
selectTournament
selectTournament
,
tournamentInfo
,
tournamentExit
};
};
\ No newline at end of file
src/script/mycard.ts
View file @
9f52027c
...
@@ -49,7 +49,7 @@ class MyCard {
...
@@ -49,7 +49,7 @@ class MyCard {
logout
()
{
logout
()
{
window
.
localStorage
.
removeItem
(
'
mycardLogin
'
);
window
.
localStorage
.
removeItem
(
'
mycardLogin
'
);
window
.
location
.
href
=
window
.
location
.
href
.
replace
(
/
\/\?
.*/
,
''
);
window
.
location
.
replace
(
window
.
location
.
href
.
replace
(
/
\/\?
.*/
,
''
))
}
}
}
}
...
...
src/script/post.ts
View file @
9f52027c
...
@@ -18,7 +18,8 @@ import {
...
@@ -18,7 +18,8 @@ import {
ApiKeyObject
,
ApiKeyObject
,
ApiKeyCreateObject
,
ApiKeyCreateObject
,
ApiKeyFindObject
,
ApiKeyFindObject
,
AllTournament
AllTournament
,
AllParticipant
}
from
'
./type.ts
'
}
from
'
./type.ts
'
class
TabulatorAPI
{
class
TabulatorAPI
{
...
@@ -89,6 +90,10 @@ class TabulatorAPI {
...
@@ -89,6 +90,10 @@ class TabulatorAPI {
}
}
},
},
FindALL
:
async
(
token
:
string
,
obj
:
TournamentFindObject
=
{})
:
Promise
<
AllTournament
>
=>
{
FindALL
:
async
(
token
:
string
,
obj
:
TournamentFindObject
=
{})
:
Promise
<
AllTournament
>
=>
{
const
filter
=
(
obj
:
any
)
:
any
=>
{
const
v
=
obj
??
''
;
return
v
!=
''
&&
v
!=
'
'
?
obj
:
undefined
;
}
let
response
:
{
let
response
:
{
data
:
{
data
:
{
total
:
number
;
total
:
number
;
...
@@ -101,11 +106,11 @@ class TabulatorAPI {
...
@@ -101,11 +106,11 @@ class TabulatorAPI {
recordsPerPage
:
20
,
recordsPerPage
:
20
,
pageCount
:
obj
.
pageCount
??
1
,
pageCount
:
obj
.
pageCount
??
1
,
id
:
(
obj
.
id
??
0
)
>
0
?
obj
.
id
:
undefined
,
id
:
(
obj
.
id
??
0
)
>
0
?
obj
.
id
:
undefined
,
creator
:
(
obj
.
creator
??
''
)
!=
''
?
obj
.
creator
:
undefined
,
creator
:
filter
(
obj
.
creator
)
,
name
:
(
obj
.
name
??
''
)
!=
''
?
obj
.
name
:
undefined
,
name
:
filter
(
obj
.
name
)
,
rule
:
(
obj
.
rule
??
''
)
!=
''
?
obj
.
rule
:
undefined
,
rule
:
filter
(
obj
.
rule
)
,
visibility
:
(
obj
.
visibility
??
''
)
!=
''
?
obj
.
visibility
:
undefined
,
visibility
:
filter
(
obj
.
visibility
)
,
status
:
(
obj
.
status
??
''
)
!=
''
?
obj
.
status
:
undefined
,
status
:
filter
(
obj
.
status
)
,
createdAtBefore
:
obj
.
before
?.
toISOString
()
??
undefined
,
createdAtBefore
:
obj
.
before
?.
toISOString
()
??
undefined
,
createdAtAfter
:
obj
.
after
?.
toISOString
()
??
undefined
createdAtAfter
:
obj
.
after
?.
toISOString
()
??
undefined
},
},
...
@@ -212,13 +217,17 @@ class TabulatorAPI {
...
@@ -212,13 +217,17 @@ class TabulatorAPI {
},
},
}
}
Participant
=
{
Participant
=
{
Create
:
async
(
token
:
string
,
Data
:
ParticipantCreateObject
)
:
Promise
<
boolean
>
=>
{
Create
:
async
(
token
:
string
,
Data
:
ParticipantCreateObject
,
Array
:
Array
<
Participant
>
)
:
Promise
<
boolean
>
=>
{
let
response
:
{
let
response
:
{
data
:
{
data
:
{
success
:
boolean
;
success
:
boolean
;
}
}
};
};
try
{
try
{
if
(
Data
.
name
.
length
==
0
)
throw
new
Error
(
'
请填写名称
'
);
if
(
Array
.
findIndex
(
i
=>
Data
.
name
==
i
.
name
)
>
-
1
)
throw
new
Error
(
'
名称重复
'
);
response
=
await
this
.
url
.
post
(
`/api/participant`
,
Data
,
{
response
=
await
this
.
url
.
post
(
`/api/participant`
,
Data
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -271,9 +280,10 @@ class TabulatorAPI {
...
@@ -271,9 +280,10 @@ class TabulatorAPI {
return
undefined
;
return
undefined
;
}
}
},
},
FindALL
:
async
(
token
:
string
,
obj
:
ParticipantFindObject
=
{})
:
Promise
<
A
rray
<
Participant
>
>
=>
{
FindALL
:
async
(
token
:
string
,
obj
:
ParticipantFindObject
=
{})
:
Promise
<
A
llParticipant
>
=>
{
let
response
:
{
let
response
:
{
data
:
{
data
:
{
total
:
number
;
data
:
Array
<
ParticipantObject
>
;
data
:
Array
<
ParticipantObject
>
;
}
}
};
};
...
@@ -295,11 +305,17 @@ class TabulatorAPI {
...
@@ -295,11 +305,17 @@ class TabulatorAPI {
response
.
data
.
data
.
forEach
((
i
:
ParticipantObject
)
=>
{
response
.
data
.
data
.
forEach
((
i
:
ParticipantObject
)
=>
{
participants
.
push
(
new
Participant
(
i
));
participants
.
push
(
new
Participant
(
i
));
})
})
return
participants
;
return
{
total
:
response
.
data
.
total
,
participants
:
participants
};
}
}
catch
(
error
)
{
catch
(
error
)
{
console
.
error
(
error
);
console
.
error
(
error
);
return
[];
return
{
total
:
0
,
participants
:
[]
};
}
}
},
},
Update
:
async
(
token
:
string
,
id
:
number
,
Data
:
ParticipantUpdateObject
)
:
Promise
<
boolean
>
=>
{
Update
:
async
(
token
:
string
,
id
:
number
,
Data
:
ParticipantUpdateObject
)
:
Promise
<
boolean
>
=>
{
...
...
src/script/type.ts
View file @
9f52027c
...
@@ -139,6 +139,10 @@ interface AllTournament extends All {
...
@@ -139,6 +139,10 @@ interface AllTournament extends All {
tournaments
:
Array
<
Tournament
>
;
tournaments
:
Array
<
Tournament
>
;
}
}
interface
AllParticipant
extends
All
{
participants
:
Array
<
Participant
>
;
}
export
{
export
{
Score
,
Score
,
TournamentObject
,
TournamentObject
,
...
@@ -155,5 +159,6 @@ export {
...
@@ -155,5 +159,6 @@ export {
ApiKeyObject
,
ApiKeyObject
,
ApiKeyCreateObject
,
ApiKeyCreateObject
,
ApiKeyFindObject
,
ApiKeyFindObject
,
AllTournament
AllTournament
,
AllParticipant
}
}
\ No newline at end of file
src/style/page.scss
View file @
9f52027c
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
#body
{
#body
{
width
:
var
(
--
size
);
width
:
var
(
--
size
);
margin
:
0
auto
;
margin
:
0
auto
;
:deep
(
.uni-list-item
)
{
:deep
(
#list
)
{
transition
:
all
0
.3s
ease
;
transition
:
all
0
.3s
ease
;
&
:hover
{
&
:hover
{
cursor
:
pointer
;
cursor
:
pointer
;
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
}
}
}
}
}
}
:deep
(
#
search
)
{
:deep
(
#
drawer
)
{
position
:
absolute
;
position
:
absolute
;
z-index
:
1
;
z-index
:
1
;
width
:
var
(
--
size
);
width
:
var
(
--
size
);
...
...
src/style/tournament.scss
View file @
9f52027c
.PageTournament
{
.PageTournament
{
:deep
(
.uni-forms
)
{
#PageTournament
{
.button
{
:deep
(
.uni-forms
)
{
border
:
1px
solid
#409eff
;
.button_list
{
display
:
flex
;
display
:
flex
;
width
:
10%
;
.button
{
justify-content
:
center
;
border
:
1px
solid
#409eff
;
&
:hover
{
display
:
flex
;
cursor
:
pointer
;
width
:
20%
;
justify-content
:
center
;
&
:hover
{
cursor
:
pointer
;
}
}
}
}
:deep
(
.uni-list-item
)
{
#header
{
min-width
:
30%
;
.rank
{
margin-top
:
6rpx
;
color
:
#999
;
font-size
:
12px
;
overflow
:
hidden
;
}
}
#footer
{
.button
{
display
:
flex
;
width
:
10%
;
justify-content
:
center
;
:hover
{
color
:
red
;
cursor
:
pointer
;
}
}
}
}
}
}
}
}
...
...
src/style/transition.scss
0 → 100644
View file @
9f52027c
.switch
{
&
-enter-active
,
&
-leave-active
{
transition
:
opacity
0
.5s
ease
;
}
&
-enter-from
,
&
-leave-to
{
opacity
:
0
;
}
&
-enter-to
,
&
-leave-from
{
opacity
:
1
;
}
}
.move_left
{
&
-enter-active
,
&
-leave-active
{
transition
:
transform
0
.5s
ease
;
}
&
-enter-from
,
&
-leave-to
{
transform
:
translateX
(
-200%
);
}
&
-enter-to
,
&
-leave-from
{
transform
:
translateX
(
0%
);
}
}
.move_right
{
&
-enter-active
,
&
-leave-active
{
transition
:
transform
0
.5s
ease
;
}
&
-enter-from
,
&
-leave-to
{
transform
:
translateX
(
200%
);
}
&
-enter-to
,
&
-leave-from
{
transform
:
translateX
(
0%
);
}
}
\ No newline at end of file
src/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue
View file @
9f52027c
...
@@ -343,7 +343,7 @@
...
@@ -343,7 +343,7 @@
background-color
:
#fff
;
background-color
:
#fff
;
flex-direction
:
row
;
flex-direction
:
row
;
/* #ifdef H5 */
/* #ifdef H5 */
cursor
:
pointer
;
//
cursor: pointer;
/* #endif */
/* #endif */
}
}
...
...
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