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
03def38d
Commit
03def38d
authored
Jun 03, 2026
by
陈冲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
2912c668
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
8 deletions
+21
-8
Game1.vue
frontend-h5/src/pages/game1/Game1.vue
+1
-0
ScoreView.vue
frontend-h5/src/pages/game1/views/ScoreView.vue
+2
-2
useAdminGameSocket.ts
frontend-large/src/composables/useAdminGameSocket.ts
+5
-3
Login.vue
frontend-large/src/pages/Login.vue
+3
-1
Game1.vue
frontend-large/src/pages/game1/Game1.vue
+8
-0
vite.config.ts
frontend-large/vite.config.ts
+2
-2
No files found.
frontend-h5/src/pages/game1/Game1.vue
View file @
03def38d
...
@@ -215,6 +215,7 @@ if (wechat) {
...
@@ -215,6 +215,7 @@ if (wechat) {
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
document
.
title
=
'小游戏 - 击鼓齐福'
if
(
token
.
value
)
{
if
(
token
.
value
)
{
window
.
addEventListener
(
'beforeunload'
,
confirmRefresh
)
window
.
addEventListener
(
'beforeunload'
,
confirmRefresh
)
}
}
...
...
frontend-h5/src/pages/game1/views/ScoreView.vue
View file @
03def38d
...
@@ -74,7 +74,7 @@ onMounted(() => {
...
@@ -74,7 +74,7 @@ onMounted(() => {
.img-score
{
.img-score
{
position
:
absolute
;
position
:
absolute
;
top
:
50
0px
;
top
:
45
0px
;
left
:
50%
;
left
:
50%
;
width
:
465px
;
width
:
465px
;
height
:
731px
;
height
:
731px
;
...
@@ -144,7 +144,7 @@ onMounted(() => {
...
@@ -144,7 +144,7 @@ onMounted(() => {
.btn-group
{
.btn-group
{
position
:
absolute
;
position
:
absolute
;
top
:
13
54
px
;
top
:
13
20
px
;
left
:
50%
;
left
:
50%
;
display
:
flex
;
display
:
flex
;
gap
:
40px
;
gap
:
40px
;
...
...
frontend-large/src/composables/useAdminGameSocket.ts
View file @
03def38d
...
@@ -17,7 +17,7 @@ type AdminGameSocketOptions = {
...
@@ -17,7 +17,7 @@ type AdminGameSocketOptions = {
onGameStart
?:
(
data
:
any
)
=>
void
|
Promise
<
void
>
onGameStart
?:
(
data
:
any
)
=>
void
|
Promise
<
void
>
onGameStartRejected
?:
(
data
:
any
)
=>
void
onGameStartRejected
?:
(
data
:
any
)
=>
void
onRoomRank
?:
(
data
:
any
)
=>
void
onRoomRank
?:
(
data
:
any
)
=>
void
on
Event
?:
(
evt
:
string
,
payload
:
SocketPayload
)
=>
void
on
Relogin
?:
(
)
=>
void
}
}
export
function
useAdminGameSocket
(
options
:
AdminGameSocketOptions
)
{
export
function
useAdminGameSocket
(
options
:
AdminGameSocketOptions
)
{
...
@@ -64,6 +64,10 @@ export function useAdminGameSocket(options: AdminGameSocketOptions) {
...
@@ -64,6 +64,10 @@ export function useAdminGameSocket(options: AdminGameSocketOptions) {
options
.
onGameStartRejected
?.(
data
)
options
.
onGameStartRejected
?.(
data
)
return
return
}
}
if
(
evt
==
'login_result'
)
{
options
.
onRelogin
?.()
return
;
}
alert
(
msg
)
alert
(
msg
)
return
return
}
}
...
@@ -88,8 +92,6 @@ export function useAdminGameSocket(options: AdminGameSocketOptions) {
...
@@ -88,8 +92,6 @@ export function useAdminGameSocket(options: AdminGameSocketOptions) {
break
break
}
}
}
}
options
.
onEvent
?.(
evt
,
payload
)
})
})
})
})
...
...
frontend-large/src/pages/Login.vue
View file @
03def38d
...
@@ -48,6 +48,7 @@ onMounted(() => {
...
@@ -48,6 +48,7 @@ onMounted(() => {
<
template
>
<
template
>
<DesignStage>
<DesignStage>
<form>
<table>
<table>
<tbody>
<tbody>
<tr>
<tr>
...
@@ -60,11 +61,12 @@ onMounted(() => {
...
@@ -60,11 +61,12 @@ onMounted(() => {
</tr>
</tr>
<tr>
<tr>
<td
colspan=
"2"
align=
"center"
>
<td
colspan=
"2"
align=
"center"
>
<input
type=
"button"
value=
"Login
"
@
click=
"loginHandler"
/>
<input
type=
"button"
value=
"登录
"
@
click=
"loginHandler"
/>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
</form>
</DesignStage>
</DesignStage>
</
template
>
</
template
>
...
...
frontend-large/src/pages/game1/Game1.vue
View file @
03def38d
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
nextTick
,
onMounted
,
onUnmounted
,
ref
}
from
'vue'
import
{
nextTick
,
onMounted
,
onUnmounted
,
ref
}
from
'vue'
import
{
useRouter
}
from
'vue-router'
import
Loading
from
'./views/LoadingView.vue'
import
Loading
from
'./views/LoadingView.vue'
import
Rank1
from
'./views/Rank1View.vue'
import
Rank1
from
'./views/Rank1View.vue'
import
Rank2
from
'./views/Rank2View.vue'
import
Rank2
from
'./views/Rank2View.vue'
import
{
useAdminGameSocket
}
from
'@/composables/useAdminGameSocket'
import
{
useAdminGameSocket
}
from
'@/composables/useAdminGameSocket'
import
type
Player
from
'@/commons/player.ts'
import
type
Player
from
'@/commons/player.ts'
import
{
playGame1Music
}
from
'@/commons/music'
import
{
playGame1Music
}
from
'@/commons/music'
import
{
$remove_socket_storage
}
from
'@/commons/utils.ts'
const
router
=
useRouter
()
type
GameScreen
=
'loading'
|
'rank1'
|
'rank2'
type
GameScreen
=
'loading'
|
'rank1'
|
'rank2'
...
@@ -145,6 +149,10 @@ const { startGame, createRoom, backRoom } = useAdminGameSocket({
...
@@ -145,6 +149,10 @@ const { startGame, createRoom, backRoom } = useAdminGameSocket({
},
},
onGameStart
:
gotoRank1WithIntro
,
onGameStart
:
gotoRank1WithIntro
,
onRoomRank
:
updateRankPlayers
,
onRoomRank
:
updateRankPlayers
,
onRelogin
:
async
()
=>
{
$remove_socket_storage
();
await
router
.
replace
(
'/'
)
}
})
})
const
startGameWithMusic
=
()
=>
{
const
startGameWithMusic
=
()
=>
{
...
...
frontend-large/vite.config.ts
View file @
03def38d
...
@@ -28,8 +28,8 @@ function copyImageAssets() {
...
@@ -28,8 +28,8 @@ function copyImageAssets() {
export
default
defineConfig
(({
command
})
=>
({
export
default
defineConfig
(({
command
})
=>
({
base
:
command
===
'build'
?
'/cc/pc/'
:
'/'
,
base
:
command
===
'build'
?
'/cc/pc/'
:
'/'
,
define
:
{
define
:
{
//
__APP_DOMAIN__: JSON.stringify(command === 'build' ? buildDomain : ''),
__APP_DOMAIN__
:
JSON
.
stringify
(
command
===
'build'
?
buildDomain
:
''
),
__APP_DOMAIN__
:
JSON
.
stringify
(
buildDomain
),
//
__APP_DOMAIN__: JSON.stringify(buildDomain),
},
},
plugins
:
[
plugins
:
[
vue
(),
vue
(),
...
...
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