Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Muse
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
Muse
Commits
53335e64
Commit
53335e64
authored
Jan 27, 2019
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
随机视频
parent
44c8ea1a
Pipeline
#3
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
sellTrade.vue
src/components/sellDashboard/sellTrade.vue
+0
-1
index.vue
src/views/index.vue
+24
-12
No files found.
src/components/sellDashboard/sellTrade.vue
View file @
53335e64
...
...
@@ -141,7 +141,6 @@ export default {
let
key
=
day
+
' '
+
hours
let
count
=
0
this
.
realData
.
forEach
(
x
=>
{
console
.
log
(
x
.
time
+
' '
+
key
)
if
(
x
.
time
.
indexOf
(
key
)
!=-
1
){
count
+=
parseFloat
(
x
.
unitPrice
)
}
...
...
src/views/index.vue
View file @
53335e64
...
...
@@ -144,9 +144,9 @@
</div>
</div>
</div>
<
!--
<
div
class=
"video_box"
:class=
"movieShow ? 'video_box_show' : ''"
>
<video
v-if=
"movieShow"
@
ended=
"nextVideo
"
style=
"width:100%;height:100%;"
ref=
"video"
:src=
"movie[movieNum]"
muted
autoplay=
"autoplay"
controls=
"controls"
>
您的浏览器不支持视频播放
</video>
</div>
-->
<div
class=
"video_box"
:class=
"movieShow ? 'video_box_show' : ''"
>
<video
v-if=
"movieShow"
@
ended=
"nextVideo
(true)"
style=
"width:100%;height:100%;"
ref=
"video"
:src=
"movie[movieNum]"
autoplay=
"autoplay"
controls=
"controls"
>
您的浏览器不支持视频播放
</video>
</div>
</div>
</
template
>
<
script
>
...
...
@@ -198,9 +198,11 @@ export default {
};
},
mounted
()
{
for
(
let
i
=
0
;
i
<
20
;
i
++
){
this
.
movie
.
push
(
`http://img.oytour.com/video/
${
i
+
1
}
.mp4`
)
for
(
let
i
=
0
;
i
<
26
;
i
++
){
// 生成视频数据
this
.
movie
.
push
(
`http://192.168.1.254/
${
i
+
1
}
.mp4`
)
// this.movie.push(`http://img.oytour.com/video/${i+1}.mp4`)
}
this
.
nextVideo
();
this
.
mq
();
this
.
initVideo
();
this
.
bus
.
$on
(
"addVideo"
,
txt
=>
{
...
...
@@ -218,9 +220,9 @@ export default {
}
},
false
);
this
.
init
()
//
this.movieTimmer = setInterval(() => {
//
this.getMovieTimmer()
//
}, 1000)
this
.
movieTimmer
=
setInterval
(()
=>
{
this
.
getMovieTimmer
()
},
1000
)
this
.
getTime
()
setInterval
(()
=>
{
this
.
getTime
()
...
...
@@ -239,11 +241,21 @@ export default {
return
}
},
nextVideo
:
function
()
{
if
(
this
.
movieNum
>=
19
){
this
.
movieNum
=
0
nextVideo
:
function
(
f
)
{
if
(
f
)
{
// 根据f 删除一播放的数据
this
.
movie
.
splice
(
this
.
movieNum
,
1
)
}
let
maxNum
=
this
.
movie
.
length
// 最大随机数
let
mathRound
=
Math
.
floor
(
Math
.
random
()
*
maxNum
)
// 生成随机数
if
(
maxNum
===
1
){
// 如果随机数为1 说明是最后提条数据 重新生成数据
this
.
movie
=
[]
for
(
let
i
=
0
;
i
<
26
;
i
++
){
this
.
movie
.
push
(
`http://192.168.1.254/
${
i
+
1
}
.mp4`
)
// this.movie.push(`http://img.oytour.com/video/${i+1}.mp4`)
}
this
.
nextVideo
()
}
else
{
this
.
movieNum
=
this
.
movieNum
+
1
this
.
movieNum
=
mathRound
}
},
connec
(){
...
...
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