Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
LuzhouLaojiaoSnake_250428
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
LuzhouLaojiaoSnake_250428
Commits
9592f43b
Commit
9592f43b
authored
May 07, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
倒计时
parent
b061625e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
gameStore.ts
src/store/gameStore.ts
+9
-18
No files found.
src/store/gameStore.ts
View file @
9592f43b
...
...
@@ -15,7 +15,8 @@ class GameStore {
startInfo
:
{
userRecordId
?:
number
|
string
recordId
?:
number
|
string
countdownSeconds
?:
number
}
=
{}
async
start
()
{
...
...
@@ -57,7 +58,7 @@ class GameStore {
remainTimes
:
0
,
level
:
0
,
maxScore
:
0
,
cd
:
GameConfig
.
gameCd
,
cd
:
this
.
startInfo
.
countdownSeconds
||
GameConfig
.
gameCd
,
}
}
...
...
@@ -78,31 +79,21 @@ class GameStore {
async
submit
(
score
:
number
)
{
const
startId
=
this
.
startInfo
.
userR
ecordId
;
const
recordId
=
this
.
startInfo
.
r
ecordId
;
const
params
:
{
startId
:
string
|
number
,
score
:
number
,
param
?:
string
,
}
=
{
startId
,
score
,
}
params
.
param
=
AESEncrypt
(
JSON
.
stringify
({
const
param
=
AESEncrypt
(
JSON
.
stringify
({
timestamp
:
Date
.
now
(),
...
params
,
}),
"CPI851051A6AEA6F"
,
"cDOiBC1n2QrkAY2P"
);
recordId
,
score
,
}),
"3C8C48E792E9241B"
,
"cDOiBC1n2QrkAY2P"
);
const
{
success
,
data
}
=
await
API
.
submit
(
params
);
const
{
success
,
data
}
=
await
API
.
submit
({
param
}
);
if
(
!
success
)
{
PageCtrl
.
changePage
(
HomePage
);
return
;
}
store
.
indexData
.
remainTimes
=
data
.
remainGameTimes
;
if
(
data
)
{
}
else
{
}
...
...
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