Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fc-minigame
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈冲
fc-minigame
Commits
fe961549
Commit
fe961549
authored
Jun 04, 2026
by
董政锦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: 皇冠位置调整;
parent
d54c5fa8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
30 deletions
+35
-30
Rank1View.vue
frontend-large/src/pages/game4/views/Rank1View.vue
+35
-30
No files found.
frontend-large/src/pages/game4/views/Rank1View.vue
View file @
fe961549
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
watch
,
onMounted
,
onUnmounted
}
from
"vue"
;
import
{
ref
,
computed
,
watch
,
onMounted
,
onUnmounted
}
from
"vue"
;
import
DesignStage
from
"../../../components/DesignStage.vue"
;
import
DesignStage
from
"../../../components/DesignStage.vue"
;
import
type
Player
from
"@/commons/player.ts"
;
import
type
Player
from
"@/commons/player.ts"
;
import
{
$is_run_local
}
from
"@/commons/utils.ts"
;
import
{
$is_run_local
}
from
"@/commons/utils.ts"
;
...
@@ -31,9 +31,9 @@ const imageUrls = {
...
@@ -31,9 +31,9 @@ const imageUrls = {
fireworks
:
cssAssetUrl
(
"game1/fireworks.png"
),
fireworks
:
cssAssetUrl
(
"game1/fireworks.png"
),
guan1
:
cssAssetUrl
(
"game1/guan1.png"
),
guan1
:
cssAssetUrl
(
"game1/guan1.png"
),
pai1
:
cssAssetUrl
(
"game4/pai1.svg"
),
pai1
:
cssAssetUrl
(
"game4/pai1.svg"
),
guan2
:
cssAssetUrl
(
"game1/guan
2
.png"
),
guan2
:
cssAssetUrl
(
"game1/guan
3
.png"
),
pai2
:
cssAssetUrl
(
"game4/pai2.svg"
),
pai2
:
cssAssetUrl
(
"game4/pai2.svg"
),
guan3
:
cssAssetUrl
(
"game1/guan
3
.png"
),
guan3
:
cssAssetUrl
(
"game1/guan
2
.png"
),
pai3
:
cssAssetUrl
(
"game4/pai3.svg"
),
pai3
:
cssAssetUrl
(
"game4/pai3.svg"
),
rankIcon
:
cssAssetUrl
(
"game1/no-icon.png"
),
rankIcon
:
cssAssetUrl
(
"game1/no-icon.png"
),
avatarAnimation
:
cssAssetUrl
(
"avatar_animation.png"
),
avatarAnimation
:
cssAssetUrl
(
"avatar_animation.png"
),
...
@@ -112,6 +112,22 @@ const horses = ref<Horse[]>([]);
...
@@ -112,6 +112,22 @@ const horses = ref<Horse[]>([]);
const
isGameRunning
=
ref
(
false
);
const
isGameRunning
=
ref
(
false
);
const
showResult
=
ref
(
false
);
const
showResult
=
ref
(
false
);
const
finalRankList
=
ref
<
RankItem
[]
>
([]);
const
finalRankList
=
ref
<
RankItem
[]
>
([]);
/** 补齐占位的完整 10 人排名列表 */
const
fullRankList
=
computed
<
RankItem
[]
>
(()
=>
{
const
result
:
RankItem
[]
=
[];
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
result
.
push
(
finalRankList
.
value
[
i
]
??
{
rank
:
i
+
1
,
userid
:
`empty-
${
i
}
`
,
nickname
:
"虚位以待"
,
avatar
:
""
,
score
:
0
,
},
);
}
return
result
;
});
/** 倒计时结束后才为 true,控制背景动画和马匹渲染 */
/** 倒计时结束后才为 true,控制背景动画和马匹渲染 */
const
gameStarted
=
ref
(
false
);
const
gameStarted
=
ref
(
false
);
...
@@ -366,18 +382,7 @@ const renderAvatar = (item: any) => {
...
@@ -366,18 +382,7 @@ const renderAvatar = (item: any) => {
// 获取 podium 上三名选手(不足补空)
// 获取 podium 上三名选手(不足补空)
const
podiumPlayers
=
():
RankItem
[]
=>
{
const
podiumPlayers
=
():
RankItem
[]
=>
{
const
result
:
RankItem
[]
=
[];
const
result
=
fullRankList
.
value
.
slice
(
0
,
3
);
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
result
.
push
(
finalRankList
.
value
[
i
]
??
{
rank
:
i
+
1
,
userid
:
`empty-
${
i
}
`
,
nickname
:
"虚位以待"
,
avatar
:
""
,
score
:
0
,
},
);
}
// 按 podium 视觉顺序:2 1 3
// 按 podium 视觉顺序:2 1 3
return
[
result
[
1
]
!
,
result
[
0
]
!
,
result
[
2
]
!
];
return
[
result
[
1
]
!
,
result
[
0
]
!
,
result
[
2
]
!
];
};
};
...
@@ -447,14 +452,14 @@ defineExpose({
...
@@ -447,14 +452,14 @@ defineExpose({
<div
class=
"avatar"
:style=
"renderAvatar(item)"
></div>
<div
class=
"avatar"
:style=
"renderAvatar(item)"
></div>
<div
class=
"nickname"
>
{{ item.nickname }}
</div>
<div
class=
"nickname"
>
{{ item.nickname }}
</div>
<div
class=
"guan"
></div>
<div
class=
"guan"
></div>
<
div
class=
"pai"
></div
>
<
!-- <div class="pai"></div> --
>
</div>
</div>
</div>
</div>
<!-- 第4-10名 rank-container -->
<!-- 第4-10名 rank-container -->
<div
class=
"rank-container"
>
<div
class=
"rank-container"
>
<div
<div
v-for=
"(item, index) in f
ina
lRankList.slice(3, 10)"
v-for=
"(item, index) in f
ul
lRankList.slice(3, 10)"
:key=
"item.userid || `rank-${index}`"
:key=
"item.userid || `rank-${index}`"
>
>
<div
class=
"no-icon"
>
{{ index + 4 }}
</div>
<div
class=
"no-icon"
>
{{ index + 4 }}
</div>
...
@@ -653,9 +658,9 @@ defineExpose({
...
@@ -653,9 +658,9 @@ defineExpose({
.podium
{
.podium
{
background
:
v-bind
(
"imageUrls.podium"
)
no-repeat
center
;
background
:
v-bind
(
"imageUrls.podium"
)
no-repeat
center
;
width
:
1347px
;
width
:
1347px
;
height
:
269
px
;
height
:
412
px
;
position
:
absolute
;
position
:
absolute
;
top
:
427
px
;
top
:
294
px
;
left
:
287px
;
left
:
287px
;
z-index
:
1
;
z-index
:
1
;
}
}
...
@@ -691,16 +696,16 @@ defineExpose({
...
@@ -691,16 +696,16 @@ defineExpose({
/* 第1名 (中间) */
/* 第1名 (中间) */
.rank-no1
{
.rank-no1
{
.gu-burst
{
left
:
580px
;
top
:
-200
px
;
}
.gu-burst
{
left
:
605px
;
top
:
-235
px
;
}
.avatar
{
.avatar
{
width
:
120px
;
height
:
120px
;
border-radius
:
60px
;
width
:
120px
;
height
:
120px
;
border-radius
:
60px
;
position
:
absolute
;
left
:
610px
;
top
:
-1
36
px
;
position
:
absolute
;
left
:
610px
;
top
:
-1
41
px
px
;
}
}
.nickname
{
.nickname
{
width
:
167px
;
height
:
46px
;
width
:
167px
;
height
:
46px
;
background
:
#FFCF44
;
color
:
white
;
background
:
#FFCF44
;
color
:
white
;
text-align
:
center
;
line-height
:
46px
;
text-align
:
center
;
line-height
:
46px
;
position
:
absolute
;
left
:
590px
;
top
:
-
25
px
;
position
:
absolute
;
left
:
590px
;
top
:
-
32
px
;
z-index
:
1
;
border-radius
:
23px
;
z-index
:
1
;
border-radius
:
23px
;
}
}
.guan
{
.guan
{
...
@@ -717,22 +722,22 @@ defineExpose({
...
@@ -717,22 +722,22 @@ defineExpose({
/* 第2名 (左边) */
/* 第2名 (左边) */
.rank-no2
{
.rank-no2
{
.gu-burst
{
left
:
140px
;
top
:
-170
px
;
}
.gu-burst
{
left
:
318px
;
top
:
111
px
;
}
.avatar
{
.avatar
{
width
:
120px
;
height
:
120px
;
border-radius
:
60px
;
width
:
120px
;
height
:
120px
;
border-radius
:
60px
;
position
:
absolute
;
left
:
180px
;
top
:
-110
px
;
position
:
absolute
;
left
:
333px
;
top
:
-17
px
;
}
}
.nickname
{
.nickname
{
width
:
167px
;
height
:
46px
;
width
:
167px
;
height
:
46px
;
background
:
#CA9600
;
color
:
white
;
background
:
#CA9600
;
color
:
white
;
text-align
:
center
;
line-height
:
46px
;
text-align
:
center
;
line-height
:
46px
;
position
:
absolute
;
left
:
157px
;
top
:
2
px
;
position
:
absolute
;
top
:
95px
;
left
:
309
px
;
z-index
:
1
;
border-radius
:
23px
;
z-index
:
1
;
border-radius
:
23px
;
}
}
.guan
{
.guan
{
background
:
v-bind
(
"imageUrls.guan2"
)
no-repeat
center
;
background
:
v-bind
(
"imageUrls.guan2"
)
no-repeat
center
;
width
:
96px
;
height
:
96px
;
width
:
96px
;
height
:
96px
;
position
:
absolute
;
left
:
134px
;
top
:
-14
4px
;
position
:
absolute
;
left
:
289px
;
top
:
-5
4px
;
}
}
.pai
{
.pai
{
background
:
v-bind
(
"imageUrls.pai2"
)
no-repeat
center
;
background
:
v-bind
(
"imageUrls.pai2"
)
no-repeat
center
;
...
@@ -743,22 +748,22 @@ defineExpose({
...
@@ -743,22 +748,22 @@ defineExpose({
/* 第3名 (右边) */
/* 第3名 (右边) */
.rank-no3
{
.rank-no3
{
.gu-burst
{
left
:
1020px
;
top
:
-170
px
;
}
.gu-burst
{
left
:
931px
;
top
:
-73
px
;
}
.avatar
{
.avatar
{
width
:
120px
;
height
:
120px
;
border-radius
:
60px
;
width
:
120px
;
height
:
120px
;
border-radius
:
60px
;
position
:
absolute
;
left
:
1046px
;
top
:
-110
px
;
position
:
absolute
;
left
:
920px
;
top
:
25
px
;
}
}
.nickname
{
.nickname
{
width
:
167px
;
height
:
46px
;
width
:
167px
;
height
:
46px
;
background
:
#E2E2E2
;
color
:
#AFAFAF
;
background
:
#E2E2E2
;
color
:
#AFAFAF
;
text-align
:
center
;
line-height
:
46px
;
text-align
:
center
;
line-height
:
46px
;
position
:
absolute
;
left
:
1028px
;
top
:
2
px
;
position
:
absolute
;
left
:
897px
;
top
:
136
px
;
z-index
:
1
;
border-radius
:
23px
;
z-index
:
1
;
border-radius
:
23px
;
}
}
.guan
{
.guan
{
background
:
v-bind
(
"imageUrls.guan3"
)
no-repeat
center
;
background
:
v-bind
(
"imageUrls.guan3"
)
no-repeat
center
;
width
:
96px
;
height
:
96px
;
width
:
96px
;
height
:
96px
;
position
:
absolute
;
left
:
1003px
;
top
:
-146
px
;
position
:
absolute
;
left
:
877px
;
top
:
-14
px
;
}
}
.pai
{
.pai
{
background
:
v-bind
(
"imageUrls.pai3"
)
no-repeat
center
;
background
:
v-bind
(
"imageUrls.pai3"
)
no-repeat
center
;
...
...
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