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
446dfdc1
Commit
446dfdc1
authored
Jul 05, 2023
by
毛线
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动play按钮交互优化
parent
417d718c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
10 deletions
+57
-10
index.vue
pages/index.vue
+1
-1
_id.vue
pages/index/game/_id.vue
+36
-5
right-player.vue
pages/index/game/components/right-player.vue
+20
-4
No files found.
pages/index.vue
View file @
446dfdc1
...
@@ -55,7 +55,7 @@ export default {
...
@@ -55,7 +55,7 @@ export default {
}
}
const
{
id
}
=
data
const
{
id
}
=
data
if
(
id
)
{
if
(
id
)
{
if
(
this
.
$route
r
.
name
!==
'index-game-id'
)
{
if
(
this
.
$route
.
name
!==
'index-game-id'
)
{
this
.
$router
.
replace
(
`/game/
${
id
}
`
)
this
.
$router
.
replace
(
`/game/
${
id
}
`
)
}
}
}
}
...
...
pages/index/game/_id.vue
View file @
446dfdc1
...
@@ -59,8 +59,9 @@
...
@@ -59,8 +59,9 @@
<!-- 自动下注 -->
<!-- 自动下注 -->
<div
v-audio
class=
"auto"
>
<div
v-audio
class=
"auto"
>
<img
v-show=
"!isAuto"
src=
"https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/chinese/ic_autoChinese.png"
alt=
""
class=
"auto-btn btn"
@
click=
"showTime = !showTime;"
>
<img
v-show=
"!isAuto"
src=
"https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/chinese/ic_autoChinese.png"
alt=
""
class=
"auto-btn btn"
@
click=
"showTime = !showTime;"
>
<img
v-show=
"isAuto"
src=
"@/assets/images/temp/game/auto-time-button.png"
alt=
""
class=
"auto-btn btn down"
@
click=
"autoTime = 0"
>
<img
v-show=
"isAuto"
src=
"@/assets/images/temp/game/auto-time-button.png"
alt=
""
class=
"auto-btn btn down"
@
click=
"click().cancelAuto()"
>
<div
v-if=
"isAuto"
:style=
"autoTime === -1 ? 'font-size: 40px;' : ''"
class=
"auto-time-text"
>
<div
v-if=
"isAuto"
:style=
"autoTime === -1 ? 'font-size: 40px;' : ''"
class=
"auto-time-text btn"
@
click=
"click().cancelAuto()"
>
<div
class=
"tips"
>
DOUBLE CLICK TO STOP AUTO-SPINNING
</div>
{{
autoTime
|
autoTimeFilter
}}
{{
autoTime
|
autoTimeFilter
}}
</div>
</div>
<div
class=
"auto-time-block"
>
<div
class=
"auto-time-block"
>
...
@@ -112,6 +113,7 @@ export default {
...
@@ -112,6 +113,7 @@ export default {
autoTimeList
:
[
30
,
20
,
15
,
5
],
autoTimeList
:
[
30
,
20
,
15
,
5
],
showTime
:
false
,
showTime
:
false
,
autoTime
:
0
,
// 自动游戏时间,-1表示无穷
autoTime
:
0
,
// 自动游戏时间,-1表示无穷
cancelAutoClick
:
0
,
// 计数器,用来实现双击
}
}
},
},
computed
:
{
computed
:
{
...
@@ -205,7 +207,7 @@ export default {
...
@@ -205,7 +207,7 @@ export default {
this
.
click
().
play
()
this
.
click
().
play
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
init
().
autoPlay
()
this
.
init
().
autoPlay
()
},
2
000
)
},
5
000
)
}
}
},
},
}
}
...
@@ -360,6 +362,16 @@ export default {
...
@@ -360,6 +362,16 @@ export default {
}
}
this
.
init
().
autoPlay
()
this
.
init
().
autoPlay
()
},
},
cancelAuto
:
()
=>
{
this
.
cancelAutoClick
++
setTimeout
(()
=>
{
this
.
cancelAutoClick
=
0
},
500
)
if
(
this
.
cancelAutoClick
>=
2
)
{
this
.
autoTime
=
0
this
.
cancelAutoClick
=
0
}
},
}
}
},
},
},
},
...
@@ -577,7 +589,7 @@ export default {
...
@@ -577,7 +589,7 @@ export default {
}
}
.auto-time-text
{
.auto-time-text
{
position
:
absolute
;
position
:
absolute
;
bottom
:
25
px
;
bottom
:
6
px
;
right
:
5px
;
right
:
5px
;
z-index
:
3
;
z-index
:
3
;
text-align
:
center
;
text-align
:
center
;
...
@@ -585,7 +597,26 @@ export default {
...
@@ -585,7 +597,26 @@ export default {
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
20px
;
font-size
:
20px
;
width
:
60px
;
width
:
60px
;
line-height
:
20px
;
line-height
:
60px
;
border-radius
:
60px
;
.tips
{
display
:
none
;
color
:
#2f49e9
;
border-radius
:
8px
;
background
:
#e4dede
;
width
:
189px
;
font-size
:
16px
;
padding
:
4px
;
position
:
relative
;
line-height
:
20px
;
left
:
-64px
;
top
:
-10px
;
}
&
:hover
{
.tips
{
display
:
block
!
important
;
}
}
}
}
.auto-time-block
{
.auto-time-block
{
position
:
absolute
;
position
:
absolute
;
...
...
pages/index/game/components/right-player.vue
View file @
446dfdc1
<
template
>
<
template
>
<div
class=
"box"
>
<div
class=
"box"
>
<div
:class=
"showPlayer1 ? 'show' : ''"
class=
"btn camera"
@
click=
"showPlayer1 = !showPlayer1"
>
<div
v-if=
"videoTopNumber && +videoTopNumber !== 0"
:class=
"showPlayer1 ? 'show' : ''"
class=
"btn camera"
@
click=
"showPlayer1 = !showPlayer1"
>
<div
class=
"left-icon"
>
<div
class=
"left-icon"
>
<img
src=
"https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/photo-camera-interface-symbol-for-button.png"
alt=
""
>
<img
src=
"https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/photo-camera-interface-symbol-for-button.png"
alt=
""
>
</div>
</div>
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<WebRTCPlayer
ref=
"player1"
class=
"player"
/>
<WebRTCPlayer
ref=
"player1"
class=
"player"
/>
</div>
</div>
</div>
</div>
<div
:class=
"showPlayer2 ? 'show' : ''"
class=
"btn camera camera2"
@
click=
"showPlayer2 = !showPlayer2"
>
<div
v-if=
"videoCamNumber && +videoCamNumber !== 0"
:class=
"showPlayer2 ? 'show' : ''"
class=
"btn camera camera2"
@
click=
"showPlayer2 = !showPlayer2"
>
<div
class=
"left-icon"
>
<div
class=
"left-icon"
>
<img
src=
"https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/photo-camera-interface-symbol-for-button.png"
alt=
""
>
<img
src=
"https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/photo-camera-interface-symbol-for-button.png"
alt=
""
>
</div>
</div>
...
@@ -51,24 +51,40 @@ export default {
...
@@ -51,24 +51,40 @@ export default {
showPlayer2
:
false
,
showPlayer2
:
false
,
}
}
},
},
computed
:
{
videoCamNumber
()
{
return
this
.
device
.
videoCamNumber
},
videoTopNumber
()
{
return
this
.
device
.
videoTopNumber
},
},
watch
:
{
watch
:
{
device
()
{
device
()
{
this
.
play1
()
this
.
play2
()
this
.
play2
()
},
},
},
},
mounted
()
{
mounted
()
{
if
(
this
.
device
)
{
if
(
this
.
device
)
{
this
.
play1
()
this
.
play2
()
this
.
play2
()
}
}
},
},
methods
:
{
methods
:
{
play1
()
{
play1
()
{
const
url
=
this
.
device
.
videoMainNumber
const
url
=
this
.
videoTopNumber
if
(
!
url
||
+
url
===
0
)
{
return
}
const
webrtc
=
`webrtc://eslotstreaming.com
${
url
}
`
const
webrtc
=
`webrtc://eslotstreaming.com
${
url
}
`
this
.
$refs
.
player1
.
initVideo
(
webrtc
)
this
.
$refs
.
player1
.
initVideo
(
webrtc
)
},
},
play2
()
{
play2
()
{
const
url
=
this
.
device
.
videoCamNumber
const
url
=
this
.
videoCamNumber
if
(
!
url
||
+
url
===
0
)
{
return
}
const
webrtc
=
`webrtc://eslotstreaming.com
${
url
}
`
const
webrtc
=
`webrtc://eslotstreaming.com
${
url
}
`
this
.
$refs
.
player2
.
initVideo
(
webrtc
)
this
.
$refs
.
player2
.
initVideo
(
webrtc
)
},
},
...
...
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