Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
eslotsys-game-nuxt
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
毛线
eslotsys-game-nuxt
Commits
4f9e72b1
Commit
4f9e72b1
authored
Jul 15, 2023
by
毛线
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动play
parent
dce8d898
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
keyboard.vue
pages/index/game/components/keyboard.vue
+21
-1
No files found.
pages/index/game/components/keyboard.vue
View file @
4f9e72b1
...
...
@@ -146,6 +146,8 @@ export default {
setTimeout
(()
=>
{
this
.
init
().
autoTime
()
},
1000
)
}
else
{
this
.
network
().
autoPlay
(
'release'
)
// 去掉自动游戏
}
},
// 自动玩游戏递归调用
...
...
@@ -185,12 +187,13 @@ export default {
setAutoPlay
:
(
time
)
=>
{
if
(
time
===
-
1
)
{
this
.
autoTime
=
-
1
this
.
network
().
autoPlay
(
'release'
)
}
else
{
this
.
autoTime
=
time
*
60
this
.
init
().
autoTime
()
this
.
network
().
autoPlay
(
'press'
)
this
.
showTime
=
false
}
this
.
init
().
autoPlay
()
},
cancelAuto
:
()
=>
{
this
.
cancelAutoClick
++
...
...
@@ -200,6 +203,7 @@ export default {
if
(
this
.
cancelAutoClick
>=
2
)
{
this
.
autoTime
=
0
this
.
cancelAutoClick
=
0
this
.
network
().
autoPlay
(
'release'
)
}
},
}
...
...
@@ -283,6 +287,22 @@ export default {
},
100
)
})
},
autoPlay
:
(
methodName
)
=>
{
const
{
id
,
playBtn
,
}
=
this
const
params
=
{
deviceId
:
id
,
methodName
,
key
:
playBtn
.
buttonValue
,
}
this
.
$request
({
url
:
'/api/game/button'
,
method
:
'get'
,
params
,
}).
then
(({
data
})
=>
{
}).
catch
(()
=>
{
})
},
}
},
}
...
...
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