Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fa7f579c
authored
Aug 26, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_2.8.3' of
http://192.168.3.233:8090/glsx/scrm-wx-merchant-activity
into dev_2.8.3
2 parents
5957b1f8
3d629bf1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
src/utils/util.js
src/views/crowdfunding/components/LiveBox.vue
src/utils/util.js
View file @
fa7f579
...
@@ -256,7 +256,7 @@ const date_format = num => {
...
@@ -256,7 +256,7 @@ const date_format = num => {
}
}
return
`
${
days
}
天
${
hours
}
:
${
minutes
}
:
${
second
}
`
return
`
${
days
}
天
${
hours
}
:
${
minutes
}
:
${
second
}
`
}
}
const
draggable
=
(
drag
,
fun
)
=>
{
const
draggable
=
(
drag
,
fun
,
target
)
=>
{
var
startEvt
,
moveEvt
,
endEvt
var
startEvt
,
moveEvt
,
endEvt
// 判断是否支持触摸事件
// 判断是否支持触摸事件
if
(
'ontouchstart'
in
window
)
{
if
(
'ontouchstart'
in
window
)
{
...
@@ -273,6 +273,7 @@ const draggable = (drag, fun) => {
...
@@ -273,6 +273,7 @@ const draggable = (drag, fun) => {
drag
.
addEventListener
(
startEvt
,
startFun
)
drag
.
addEventListener
(
startEvt
,
startFun
)
function
startFun
(
event
)
{
function
startFun
(
event
)
{
if
(
!
drag
.
id
)
return
// 阻止页面的滚动,缩放
// 阻止页面的滚动,缩放
event
.
preventDefault
()
event
.
preventDefault
()
// 兼容IE浏览器
// 兼容IE浏览器
...
@@ -310,8 +311,8 @@ const draggable = (drag, fun) => {
...
@@ -310,8 +311,8 @@ const draggable = (drag, fun) => {
}
}
drag
.
style
.
left
=
left
+
'px'
drag
.
style
.
left
=
left
+
'px'
drag
.
style
.
top
=
top
+
'px'
drag
.
style
.
top
=
top
+
'px'
}
}
function
endFun
(
event
)
{
function
endFun
(
event
)
{
drag
.
style
.
cursor
=
''
drag
.
style
.
cursor
=
''
document
.
removeEventListener
(
moveEvt
,
moveFun
)
document
.
removeEventListener
(
moveEvt
,
moveFun
)
...
...
src/views/crowdfunding/components/LiveBox.vue
View file @
fa7f579
<
template
>
<
template
>
<div
<div
:class=
"['live-box',
{'videoFullscreen':videoFullscreen}]"
:class=
"['live-box',
{'videoFullscreen':videoFullscreen}]"
:style="videoStyle"
id="live-box"
id="live-box"
>
>
<div
<div
class=
"mask"
>
class=
"mask"
@
click=
"openFullscreen"
>
<div
class=
"sprite-icon icon-live-close"
></div>
<div
class=
"sprite-icon icon-live-close"
></div>
<div
class=
"status flex"
>
<div
class=
"status flex"
>
<div
class=
"live-line"
>
<div
class=
"live-line"
>
...
@@ -90,7 +86,7 @@ export default {
...
@@ -90,7 +86,7 @@ export default {
_this
.
player
.
ready
(
function
()
{
//设置播放器初始化完成后的回调
_this
.
player
.
ready
(
function
()
{
//设置播放器初始化完成后的回调
console
.
log
(
'-------------------------'
,
_this
.
player
.
poster
())
console
.
log
(
'-------------------------'
,
_this
.
player
.
poster
())
_this
.
player
.
play
()
//播放视频
_this
.
player
.
play
()
//播放视频
_this
.
draggable
(
document
.
getElementById
(
'live-box'
))
_this
.
draggable
(
document
.
getElementById
(
'live-box'
)
,
_this
.
openFullscreen
)
})
})
}
}
})
})
...
@@ -105,12 +101,13 @@ export default {
...
@@ -105,12 +101,13 @@ export default {
},
},
methods
:
{
methods
:
{
openFullscreen
(
status
=
true
)
{
//打开关闭全屏
openFullscreen
(
status
=
true
)
{
//打开关闭全屏
let
[
live
]
=
document
.
getElementsByClassName
(
'live-box'
)
let
[
volumePanel
]
=
document
.
getElementsByClassName
(
'vjs-volume-panel '
)
let
[
volumePanel
]
=
document
.
getElementsByClassName
(
'vjs-volume-panel '
)
let
[
volume
]
=
volumePanel
.
getElementsByClassName
(
'vjs-mute-control'
)
let
[
volume
]
=
volumePanel
.
getElementsByClassName
(
'vjs-mute-control'
)
volume
.
click
()
volume
.
click
()
this
.
player
.
play
()
this
.
player
.
play
()
this
.
videoFullscreen
=
status
this
.
videoFullscreen
=
status
live
.
id
=
status
?
''
:
'live-box'
},
},
}
}
}
}
...
@@ -126,7 +123,6 @@ export default {
...
@@ -126,7 +123,6 @@ export default {
height
:
148px
;
height
:
148px
;
border-radius
:
4px
;
border-radius
:
4px
;
overflow
:
hidden
;
overflow
:
hidden
;
-webkit-user-select
:
auto
;
.mask
{
.mask
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment